Subvolumes and isolation
So I'm happily using subvolumes and snapshots and was wondering about subvolume low-level isolation. Assuming metadata=single, would a corrupt metadata block in one subvolume's directory tree affect any other subvolumes on the same physical partition, or would the fallout from this bad block be contained?
thanks,
Holger
Quoted 6 lines · Holger Hoffstätte
So I'm happily using subvolumes and snapshots and was wondering about subvolume low-level isolation. Assuming metadata=single, would a corrupt metadata block in one subvolume's directory tree affect any other subvolumes on the same physical partition, or would the fallout from this bad block be contained?
With snapshots, potentially the FS trees can be shared as well
(that's what a snapshot is -- it's a CoW copy of the FS tree of a subvol), so a corrupt block in the FS tree could be shared between the subvols.
With separately-created subvolumes (btrfs sub crea), the FS trees
will be independent from each other, but they will still share the same extent tree (and all the other trees).
Hugo.
Signature · 4 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- You've read the project plan. Forget that. We're going to Do ---
Stuff and Have Fun doing it. Holger Hoffstätte posted on Mon, 14 Apr 2014 10:38:45 +0000 as excerpted:
Quoted 5 lines
So I'm happily using subvolumes and snapshots and was wondering about subvolume low-level isolation. Assuming metadata=single, would a corrupt metadata block in one subvolume's directory tree affect any other subvolumes on the same physical partition, or would the fallout from this bad block be contained?
This isn't an authoritative answer, but AFAIK, chunks are /not/ subvolume- dedicated. In fact, on the wiki, the sysadmin's guide page defines a snapshot as simply a subvolume that shares its data and metadata with some other subvolume, using btrfs' COW capabilities. Obviously that would be rather difficult if subvolumes get dedicated data and metadata chunks, so...
That is in fact why I prefer entirely separate filesystems instead of simply subvolumes, and use separate (but identically sized) filesystems for primary backup as well -- using subvolumes there's only one filesystem superstructure and if it's damaged... Let's just say I'm not comfortable with all my data eggs in the same data basket... the one I might find someday the bottom just dropped out of (particularly since btrfs isn't fully stable yet)!
Of course the other benefit to multiple small partitions is that scrubs and balances are that much faster, too! Having a balance or scrub take a minute or five is considerably different than having it take an hour or five! =:^)
Signature · 3 lines
Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman
Quoted 8 lines · Duncan
Holger Hoffstätte posted on Mon, 14 Apr 2014 10:38:45 +0000 as excerpted:
Quoted 5 lines
So I'm happily using subvolumes and snapshots and was wondering about subvolume low-level isolation. Assuming metadata=single, would a corrupt metadata block in one subvolume's directory tree affect any other subvolumes on the same physical partition, or would the fallout from this bad block be contained?
Quoted 6 lines
This isn't an authoritative answer, but AFAIK, chunks are /not/ subvolume- dedicated. In fact, on the wiki, the sysadmin's guide page defines a snapshot as simply a subvolume that shares its data and metadata with some other subvolume, using btrfs' COW capabilities. Obviously that would be rather difficult if subvolumes get dedicated data and metadata chunks, so...
Sure - I guess I should have stated that differently: I fully expect a damaged subvolume to potentially have some effect on its snapshots, and the same for data blocks (since they are single as well).
The situation is simple: I have the usual big backup drive attached to my server with subvolumes for each individual machine, and snapshots that are garbage-collected after a configurable amount of time since all machines are wildly different in terms of size, change rate and backup retention. Therefore subvolumes seemed the best compromise in terms of isolation & easy restore while avoding the hassle of separate filesystems, partitions etc.
Obviously this setup is not particularly resilient to catastrophic events like complete drive death, but that's OK in my case.
Holger