LWN.net Logo

Btrfs for Rawhide users?

Btrfs for Rawhide users?

Posted Nov 20, 2009 2:49 UTC (Fri) by msnitzer (subscriber, #57232)
In reply to: Btrfs for Rawhide users? by RobWilco
Parent article: Btrfs for Rawhide users?

LVM snapshots will soon have the ability to merge a snapshot into its
origin, see:
https://www.redhat.com/archives/dm-devel/2009-November/ms...
http://people.redhat.com/msnitzer/patches/snapshot-merge/

v4 of the DM snapshot-merge patchset will be posted to the dm-devel mailing
list tomorrow-ish.

The finishing touches (to both DM and lvm2) are being actively worked now.
LVM2 snapshot merge will work with any filesystem that is layered ontop of
the "origin" LVM logical volume (LV).

When you create an LVM snapshot of the origin it preserves a copy of the
logical volume at a particular point in time. In general, the origin
volume continues to be used (changes and new files stored in origin) and
the snapshot is a backup. In the context of system upgrades
this would almost certainly be the case: root filesystem is layered ontop
of an LV (the "origin"); a snapshot is taken of this LV; this origin LV's
filesystem is changed (via a system upgrade). The upgrade doesn't go
well... you want to rollback. With recent LVM (and DM) snapshot
advances you can merge the snapshot back into the origin. In the process
you rollback the origin LV to the state it was in before the system
upgrade.

There is still the work of integrating and productizing LVM snapshot-merge
for use as a system rollback mechanism. An intelligent init needs to
developed to allow the user to say "I want to rollback to snapshot X". In
practice, arming the system to perform a snapshot merge requires a small
LVM metadata change. If the system is still running/bootable it is very
easy to instruct the system to rollback to a snapshot. But if the system
isn't bootable how does one make this happen (need to be able to run lvm2's
lvconvert somehow)?

But taking a step back, what do you mean by "suppress" an old snapshot? In
terms of LVM if you no longer have a use for a snapshot LV you just delete
it. And as I said the snapshot generally doesn't contain the new files and
modifications.


(Log in to post comments)

Btrfs for Rawhide users?

Posted Nov 24, 2009 11:01 UTC (Tue) by RobWilco (guest, #40828) [Link]

Thanks for your reply.

When asked, I'll blame everything on the documentation!

I got back to RTFM and doing some test and I realized LVM snapshots suits my
need just fine. I got the wrong impression that, under the hood, the "real"
partition was not touched anymore, and all the update would take place and
the snapshot. I was confused by the "difference" being written in the
snapshot.

Now I do not understand the problem that "snapshot merge" resolve...

Bye,

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds