Btrfs subvolumes, post install

Hi,

I have setup my system with Btrfs as a filesystem. I applied these to the different drives I have.
Essentially I installed my EFI, /boot and / to 3 different partitions on a 128gb SSD.
Reading the Archwiki, I want to set up subvolumes on my / partition for /etc /bin and so on, so I can snapshot them.

Can now do this post install?
Will i need to edit fstab in order to mount all these at boot?
Is it just easier to snapshot the whole / system for restore?

My /home is on a separate drive, i learnt that the hard way a long time ago!

Thanks

Fish

Be aware that separating out /boot will making using a btrfs snapshot to rollback much more difficult.

Why would you want separate subvolumes for /etc and /bin? Are you sure you have thought through the implications of that?

Yes, you can create subvolumes post-install and move the existing data into them.

It depends if you use nested subvolumes or not. If the subvolumes are nested at the proper location then, no. Otherwise, yes.

This is mostly a install design question and a personal preference.

Yes, vastly.

Generally speaking, btrfs layouts need some understanding of what you are trying to accomplish and some planning. If you are new-ish to Linux you might want to use the default layout until you have a better feel for what should be split apart and what shouldn’t be.

What subvolumes do you have currently?

Separating boot is something I’ve done from years ago, so just a thing of habit I suppose.
If I snapshotted rot and boot at the same time would this not help mitigate the issue?
I could jut redo it so boot is back under root.

I’m not looking to snapshot a lot, maybe once a week or so so would be done manually.

Atm there are 4 volumes, boot, root, home (ssds) and backup hhd which holds photos etc (would not need snap shorting)

There are valid reasons to keep it separate but unless you have on of those it is better to let it be a part of / when using btrfs.

It would help but you would still have twice as much to deal with when trying to recover. Unless there is a specific reason you want /boot separate, it is better to let it be part of / when using btrfs.

Those are volumes. Do you have any subvolumes?

For example what does sudo btrfs subvolume list / output?

Generally speaking, working with something like btrfs involves different decisions than when working with traditional filesystems.

ID 256 gen 318 top level 5 path @
ID 257 gen 148 top level 5 path @cache
ID 258 gen 318 top level 5 path @log
ID 259 gen 28 top level 256 path var/lib/portables
ID 260 gen 29 top level 256 path var/lib/machines

Just the defaults that it will install.

I would get rid of your separate /boot, especially if it is also btrfs.

Other than that, my recommendation would be to leave it alone otherwise unless you have some need that the system can’t meet.

I think that is a good idea. Redone to EFI and / on that disk

1 Like

@dalto just wanted to say, i’ve been reading a lot of your btrfs threads etc, have really helped me out. thanks!

1 Like