I would like to free same space on my hard drive by shrinking the primary partition. openSUSE only recommends 5 GB of free space for installation, 43 gigabytes can’t be necessary by any means. I have only 195 GB of space for my personal files.
Can I safely shrink the partition 3?
Change the root file system to use “ext4”, and then 20G is probably more than enough unless you have big plans for what you will install. The “btrfs” file system works best with lots of spare space (for snapshots).
On the screen where it propose partitioning, there should be a button “Edit proposal settings”.
If you click that, there is an option to set the filesystem type for the root partition, and “ext4” should be one of the options.
I just checked this with Leap 42.1-RC1, since that’s what’s currently on my install USB. I think it was similar for 13.2.
EDIT: ^No, but I have no idea how to reformat without losing my data.
I’m not sure I understand that. I thought we were talking about the installer proposal for partitioning, where it is going to format the root partition anyway.
Does formatting the root partition mean the loss of my personal data? Will the 195 GB partition be wiped also?
I didn’t find “Edit proposal settings” option. In the Gnome ‘Disks’ app?
One way, if you have everything you want to keep on your /home partition, is to reinstall and when you get to the partitioning section of the install, select Expert Partitioner, delete the / partition, create a new / partition of 20GB formatted ext4 and then another ext4 partition with the rest and label this something like /data.
The installer will accept your suggestions and leave the /home partition alone. It will then reinstall everything you currently have on the btrfs partition on the ext4 partition.
Just be sure that the proposal does NOT format your home partition but it just mounts it as /home adjust things as needed and do not accept until the proposed scheme is to you satisfaction.
Also understand that reducing the size does not necessarily free space for another partition. Partition space must be continues and you can only add space to the end of a partition. So you may have to move partitions around to get the free space at the end of the partition you want to add to. You can of course drop a new partition in that space and mount it where you will.
My impression also was this was a very recent install do you really have all that much in your home? You can always back it up and redo the whole thing
I don’t think you can change file systems and expect to persevere what is on the old file system.
Yes, this was a very recent install. Does the openSUSE installer allocate the hard drive in percentage terms? For example, 43 GB (partition 3) of 240 GB (the size of my hard drive) is ~18%, so on a 10 TB drive the size of partition 3 would be 1800 gigabytes (!)
Well defaults are defaults you do not have to accept them you can change stuff to anything you can rationally want. When presented with sufficient free space the installer will want by default to use BTRFS file system and allocate at least 40 gig plus or minus for root. You need at least 40 gig to run BTRFS because it includes snapper which takes lots of snapshots of the files system periodically and that does use space. You can adjust snapper not to run or be less aggressive in the snaps it takes and thus reduce the space needed for root with BTRFS. but you need to do that after the install. 20 gig root is minimum for any normal use root if you turn off snapper. You can get by with less if you don’t install a whole lot of stuff. But if you go under 20 then you need to use ext4 and not BTRFS in my opinion. The swap is normally equal to memory with maybe a 8 gig ceiling. any additional space available is used for home (ie your personal files). Personally I never take the defaults and set up thing the way I want
It all depends on what you plan to use the OS for. If you use it for a DB server you probably want to add an additional partition to hole the DB files.
Of course, although the following performs deep surgery on your disk layout and file systems, you will likely want to backup or copy to other storage anything you feel is valuable.
Since you “only” want to shrink your root partition, then I recommend
The reason why you need to use a tool like this is that you are performing major changes to basic files your OS needs to run, so your OS cannot be running when you make these changes. Also, GParted Live will make these changes without destroying or affecting your data (only re-locating as needed) which is different than normal partitioning/formatting tools like what you’ll see in the Installer and YAST.
You may want to disable Snapper first before shrinking so you won’t forget.
Empty your trash. Remove all unnecessary files.
Use dd to zero your empty space for maximum results (don’t know how to do that? Ask and will re-post, else I’ve already posted how o do this in the Virtualization forums)
Shutdown openSUSE.
Insert the gparted live USB or CD and boot to that (may require BIOS boot configuration changes)
Select the changes you want to make, I recommend in the following order…
Re-size (and move if you wish) the root partition, Make sure it’s snug up against the swap partition with no space in between.
Depending on what you want to do with your newly recovered space, either expand/move your /home partition to fill the available free space, create a new partition or leave it alone for some future use.
Save and apply your changes. From your description, it’ll likely complete within an hour. Re-boot without your GPart Live disk and inspect your results.