[Discuss] lvm snapshot cloning

Bill Bogstad bogstad at pobox.com
Mon Oct 24 00:25:08 EDT 2011


On Sun, Oct 23, 2011 at 8:31 PM,  <markw at mohawksoft.com> wrote:
>> On Oct 23, 2011, at 7:08 PM, markw at mohawksoft.com wrote:
>>>

>
> The real solution, and I have code to do it, is this:
>
> create a snapshot of device A, call it foo.
> (arbitrary length of time passes)
> create a second snapshot of A, call it bar.

If I understand what you are asking for at the end of this sequence,
you would have two block level snapshots of device A which would have
logically the same contents and the underlying implementation would
have essentially the same physical contents (and space requirements)
as if you had done both of the snapshots with no time delay between
them.  Given that devices can have more then one active snapshot at a
time, it would seem theoretically possible to implement such a
feature.   I would call this "cloning a snapshot".  Another
possibility that might meet your requirements would be the ability to
do a "snapshot of a snapshot".  Unfortunately, I've never seen any
suggestion that LVM can do either of these operations.

What you intend to do with those snapshots.  I'm guessing it would
involve using them in read/write mode.  Perhaps some kind of
multi-branch tree of versions of a device?

In any case, I was curious and found the following web pages which
seem relevant:

http://sourceware.org/lvm2/wiki/FeatureRequests/dm/snapshots  (feature
request page from 2009)

which says that neither snapshot cloning nor taking a snapshot of a
snapshot is currently possible as well as:

http://www.redhat.com/archives/linux-lvm/2008-November/msg00000.html

which gives several hacky ways to do snapshot cloning.   I would
suggest more investigation/careful testing before depending on this
though.

Good Luck,
Bill Bogstad



More information about the Discuss mailing list