Virt-df

Virt-df is df for virtual guests. Run the program on the host / dom0 to display disk space used and available on all partitions on all guests.

The current version understands most common filesystems: Linux EXT2/3, FAT, Windows NTFS, Linux LVM, MBR partitions, etc.

# virt-df -c qemu:///system -h
Filesystem                             Size       Used  Available Type
rhel51x32kvm:hda1                  96.8 MiB   14.6 MiB   82.2 MiB Linux ext2/3
rhel51x32kvm:VolGroup00/LogVol00    6.4 GiB    3.6 GiB    2.8 GiB Linux ext2/3
rhel51x32kvm:VolGroup00/LogVol01  992.0 MiB                       Linux swap

You can also run this on general disk images or disks:

# virt-df -t /dev/sda
Filesystem                        1K-blocks       Used  Available Type
/dev/sda:hda1                      25599996   11309448   14290552 Windows NTFS
/dev/sda:hda2                        992016      93772     898244 Linux ext2/3
/dev/sda:F9VG/F9Root               23316072    7818164   15497908 Linux ext2/3
/dev/sda:F9VG/F9Swap                1015808                       Linux swap
/dev/sda:RHEL51VG/RHEL51Root       22382184    7796640   14585544 Linux ext2/3
/dev/sda:RHEL51VG/RHEL51Swap        2031616                       Linux swap
/dev/sda:VolGroup/FAT32Test          916736          4     914676 DOS/Windows

Source and binaries

Source tarballs and various binaries for virt-df.

To access the source repository:

hg clone http://hg.et.redhat.com/virt/applications/virt-df--devel

The license is the GNU General Public License, version 2 or any later version (GPLv2+).

Diskimage library

Diskimage is a small library used by virt-df and other tools to analyze disk images and find out what's on them. It understands some common filesystems, DOS-style partitions, and LVM-style logical volumes. The source is currently included within the virt-df repository. Read the Diskimage developer documentation.


rjones AT redhat DOT com

$Id: index.html,v 1.3 2008/05/13 16:25:26 rjones Exp $