linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Subvolumes and isolation
@ 2014-04-14 10:38 Holger Hoffstätte
  2014-04-14 11:31 ` Hugo Mills
  2014-04-14 11:50 ` Duncan
  0 siblings, 2 replies; 4+ messages in thread
From: Holger Hoffstätte @ 2014-04-14 10:38 UTC (permalink / raw)
  To: linux-btrfs


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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subvolumes and isolation
  2014-04-14 10:38 Subvolumes and isolation Holger Hoffstätte
@ 2014-04-14 11:31 ` Hugo Mills
  2014-04-14 11:50 ` Duncan
  1 sibling, 0 replies; 4+ messages in thread
From: Hugo Mills @ 2014-04-14 11:31 UTC (permalink / raw)
  To: Holger Hoffstätte; +Cc: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]

On Mon, Apr 14, 2014 at 10:38:45AM +0000, Holger Hoffstätte wrote:
> 
> 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.

-- 
=== 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.                       

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subvolumes and isolation
  2014-04-14 10:38 Subvolumes and isolation Holger Hoffstätte
  2014-04-14 11:31 ` Hugo Mills
@ 2014-04-14 11:50 ` Duncan
  2014-04-14 12:25   ` Holger Hoffstätte
  1 sibling, 1 reply; 4+ messages in thread
From: Duncan @ 2014-04-14 11:50 UTC (permalink / raw)
  To: linux-btrfs

Holger Hoffstätte posted on Mon, 14 Apr 2014 10:38:45 +0000 as excerpted:

> 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! =:^)

-- 
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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Subvolumes and isolation
  2014-04-14 11:50 ` Duncan
@ 2014-04-14 12:25   ` Holger Hoffstätte
  0 siblings, 0 replies; 4+ messages in thread
From: Holger Hoffstätte @ 2014-04-14 12:25 UTC (permalink / raw)
  To: linux-btrfs

On Mon, 14 Apr 2014 11:50:19 +0000, Duncan wrote:

> Holger Hoffstätte posted on Mon, 14 Apr 2014 10:38:45 +0000 as excerpted:
> 
>> 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...

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-14 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 10:38 Subvolumes and isolation Holger Hoffstätte
2014-04-14 11:31 ` Hugo Mills
2014-04-14 11:50 ` Duncan
2014-04-14 12:25   ` Holger Hoffstätte

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).