Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] lvm snapshot cloning



> 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.

I wrote a program to copy the exception table from one COW device to
snapshot device.  At the end, both snapshots, in lvdisplay, use the same
amount of space and get the same md5sum. Which is cool.

My only question is, it were this easy, why am I seeing people lament
about the lack of this feature?

Obviously, I need to do some testing, but it looks viable.


>
> Good Luck,
> Bill Bogstad
>





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org