[libvirt-users] recovering from deleted snapshot

Peter Krempa pkrempa at redhat.com
Fri Jun 30 14:55:19 UTC 2017


On Fri, Jun 30, 2017 at 10:41:25 -0400, doug.hughes at keystonenap.com wrote:
> sorry about top post, tablet mail client...
> 
> brilliant! that did it! Any idea what happened to cause it to partially fail and get into this state?

virsh blockcommit --pivot is actually 3 operations in sequence:
1) initiate the commit job
2) wait till it finishes
3) initiate the pivot job (this is synchronous, so the wait till it
finises is itegrated in the API call)

Apparently in your case the waiting part failed for some reason and thus
the job was not finished, lingering in the synchronised state.

The unfortunate part is that you don't know which operation failed.

Unfortunately it does not seem that we have wa waiting version of 'virsh
blockjob' that could be used to do the waiting. You can do the polling
manualy though.

The third operation can be split out by default, since you can specify
--wait instead of --pivot for 'virsh blockcommit' and it will finish
after step 2 above.

Also one of the cases which would help is that libvirt could actually
remove the file after commit, which would avoid the original problem,
since the file would still be there.

> oot at vm1 ~]# virsh blockjob serv1r2 vda
> Active Block Commit: [100 %]
> 
> [root at vm1 ~]# virsh blockjob --pivot serv1r2 vda
> 
> [root at vm1 ~]# 
> [root at vm1 ~]# ls -l /var/lib/libvirt/images/serv1r2.qcow2 
> -rw-r--r--. 1 qemu qemu 54200696832 Jun 30 10:39 /var/lib/libvirt/images/serv1r2.qcow2
> [root at vm1 ~]# date
> Fri Jun 30 10:39:12 EDT 2017
> [root at vm1 ~]# date
> Fri Jun 30 10:39:51 EDT 2017
> [root at vm1 ~]# ls -l /var/lib/libvirt/images/serv1r2.qcow2 
> -rw-r--r--. 1 qemu qemu 54200696832 Jun 30 10:40 /var/lib/libvirt/images/serv1r2.qcow2
> [root at vm1 ~]# 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170630/e2e70e37/attachment.sig>


More information about the libvirt-users mailing list