On Sat, Nov 22, 2014 at 06:34:38PM +0100, Goffredo Baroncelli wrote:
> On 11/21/2014 05:28 AM, Zygo Blaxell wrote:
> > e.g. if an ext4 filesystem explodes, I can:
> > 
> >     1.  make a LVM snapshot of the broken filesystem
> > 
> >     2.  run e2fsck on the snapshot
> > 
> >     3.  mount and repair the snapshot, e.g. rsync any missing files
> >     from backups, salvage anything that survived
> > 
> >     4.  LVM merge the snapshot to its origin volume
> > 
> >     5.  umount the origin volume and mount the merged volume
> >     (or just reboot)
> > 
> > ...and I can do all of this on a running system, in-place, with only a
> > few minutes of downtime in the must-reboot case.
> > 
> > None of the above works with btrfs at all.  Multi-device btrfs fails
> > at 2, 
> 
> You can't compare ext4 with btrfs, if you are talking about a multi-device 
> filesystem: ext4 haven't this capability. 

btrfs fails this comparison as a single-device filesystem.

> Try to make a md-raid over a snapshotted logical volume(s); I never tried
> that, but I suppose that there will be the same problems...

md-raid works as long as you specify the devices, and because it's always
the lowest layer it can ignore LVs (snapshot or otherwise).  It's also
not a particularly common use case, while making an LV snapshot of a
filesystem is a typical use case.

> > and mounting the filesystem fails at 3.  
> Are you sure ?

Yes, I'm sure.  I've had to replace filesystems destroyed this way.

>[working instance snipped]

> On the basis of the example above, in case you want to mount a 
> "single-disk", BTRFS seems me to work properly. You have to pay
> attention only to not mount the two filesystem at the same time.

The problem is btrfs stops searching when it sees one disk with each UUID,
so the set of disks (snapshot vs origin) that you get is *random*.
For a pair of origin + snapshots, there's a 50% chance it works, 50%
chance it eats your data.

> BR
> G.Baroncelli
> 
> 
> -- 
> gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
> Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

Attachment: signature.asc
Description: Digital signature

Reply via email to