On 27/07/2023 17:18, Michael 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.

Okay, I've chosen to run ext over lvm over raid, so my only experience of btrfs is SUSE using it as default, but ...

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?

I did investigate btrfs ...

Any gotchas I should be mindful of?

If you can run two disks and raid, that's always a good idea. SMART is supposed to catch disk problems, but they still do die without warning.

btrfs raid is (still) full of gotchas, as far as I know.

Don't use anything higher than raid-1. Parity raid isn't reliable last I knew ...

Make sure you know what you're getting. FS people seem to concentrate on protecting the file system, not the data. I believe btrfs will raid-1 the metadata without asking if it can, you need to actively ask for the data to be raided, and that's caught people out not realising btrfs treats data and metadata differently. (cf the ext3/4 debacle)

Your favoured snapshot/backup strategy?

Manual ... probably shouldn't be. I snapshot / every friday before I do an emerge on Saturday. /home I ought to snapshot more than I do.

WATCH YOUR FREE DISK. I think it's all sorted now, but whatever you're using it was always a good idea not to go over 90% full. For a very long time, a combination of snapshots and a full disk would wedgie the system, such that the only way to free up space was to reformat the entire disk! As I say, I think it's now fixed so you can delete snapshots, but >90% ain't a good idea anyway

Cheers,
Wol

Reply via email to