<br><br><div class="gmail_quote">On Tue, May 11, 2010 at 2:46 PM, Daniel Berteaud <span dir="ltr"><<a href="mailto:daniel@firewall-services.com">daniel@firewall-services.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Le mardi 11 mai 2010 à 14:14 -0400, Chris Lalancette a écrit :<br>
<div class="im"><br>
> Well, it does support merging, to a degree,<br>
<br>
</div>Merging a LVM snapshot back into the original LV is only available since<br>
kernel 2.6.32 (or .33, don't remember), and with some recent version of<br>
device-mapper and lvm2<br>
<div class="im"><br>
<br>
> though it's an implicit<br>
> feature in the way the other snapshot mechanisms work.  That is, if you<br>
> do something like:<br>
> Base Image -> snap1 -> snap2 -> snap3<br>
<br>
</div>That's not possible, LVM doesn't support snpshot of snapshot, but you<br>
can have<br>
<br>
Base image -> snap1<br>
           -> snap2<br>
           -> snap3<br>
<br>
each snapshot can only be based on the original LV. The idea with LVM<br>
would be to always run the guest on the original LV for this reason (so<br>
we can take a snapshot when we want).<br>
<br>
If we want to revert a guest to a snapshot, we have to merge it back<br>
into the original LV. Merging a LVM snapshot back into the original LV<br>
should be almost instantaneous, and preserve all the other snapshots.<br>
<div class="im"><br></div></blockquote><div><br>This new feature sounds cool. I just had a try, found a problem, when  merging a LVM snapshot:<br>lvconvert says:<br>Can't merge over open origin volume<br>Merging of snapshot snap0 will start next activation.<br>
<br>The origin volume is open by QEMU, although the VM is already stoped(by Issuing 'stop' command in QEMU monitor)<br>LVM merging feature doesn't support merge when the origin volume is opened? <br>What's the mean of next activation? From the patch (<a href="http://people.redhat.com/msnitzer/patches/snapshot-merge/lvm2/LVM2-2.02.55/lvm-merge-onactivate.patch">http://people.redhat.com/msnitzer/patches/snapshot-merge/lvm2/LVM2-2.02.55/lvm-merge-onactivate.patch</a>), looks like "lvchange --refresh orig_lvm" will active it? I did it, but no way...<br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
><br>
> And now delete snap2, the changes from snap2 are automatically merged<br>
> into snap3 to keep snap3 a viable snapshot.<br>
><br>
> I think we'll have to explicitly do this for LVM (though I'm not sure;<br>
> my experience with LVM snapshotting is 0).<br>
><br>
> Besides this implicit merging action, do you want/need the ability to<br>
> manually merge snapshots?  What's your use-case, so I can understand<br>
> it better?<br>
><br>
<br>
</div>When I talk about merging a snapshot in LVM (or "rollback"), it's<br>
equivalent to revert in libvirt snapshot terminology.<br>
<br>
Regards<br>
<div class="im"><br>
<br>
--<br>
Daniel Berteaud<br>
FIREWALL-SERVICES SARL.<br>
Société de Services en Logiciels Libres<br>
Technopôle Montesquieu<br>
33650 MARTILLAC<br>
Tel : 05 56 64 15 32<br>
Fax : 05 56 64 15 32<br>
Mail: <a href="mailto:daniel@firewall-services.com">daniel@firewall-services.com</a><br>
Web : <a href="http://www.firewall-services.com" target="_blank">http://www.firewall-services.com</a><br>
<br>
--<br>
</div><div><div></div><div class="h5">libvir-list mailing list<br>
<a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/libvir-list" target="_blank">https://www.redhat.com/mailman/listinfo/libvir-list</a></div></div></blockquote></div><br>