Fedora shows / mounted at the same location as home

I have a fresh install of Fedora 33, with BTRFS.
While installing it I created separate partitions for / and /home. But now the system (df, gparted) thinks that I have the same partition mounted in both:

$ df -h
...
/dev/nvme0n1p2  850G   36G  814G   5% /
tmpfs            32G   34M   32G   1% /tmp
/dev/nvme0n1p2  850G   36G  814G   5% /home

When I add a large file to /home, I see the used space increasing in both.
The weird thing (to me) is that when I look at / I don’t see directories from /home.

What happened? Does anyone know if this is safe, i.e. can writing to the user’s directory overwrite or mess up system files and vice versa?

This is normal when you mount different subvolumes of the same Btrfs filesystem. In the output of mount you will see subvol=… different for each. Your /etc/fstab is probably where these are specified.

I created separate partitions for / and /home.

Maybe you did create partitions, but somehow these mountpoints use a single filesystem now. Or maybe you misinterpreted and it was about separate subvolumes from the start? Without details I cannot tell. You may want to investigate if there’s an unused partition.

Compare this answer of mine. I think it may be helpful.

Yes, mounting subvolumes like this is safe.

Answered By: Kamil Maciorowski

When I add a large file to /home, I see the used space increasing in both.

This is how btrfs works. You have one partition formatted to btrfs and the filesystem itself is divided into multiple (in case of Fedora two) subvolumes. All the subvolumes share the same space, that’s why you see both / and /home having same 814G free space and that’s why creating a new file in /home also increases used space in /. But there’s no reason to be worried, it’s still two separate directories and you can’t overwrite data on / when writing to /home or vice versa.

While installing it I created separate partitions for / and /home

If you used the manual partition tool and selected btrfs (which is now default) you created subvolumes, not partitions. If you want separate partitions, you need to switch the partitioning scheme from Btrfs to Standard Partition:

custom partition in fedora

Answered By: Vojtech Trefny
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.