Red Hat Bugzilla – Bug 879780
vol-clone failed to clone LVM volumes
Last modified: 2013-02-21 02:27:42 EST
Description of problem: After upgrading libvirt from 0.9.10 to 1.0.0 vol-clone is not working anymore with LVM volumes. Downgrading libvirt to the latest 0.9 series (0.9.13) works fine. Version-Release number of selected component (if applicable): libvirt 1.0.0 qemu 1.2 How reproducible: clone an existing LVM volume: vol-clone --pool storage vs1 vs12 Actual results: virsh # vol-clone --pool storage vs1 vs12 error: Failed to clone vol from vs1 error: belső hiba: Child process (/usr/bin/qemu-img convert -f raw -O none /dev/storage/vs1 /dev/storage/vs12) unexpected exit status 1: 2012-11-24 10:10:25.786+0000: 20306: debug : virFileClose:72 : Closed fd 27 2012-11-24 10:10:25.786+0000: 20306: debug : virFileClose:72 : Closed fd 29 2012-11-24 10:10:25.786+0000: 20306: debug : virFileClose:72 : Closed fd 25 2012-11-24 10:10:25.786+0000: 20306: debug : virCommandHook:2119 : Hook is done 0 qemu-img: Unknown file format 'none'
Reproducible with libvirt-0.10.2-9.el6 as well. Proposed upstream patch: https://www.redhat.com/archives/libvir-list/2012-November/msg01055.html
Fixed upstream by: commit 70f0bbe8e046dae1b811378f735872d3e61f4609 Author: Ján Tomko <jtomko@redhat.com> AuthorDate: 2012-11-25 02:59:33 +0100 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: 2012-11-26 14:01:29 +0100 storage: fix logical volume cloning Downstream backport: http://post-office.corp.redhat.com/archives/rhvirt-patches/2012-November/msg00266.html
I can reproduce this with build: libvirt-0.10.2-9.el6.x86_64 verify with: libvirt-0.10.2-10.el6.x86_64 step: 1: create a lvm pool # virsh pool-dumpxml lvm <pool type='logical'> <name>lvm</name> <uuid>a2dc4aad-ff27-41d5-f598-612dbfe91620</uuid> <capacity unit='bytes'>20967325696</capacity> <allocation unit='bytes'>11811160064</allocation> <available unit='bytes'>9156165632</available> <source> <device path='/dev/sda2'/> <name>vg_virt</name> <format type='lvm2'/> </source> <target> <path>/dev/vg_virt</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> 2: clone lvm vol # virsh vol-clone --pool lvm vgtest1 vgtest3 Vol vgtest3 cloned from vgtest1 # virsh vol-list lvm Name Path ----------------------------------------- vgtest1 /dev/vg_virt/vgtest1 vgtest2 /dev/vg_virt/vgtest2 vgtest3 /dev/vg_virt/vgtest3 vgtest3 created w/o error, verification passed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0276.html