Red Hat Bugzilla – Bug 1110198
domblkinfo doesn't work when guest use glusterfs as source
Last modified: 2015-03-05 02:37:42 EST
Description of problem: domblkinfo doesn't work when guest use glusterfs as source Version-Release number of selected component (if applicable): libvirt-1.1.1-29.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. prepare guest with glusterfs as source # virsh dumpxml rhel7|grep disk -A 5 <disk type='network' device='disk'> <driver name='qemu' type='qcow2'/> <source protocol='gluster' name='gluster-vol1/rhel7-qcow2.img'> <host name='10.66.4.xxx' port='24007'/> </source> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> # qemu-img info gluster://10.66.4.xxx/gluster-vol1/rhel7-qcow2.img image: gluster://10.66.4.xxx:24007/gluster-vol1/rhel7-qcow2.img file format: qcow2 virtual size: 5.0G (5368709120 bytes) disk size: 1.1G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: false 2.check guest block device size info # virsh domblkinfo rhel7 vda error: cannot stat file 'gluster-vol1/rhel7-qcow2.img': Bad file descriptor Actual results: Expected results: #virsh domblkinfo rhel7 vdb Capacity: 5368709120 Allocation: 1568709120 Physical: 1568709120 Additional info:
Fixed upstream: commit 3ea661deeabadc3c114dfb6f662b9fd17d714a01 Author: Peter Krempa <pkrempa@redhat.com> Date: Mon Jul 7 12:56:23 2014 +0200 qemu: refactor qemuDomainGetBlockInfo to work with remote storage The qemu block info function relied on working with local storage. Break this assumption by adding support for remote volumes. Unfortunately we still need to take a hybrid approach as some of the operations require a filedescriptor. Previously you'd get: $ virsh domblkinfo gl vda error: cannot stat file '/img10': Bad file descriptor Now you get some stats: $ virsh domblkinfo gl vda Capacity: 10485760 Allocation: 197120 Physical: 197120 $ git desc v1.2.6-63-g3ea661d
Verify this bug with libvirt-1.2.8-7.el7.x86_64 Steps: 1. define a guest based glusterfs storage # virsh dumpxml rhel7|grep disk -A 5 <disk type='network' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source protocol='gluster' name='gluster-vol1/s1.img'> <host name='10.66.6.111'/> </source> <target dev='vda' bus='virtio'/> .. 2. check block device size info # virsh domblkinfo rhel7 vda Capacity: 107374182400 Allocation: 198656 Physical: 198656
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