On Tue, Jul 06, 2010 at 12:16:13AM +1000, Justin Clift wrote:
This patch adds a new --details option to the virsh vol-list
command, making its output more useful when many luns are
present.
Addresses BZ # 605543
https://bugzilla.redhat.com/show_bug.cgi?id=605543
---
This is the v5 patch changed to have a space between the value and unit
size for capacity related output. ie:
1.40 TB
Additionally, this version copes with storage pools that are not active,
unlike the v5 patch.
Example output:
virsh # vol-list default --details
Name Path
Type Capacity Allocation
--------------------------------------------------------------------------------------------------------------------------------------------------
Fedora-12-x86_64-DVD.iso
/var/lib/libvirt/images/Fedora-12-x86_64-DVD.iso file 3.29 GB
3.30 GB
Fedora-13-x86_64-DVD.iso
/var/lib/libvirt/images/Fedora-13-x86_64-DVD.iso file 3.38 GB
3.38 GB
RHEL6.0-20100622.1-Server-i386-DVD1.iso
/var/lib/libvirt/images/RHEL6.0-20100622.1-Server-i386-DVD1.iso file 3.42 GB
3.43 GB
RHEL6.0-20100622.1-Server-x86_64-DVD1.iso
/var/lib/libvirt/images/RHEL6.0-20100622.1-Server-x86_64-DVD1.iso file 3.91 GB
3.91 GB
RHEL6.0-20100622.1-Workstation-i386-DVD1.iso
/var/lib/libvirt/images/RHEL6.0-20100622.1-Workstation-i386-DVD1.iso file 3.42 GB
3.42 GB
RHEL6.0-20100622.1-Workstation-x86_64-DVD1.iso
/var/lib/libvirt/images/RHEL6.0-20100622.1-Workstation-x86_64-DVD1.iso file 3.90 GB
3.91 GB
virsh #
Example output when no volumes are in a pool:
virsh # vol-list tmp
Name Path
-----------------------------------------
virsh # vol-list tmp --details
Name Path Type Capacity Allocation
--------------------------------------
virsh #
tools/virsh.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++-------
tools/virsh.pod | 4 +-
2 files changed, 232 insertions(+), 31 deletions(-)
ACK
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://deltacloud.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|