I simply have @ and @home subvolumes.
I use btrbk for automatic snapshotting and backups to an external drive and
via ssh to another machine.

For full disk encryption, I am not sure and would love some input on it
myself.
I am planning to install gentoo with btrfs over luks on another machine.
My plan is to use luks to encrypt a drive or partition, then put btrfs over
it and do things as before with btrfs.

One thing I am wondering about is: what if I want my btrfs to span multiple
drives?
Would I luks encrypt each drive, then open each one before mounting the
btrfs pool that spans all the luks containers?
Would this be possible to do with grub and the initramfs?
If not, my fallback idea is to make a relatively small root partition on 1
drive with the normal btrfs over luks approach. Then have luks containers
for the rest of the main drive and all other drives all added to a btrfs
pool that would be used for /home and any other partitions not necessary
for booting I want to add in there.


On Thu, Jul 27, 2023 at 12:18 PM Michael <confabul...@kintzios.com> wrote:

> Although I've been using btrfs for the best part of 10 years I have not
> really
> done justice to it, because I have neither explored nor used enough most
> of
> its features.  I am now thinking of installing Gentoo on btrfs again, but
> this
> time I want to optimise the structure of btrfs subvolumes, to simplify
> snapshots and backups.
>
> I see Ubuntu and derivates install the OS root fs under btrfs subvolume
> "@"
> and /home under subvolume "@home".  This makes storing snapshots of the
> two
> subvolumes under the btrfs top-volume, which remains unmounted, cleaner
> and
> reduces the chance of mixing up the fs you may end up in and operate on
> (live,
> or snapshot).
>
> I have 3 partitions for /boot(ESP), / and /home, but have not yet created
> additional partitions for general data storage and backups.
>
> What's your recommended approach and subvolume structure for the
> deployment of
> btrfs on Gentoo for a personal PC, if the primary objective is simplicity
> in
> maintenance, combined with ease of fs recovery?
>
> Any gotchas I should be mindful of?
>
> Your favoured snapshot/backup strategy?
>
> NOTES:
>
> The Gentoo wiki pages[1],[2] cover btrfs and RAID configurations, but I
> found
> some of it confusing; e.g.:
>
> The impact of autodefrag on VM performance is noted, but then the example
> given proceeds to mount a subvolume for VM storage with 'autodefrag'.  :-/
>
> Encryption is mentioned for VMs "... if the VM uses drive encryption, the
> whole compression strategy gets blown out of the water" but doesn't
> mention
> what type of encryption, or why/how this presents a problem.
>
> Given btrfs does not offer fs level encryption, what could/would work to
> encrypt a subvolume, *without* requiring an initrd, or the introduction of
> encryption becoming orthogonal with snapshots and backups?  I am not clear
> on
> the best strategy and components to achieve this.  I'm also concerned of
> introducing an additional complexity layer in trying to recover btrfs
> when/if
> fs corruption creeps in.
>
> PS. Please keep answers specific to btrfs, as comparisons with zfs are
> well
> covered in the interwebs.
>
> [1] https://wiki.gentoo.org/wiki/Btrfs
> [2] https://wiki.gentoo.org/wiki/Btrfs/Native_System_Root_Guide

Reply via email to