2010
02.28

After being asked by a user in #ubuntu-no on Freenode IRC if there was a method of restoring his system, I researched if the underlying things needed to implement this was present (always curious…). While LVM has had snapshots for a long time, being able to merge a snapshot back into its origin has been missing. Some 15 minutes of googling showed that initial work on this was done in August 2008, so strange if it hasn’t been completed yet? Turns out it has, so the strange part is that none of the Linux news sites have written about it (that I’ve seen).

The required kernel bit, a “merge target” in the DM layer, was merged in the just released linux 2.6.33 and the lvm parts are there from 2.02.58.  LVM can now do snapshot merging with lvconvert –merge! I’m assuming here that the device-mapper code thats in between those two components has also been finished and released, which ought to be a safe assumption.

This makes me wonder why Fedora has chosen to base their System Rollback feature for Fedora 13 on btrfs instead of LVM, which would work on any file-system. There are probably good reasons.

6 comments so far

Add Your Comment
  1. actually the yum plugin can work with lvm snapshots but btrfs is just more efficient

  2. [...] ist jetzt möglich da Kernel und LVM-Tools die nötigen Patches erhalten und akzeptiert haben. Man benötigt [...]

  3. [...] http://www.jonnor.com/2010/02/lvm-snapshot-merging-avaliable/ September 27, 2010 12:57 pm Sandra Ok, so `lvremove` accepts the changes in the snapshot. So far so good =) September 27, 2010 11:18 am Janne Pikkarainen OK, first of all: the grand old LVM1 supported only read-only snapshots. In that case the modifications were copied to original image after unmounting the snapshot. LVM2 provides support for read-write snapshots, allowing you to do funkier stuff with virtual machine images and stuff like that. [...]