Bug 1088901
| Summary: | Fail to do external disk-only snapshot when guest use FC storage | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Shanzhi Yu <shyu> | ||||
| Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 7.0 | CC: | dyuan, mzhan, rbalakri, shyu, xuzhang, yanyang | ||||
| Target Milestone: | rc | Keywords: | TestOnly | ||||
| Target Release: | 7.1 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-05 07:34:31 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Could you please attach the debug log of the libvirt daemon when the issue reproduces? Created attachment 888796 [details]
libvirtd log
Verify this bug with libvirt-1.2.8-11.el7.x86_64
Steps as below:
1. Prepare a running domain with source file based on FC storage
# virsh dumpxml r7|grep disk -A 5
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/dev/mapper/mpatha'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
# virsh list
Id Name State
----------------------------------------------------
5 r7 running
2. Try to create external snapshot
# virsh snapshot-create-as r7 s1 --diskspec vda,file=/var/lib/libvirt/images/r7.s1 --disk-only
Domain snapshot s1 created
# virsh snapshot-create-as r7 s2 --diskspec vda,file=/var/lib/libvirt/images/r7.s2 --disk-only
Domain snapshot s2 created
# virsh snapshot-create-as r7 s3 --memspec file=/var/lib/libvirt/images/r7.mem.s3 --diskspec vda,file=/var/lib/libvirt/images/r7.s3
Domain snapshot s3 created
# virsh dumpxml r7|grep disk -A 16
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/var/lib/libvirt/images/r7.s3'/>
<backingStore type='file' index='1'>
<format type='qcow2'/>
<source file='/var/lib/libvirt/images/r7.s2'/>
<backingStore type='file' index='2'>
<format type='qcow2'/>
<source file='/var/lib/libvirt/images/r7.s1'/>
<backingStore type='block' index='3'>
<format type='qcow2'/>
<source dev='/dev/mapper/mpatha'/>
<backingStore/>
</backingStore>
</backingStore>
</backingStore>
<target dev='vda' bus='virtio'/>
# virsh snapshot-list r7
Name Creation Time State
------------------------------------------------------------
s1 2015-01-06 02:23:06 -0700 disk-snapshot
s2 2015-01-06 02:23:16 -0700 disk-snapshot
s3 2015-01-06 02:23:43 -0700 running
Succeed creating external snapshot, so verify this bug
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. https://rhn.redhat.com/errata/RHSA-2015-0323.html |
Description of problem: Fail to do external disk-only snapshot when guest use FC storage Version-Release number of selected component (if applicable): libvirt-0.10.2-33.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.424.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.define an mpath type pool on host with FC storage # virsh pool-dumpxml mpath <pool type='mpath'> <name>mpath</name> <uuid>a758ca5b-3b4b-1f01-9fb6-bbd39e4180f7</uuid> <capacity unit='bytes'>21481278464</capacity> <allocation unit='bytes'>21481278464</allocation> <available unit='bytes'>0</available> <source> </source> <target> <path>/dev/mapper</path> <permissions> <mode>0755</mode> <owner>-1</owner> <group>-1</group> </permissions> </target> </pool> # virsh vol-list mpath Name Path ----------------------------------------- dm-0 /dev/mapper/mpatha Create a guest storage in fc storage # qemu-img create -f qcow2 /dev/mapper/mpatha 100G # qemu-img info /dev/mapper/mpatha image: /dev/mapper/mpatha file format: qcow2 virtual size: 100G (107374182400 bytes) disk size: 0 cluster_size: 65536 2.define a guest with storage created in step1, install an rhel6.5 OS on guest. # virsh dumpxml test |grep disk -A 3 <disk type='block' device='disk'> <driver name='qemu' type='qcow2' cache='none' io='native'/> <source dev='/dev/mapper/mpatha'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> 3.after guest os boot up, create external disk-only snapshot # virsh snapshot-create-as test s1 --disk-only --diskspec vda,file=/tmp/s1.img error: internal error unable to execute QEMU command 'transaction': Could not open '/dev/mapper/mpatha': Permission denied 4. do external disk-only snapshot when guest is booting up # virsh destroy test;virsh start test;virsh snapshot-create-as test s1 --disk-only --diskspec vda,file=/tmp/s1.img Domain test destroyed Domain test started 5. check the snapshot info # virsh snapshot-current test <domainsnapshot> <name>s1</name> <state>disk-snapshot</state> <creationTime>1397734325</creationTime> <memory snapshot='no'/> <disks> <disk name='vda' snapshot='external'> <driver type='qcow2'/> <source file='/tmp/s1.img'/> </disk> </disks> <domain type='kvm'> .. # virsh snapshot-info test s1 Name: s1 Domain: test Current: yes State: disk-snapshot Location: external Parent: - Children: 0 Descendants: 0 Metadata: yes Domain snapshot s1 created Actual results: Expected results: should succeed creating external disk-only snapshot when guest is running. Additional info: error in log: 2014-04-17 08:30:24.826+0000: 17958: error : qemuMonitorJSONCheckError:357 : internal error unable to execute QEMU command 'transaction': Could not open '/dev/mapper/mpatha': Permission denied