[libvirt] snapshots and LVM

Chris Lalancette clalance at redhat.com
Tue May 11 17:39:52 UTC 2010


On 05/11/2010 01:31 PM, Daniel Berteaud wrote:
> Hi.
> 
> I've just tested the snapshot function, which seems to work, but for
> now, is limited to qcow2 images.
> 
> Are there any plans to add LVM based snapshots ?
> 
> I know LVM would have some limitations, but, with recent distribs (F13,
> RHEL6 at least), as snapshots can be merged back into the original LV, I
> think we could have at least some snapshots function.
> 
> Basically, the domain could be paused, then, the memory can be dumped in
> a separated file (as a virsh save do), then, all LVM based disks (and
> qcow2 based) could be snapshoted, then, the domain could be reloaded
> from the saved state. (or even just resumed, if the save function don't
> destroy it like a virsh save does)
> 
> LVM gives some (a lot of ?) performance improvements over qcow2, and I
> think snapshots would be a lot faster (on my tests, it takes 4 or 5
> minutes to snapshot a simple ubuntu guest on qcow2, and even longer to
> revert).
> 
> There would still be some limitations, like:
> - check if lvconvert support merging before we create the snapshots
> - size of snapshots are fixed, should libvirt monitor the % used, and
> auto-grow when needed ?
> - there would be no support for snapshot of snapshot
> 
> Any thoughts ?

It's certainly something that would be nice to see.  I even have FIXME
comments in the code about supporting LVM snapshots; I just haven't had
time to take any look at it.  If you have time/interest, I'd be happy to
review patches doing it!

-- 
Chris Lalancette




More information about the libvir-list mailing list