BTRFS + Snapper + Subvolumes

Hi all

This is a bit of a big ask but I’m trying to move back to Endeavour from OpenSUSE Tumbleweed. I still love Tumbleweed but I am having issues with codecs and other niggles. The main reason I moved from Endeavour in the first place is that Tumbleweed seemed to have everything set up properly from the beginning and I want a distro that ‘Just works’.
I am planning to install EOS on BTRFS and want to get snapper to take automatic snapshots when upgrading packages but I’m not really sure how to set up the partitions.
I’ve got a 1TB NVME drive, a 500GB SSD for Steam games, another 1TB HDD for Steam games (older games that don’t need the speed for loading etc) and finally a 4TB HDD for ‘DATA’ which contains things like my music, family pictures and videos and other random stuff like documents etc.
Can anyone please suggest how to best partition the NVME drive for BTRFS snapshots etc and also, if it is possible to mount the other drives as subvolumes instead of symlinking?
I don’t want to format any of the drives so if symlinking (e.g. /DATA/Music to ~/Music) is the best way, I will stick to that.
Thanks in advance guys

There is no special way. Snapper can work with almost any subvolume setup. The default btrfs subvolumes that are created by the EOS installer will work fine for this.

You can’t mount a foreign partition as a subvolume.

This is probably the best way.

I’ve been doing this for years by symlinking the folders on my data HDD directly into /home/user. If only because my data HDD is too slow to host the dotfiles from /home/user. That way I can leave the home partition on the SSD. The easiest way is not necessarily the worst way :wink: .

Hi :slight_smile:

Just install EOS on the drive or partition you want to and select BTRFS as file system during the calamres setup. It will create all needed subvolumes.

But to mount your other drives into specific folders during boot it depends on what file systems these drives are using. In general this will be done by editing your /etc/fstab. The output of lsblk -f would be helpful here, if you don’t know how to do this.

For your desired setup of snapper just install some packages:
yay -S snapper snap-pac snap-pac-grub grub-btrfs
This is all you need to do. This will set up automatic snapshots on install/uninstall/update and makes the snapshots bootable from grub. If you want to use a GUI for managing your subvolumes and snapshots I would recommend installing BTRFS-Assistant.

1 Like

If you are going to install grub-btrfs you should also enable the appropriate overlay hook in mkinitcpio.conf.

How do you do this please? Also I read about having to rebuild grub when a kernel has been updated, can this also be automated?

You don’t need to rebuild the grub menu when a kernel has been updated. Only if you install a completely new kernel or remove a kernel.

My mistake, I see that in the post now ( How do you enable the overlay hook though?

Add grub-btrfs-overlayfs to the HOOKS line in /etc/mkinitcpio.conf

ah, ok thanks. I didn’t realise it was that simple, I thought there was a whole process lol

You should also rebuild the initramfs after that sudo mkinitcpio -P

So if I’m not installing custom Kernels and just updating them as normal do I need to do that?

That is a one-time thing after you modify /etc/mkinitcpio.conf

ah, I see. Thanks so much for all your help. I’m going to give it a go now and see if it all works properly.

Thanks again :+1: :grinning:

1 Like

One other question. I stumbled on this post earlier - Snapper post install, is it best to use the tools listed in there or not?

snapper-support installs many of the packages referenced above and does some basic configuration for you. If you want to use it, you should do that instead of installing the packages above.

As for btrfs-assistant, I am quite biased(I am the original author and maintainer) but I would recommend it.

Fab! Thanks, I really appreciate it :+1:

1 Like