Re: [ANNOUNCE] beta version of LVM snapshot merging

Previous thread: lirc drivers out of tree forever? by Anders Eriksson on Monday, August 4, 2008 - 2:36 pm. (1 message)

Next thread: Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 by Robert Hancock on Monday, August 4, 2008 - 3:43 pm. (2 messages)
To: <dm-devel@...>, <linux-kernel@...>
Cc: Alasdair G Kergon <agk@...>, Milan Broz <mbroz@...>
Date: Monday, August 4, 2008 - 3:24 pm

Hi

I'd like announce beta version of snapshot merging. The patches can be
downloaded at http://people.redhat.com/mpatocka/patches/ The patches are
against kernel 2.6.26, device-mapper.1.02.27 and LVM2.2.02.39.

The snapshot merging allows you to merge snapshot content back into the
original device. The most useful use for this feature is the possibility
to rollback state of the whole computer after failed package upgrade,
administrator's error or so.

Merging of a snapshot is initiated with command "lvconvert -M
vg/lv_snapshot". lvconvert polls for the termination of merging and then
automatically removes the merging snapshot. If the computer crashes, the
merging resumes after a crash and background polling is restarted too
(from lvchange -ay or vgchange -ay command).

While the merging is active, any accesses to the origin device are
dicrected the snapshot that is being merged. When the merging finishes,
the origin target is seamlessly reloaded and the merging snapshot is
dropped. The filesystem can stay mounted during this time.

There are three types of merging:

--nameorigin (default) - the resulting logical volume will have name,
minor number and UUID of the original origin volume. When this mode is
used, neither snapshot nor the origin can be mounted when the merging
starts. (but you can mount the origin immediatelly after you start
merging, you don't have to wait until it finishes)

--namesnapshot - the resulting logical volume will have name, minor number
and UUID of the snapshot to be merged. When the merging starts, the
snapshot can be mounted and the origin cannot be mounted.

--onactivate - marks the snapshot for merge on next activate (when
lvchange -ay or vgchange -ay changes the state from inactiva to active),
but doesn't do actual merging. This option is useful if you need to merge
over a filesystem that cannot be unmounted (for example root) --- use
lvconvert -M --onactivate and reboot the computer. On next reboot, the
merge will star...

To: Mikulas Patocka <mpatocka@...>
Cc: <dm-devel@...>, <linux-kernel@...>, Alasdair G Kergon <agk@...>, Milan Broz <mbroz@...>
Date: Tuesday, August 5, 2008 - 7:16 am

< offtopic>

this is exactly what I want and need, I played once with the snapshots
but found that there is no way to merge them back, thus this will make
linux be able to do full rollback. Amazing.

Now the only big thing linux is missing now, is support for good packet
writing since both direct DVDRW and pktcdvd writing is very slow.

The solution here is to create a specialized implementation of UDF
filesystem that uses its own caches and is bypassing VFS completly.

Maybe do it with fuse?

And probably it would be great to fuse RAID and LVM systems so we can
have one standard volume manager.

</offtopic>

This can be used together with hibernating, to snapshot full system?
Full integration with swsusp would be great.

Thanks a million for such a good work.
As soon as I have free time I will try this.

Best regards,
Maxim Levitsky

--

Previous thread: lirc drivers out of tree forever? by Anders Eriksson on Monday, August 4, 2008 - 2:36 pm. (1 message)

Next thread: Re: ksoftirqd high cpu load on kernels 2.6.24 to 2.6.27-rc1-mm1 by Robert Hancock on Monday, August 4, 2008 - 3:43 pm. (2 messages)