Back to Netrunner | Back to Blue Systems

How to create a btrfs subvolume after installation for btrfs formatted /home partition

parted output

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 msftdata
2 538MB 806MB 268MB fat32 msftdata
3 806MB 54,5GB 53,7GB btrfs
4 54,5GB 240GB 186GB btrfs

my fstab as follows

UUID=7C65-C65B /boot vfat defaults,noatime 0 2
UUID=7C6A-1BEA /boot/efi vfat defaults,noatime 0 2
UUID=0078fb1e-a7fe-4c1e-8b70-7d4e04c1ddcf / btrfs subvol=@,defaults,noatime,space_cache,autodefrag,discard,ssd,compress=lzo 0 1
UUID=21d0600a-210d-442b-9c60-fe06d55b42f5 /home btrfs defaults,noatime,space_cache,autodefrag,discard,ssd,compress=lzo 0 2

As far as I understand, /home directory is not a subvolume even though it is btrfs formatted partition.

I would like to make it a subvolume. I need directions to do that.

Any help much appreciated.

You have two btrfs partitions now.
A merge is not possible.

In theory you could copy per send and receive the /home partition content to / and then create a subvolume for it and remove the /home partition and resize the / again.
But this is all theory and not really recommend.

I would suggest leaving it as is.

Hello, I have created /home as a separate partition as it is customary to do so as far as I know. I am a newbie in using btrfs. Is it better to use whole disk btrfs and later create subvolumes?

In the setup you have now. I would say it does not really matter. Stay with the setup you have.
Makes it easier to later also reinstall just your system on / and keeping /home partition if necessary.

Thank you for the replies. One last question. If I take a snapshot of “/” partition, will “/home” partition be affected and taken it’s snapshot in this configuration along with “/” partition?

Only / should be snapshotted not another btrfs partition mounted to /home. So /home shouldn’t be snapshotted.

This might be helpful:

or this: