Hide Forgot
Description of problem: as subject. Version-Release number of selected component (if applicable): libvirt-0.9.4-0rc2.el6.x86_64 How reproducible: always Steps to Reproduce: # virsh vol-list default --details Name Path Type Capacity Allocation ---------------------------------------------------------------------------- netfs-pool /var/lib/libvirt/images/netfs-pool file 0.00 0.00 rhel6.img /var/lib/libvirt/images/rhel6.img file 8.00 GB 1.62 GB rhel6.qcow2 /var/lib/libvirt/images/rhel6.qcow2 file 6.00 GB 2.06 GB test.img /var/lib/libvirt/images/test.img file 6.00 GB 1.59 GB win7.img /var/lib/libvirt/images/win7.img file 12.00 GB 12.01 GB # ls -l /var/lib/libvirt/images/ total 18125348 drwxr-xr-x. 2 nobody nobody 4096 Jul 28 03:16 netfs-pool -rw-------. 1 root root 8589934592 Sep 11 2010 rhel6.img -rw-rw-r--. 1 root root 2215182336 Jul 28 03:17 rhel6.qcow2 -rw-------. 1 qemu qemu 6442450944 Aug 1 02:34 test.img -rw-------. 1 qemu qemu 12884901888 Aug 1 02:41 win7.img Actual results: Directory 'netfs-pool' is listed as one of the volumes, and was specified as 'file' type. Expected results: Directory 'netfs-pool' shouldn't be listed as a volume. Additional info:
This bug was introduced by adding filesystem passthrough feature. commit 8077d64f964705c1034555abeea38773532b762f Author: Cole Robinson <crobinso> Date: Thu May 26 14:05:32 2011 -0400 storage: List directory volumes for dir/fs/netfs pools Since directories can be used for <filesystem> passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs v3: Use gnulib last_component v4: Use gnulib "dirname.h", not system <dirname.h> Don't skip lost+found
(In reply to comment #1) > This bug was introduced by adding filesystem passthrough feature. > > commit 8077d64f964705c1034555abeea38773532b762f > Author: Cole Robinson <crobinso> > Date: Thu May 26 14:05:32 2011 -0400 > > storage: List directory volumes for dir/fs/netfs pools > > Since directories can be used for <filesystem> passthrough, they are > basically storage volumes. Ok, then this is a feature. Closing as NOTABUG.
Hmm, I think I closed this too hastily. The directory is listed as type 'file', which isn't correct. I'm reopening so that can be changed.
Fixed with two upstream commits: commit 594f564c75601f5210af166683041873cb195555 Author: Peter Krempa <pkrempa> Date: Thu Aug 11 11:37:18 2011 +0200 virsh: Add dir type for listing volumes with vol-list Fix of output of detailed volume list. BZ #727088 commit 6c55124f37afdcd29551a38c681ecef85f8d5af8 Author: Peter Krempa <pkrempa> Date: Thu Aug 11 11:37:17 2011 +0200 storage: Directory shouldn't be listed as type 'file' Fix internals of libvirt for new storage volume type. Libvirt reported an invalid type of the volume. BZ #727088
Verified with libvirt-0.9.4-4.el6.x86_64, it's fixed already. # virsh vol-list default --details Name Path Type Capacity Allocation ---------------------------------------------------------------------------- foo-new.img /var/lib/libvirt/images/foo-new.img file 4.00 GB 136.00 KB foo.img /var/lib/libvirt/images/foo.img file 5.86 GB 2.07 GB netfs /var/lib/libvirt/images/netfs dir 0.00 0.00 rhel6.img /var/lib/libvirt/images/rhel6.img file 5.86 GB 1.75 GB test.img /var/lib/libvirt/images/test.img file 6.00 GB 1.42 GB win7.img /var/lib/libvirt/images/win7.img file 12.00 GB 12.00 GB
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: New storage type was added to libvirt, but the API was not tweaked to support it. Consequence: Directory type storage volumes were reported to be file storage volumes. Fix: The new volume type was added to the public API and the API was fixed to report correct values. Result: Volume type is correctly reported and displayed in associated tools.
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/RHBA-2011-1513.html