Hello, my friends just taught me how great it is to have a separated /home, is there anyway I can move the current /home to a new partition without have to reinstall fedora, I actually do a few searchings and know how to do that, but i need a empty partition first so I try to create one from the current big partition, so I used the fdisk but it warned me the disk is in use and should not be partitioned.
Two things here:
- You probably will need to boot off of other media like a live USB of some sort so that the partition is not in use to shrink it
- You need to be careful when shrinking a btrfs partition. Either use a tool that is btrfs aware like gparted or kde partition manager or be sure to shrink the btrfs filesystem before shrinking the partition if you use other tools.
One more thing (after the correct answer from dalto):
Maybe your friends are wrong.
The default of
/home being a subvolume of the same
btrfs that contains
/ is a very good arrangement. You get most of the advantages of separate partitions without the disadvantages of separate partitions.
It is still a tradeoff. There are some advantages to having
/home more separate than a subvolume. Those might even outweigh the disadvantages for some users. Is that really your situation or have you just taken your friends’ confusion as you belief?
All of my answer (and some of dalto’s) assumes you are starting from current default partitioning (
/home is a subvolume of a
btrfs). If you have some other current partitioning, that gives you a better reason to change but also may adjust the instructions you should get for how to change.
While this is 100% correct it is far from ideal.
When one needs to do a reinstall the fact that /home is part of the same btrfs volume as the OS makes it 100% necessary to either:
- have a current full backup of /home and plan to do a restore of that data after the reinstall
- have additional drive space in which to do the reinstall of the OS.
The fact that the fedora installer requires that the root partition be reformatted for an install will wipe out the home subvolume on that btrfs file system during a reinstall.
Having the /home file system on a separate partition obviates this problem. Yes, it does somewhat tradeoff the advantages of sharing a partition, but in my mind that is a lesser advantage than the ability to reinstall without wiping out the data in /home.
As mentioned, gparted may do what is desired, but caution is also advised.
If there is important stuff in
/home it is already 100% necessary to have a backup. Partitions interfere with SSD wear leveling, so increase chances that you will need that backup (and Murphy’s Law says the day you need the backup will be hours before a critical deadline).
I agree, but the need for a backup is up to user discretion. Most of us take action to ensure data security.
I was referring to the particular situation asked about by the OP, and some factors involved in deciding to use a separate partition vs remaining on a single btrfs volume. That decision is not directly involved in why a backup is recommended always.
I hope this somewhat off-topic drift doesn’t interfere with the OP getting a good answer, but:
I do appreciate that reasonable alternate viewpoint to what I said. You haven’t necessarily convinced me, but understanding the other side always helps.
There are many obvious things one would want to do with the partitioning section of the Fedora installer. I find it such a baffling UI that I never know whether my failure to do what I want is because you can’t vs. because I just don’t understand how.
As soon as you get outside the majority of cases in which its default partitioning is fine, one of the most likely things one would want to do is install
root as a new subvolume of an existing
btrfs. Before reading your post, I wasn’t sure you couldn’t (I just knew that I didn’t know how to). If you can’t, I can only wonder what those who designed that were thinking. That is not a feature that was reasonable to leave out.
I happen to have lots of unpartitioned space on hard drives both internal and USB. So I would do a new install with
root in entirely the wrong place (meaning not on my SSD at all) and soon afterward clone it to a new subvolume of the main
btrfs of my SSD. That involves several cleanups of boot files and
fstab, that I’ve done often enough to find easy. Obviously, that approach isn’t as easy for most people.
Fedora installer can preserve the existing Btrfs:
- Re-create just the root subvolume using the mount point
- Specify mount points for other subvolumes, i.e.
I’ve never been a fan of a separate /home partition for the reason that it contains all of the config files which are integral to the DE. I do however like to have a separate partition for my personal data (Document / Music / Pictures etc…).
I understand and can do that myself, but many users have no clue on how to do the manual (custom) partition setup during the install so I usually hesitate to suggest that method.
We can probably assume the OP isn’t afraid of custom partitioning, but then the point of using a partition instead of a subvolume is still questionable.