[libvirt] snapshots and LVM

Daniel Berteaud daniel at firewall-services.com
Wed May 12 07:43:50 UTC 2010


Le mardi 11 mai 2010 à 19:06 -0400, edison a écrit :


> This new feature sounds cool. I just had a try, found a problem, when
> merging a LVM snapshot:
> lvconvert says:
> Can't merge over open origin volume
> Merging of snapshot snap0 will start next activation.
> 
> The origin volume is open by QEMU, although the VM is already
> stoped(by Issuing 'stop' command in QEMU monitor)

Of course, you cannot do this while a VM is running (even stopped). To
revert to a snapshot, you need to destroy the domain, start the snapshot
merge with lvconvert (there's also the possibility to tag several
snapshot, and to revert all of them with a simple lvconvert --merge
@tag). Now, you need to de-activate/re-activate the LV, so the merge can
start (with lvchange -an vg/lv, lvchange -ay vg/lv). Then, libvirt could
restore the state of the domain, associated with the snapshot if the
domain was active at the time it was taken.

Regards

> LVM merging feature doesn't support merge when the origin volume is
> opened? 
> What's the mean of next activation? From the patch
> (http://people.redhat.com/msnitzer/patches/snapshot-merge/lvm2/LVM2-2.02.55/lvm-merge-onactivate.patch), looks like "lvchange --refresh orig_lvm" will active it? I did it, but no way...
> 

>         
> 

-- 
Daniel Berteaud
FIREWALL-SERVICES SARL.
Société de Services en Logiciels Libres
Technopôle Montesquieu
33650 MARTILLAC
Tel : 05 56 64 15 32
Fax : 05 56 64 15 32
Mail: daniel at firewall-services.com
Web : http://www.firewall-services.com




More information about the libvir-list mailing list