Default btrfs mount options and subvolume layout

I did this always after installing.
In my main-System i did this in the running system a few days after i had to rollback. When rolling back with a non-flat layout i found it to much work. So i changed my system afterwards.
In an new setup system on permanent USB-Stick i even installed first with ext4, then converted the filesystem to btrfs, and then setup a flat layout in btrfs. persistent manjaro usb with btrfs
On both machines i do automatic snapshots with snapper.

When changing the layout you have to watch grub.cfg and fstab. Yo do need both working to be able to rebbot. For safety you should have a live-CD. But i didn´t need it. You have to watch snapper, because snapper will not create new configs, when the subvolume/ dir /.snapshots or /home/.snapshots is already present. and it may be best to stop snapper while changing the layout :slight_smile:

I can´t create an real step by step howto, because i have no system to test the steps. My actual system is already converted. I am afraid that i do miss something an you get stuck in the middle of it. Maybe you could try this with an USB-Stick before you mess up your actual system. But when i have to do it the next time i will create a step-by-step you can follow. :thinking:
Tipp:
There is some safety in btrfs using subvolumes/snapshots. It is easy to make a readonly-snapshot before you start. When you mess something up, you are able to create a new writable snapshot of it, move it to /@ instead of the former /@ and define this snapshot as default. And you are saved.

cat /etc/fstab                                                 
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/         	btrfs     	rw,noatime,compress=zstd,commit=300,subvol=@	0 0
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/home     	btrfs     	rw,noatime,compress=zstd,commit=300,subvol=@home	0 0
PARTUUID=b1d3d562-88ff-4ac2-8326-9c5d82892379	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro	0 0
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/.snapshots	btrfs     	rw,relatime,compress=zstd,commit=300,subvol=@snapshots	0 0
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/home/.snapshots	btrfs     	rw,relatime,compress=zstd,commit=300,subvol=@home.snapshots	0 0
PARTUUID=3ee1dfe1-19af-4102-945d-90d957d3c199	/var/nosnap	btrfs   	rw,relatime,compress=zstd,commit=300,subvol=@nosnap	0 0
/var/nosnap/var/cache				/var/cache	none bind	0 0
/var/nosnap/var/spool				/var/spool	none bind	0 0
1 Like