On Thu, May 15, 2008 at 02:54:53PM +0100, Daniel P. Berrange wrote:
> This version supports most common filesystems and partitioning
> schemes, including:
> - Linux ext2/3
> - DOS FAT32
> - Windows NTFS
> - Linux LVM2 (volume groups and logical volumes)
> - Primary and extended disk partitions
> - Linux swap
> - Linux suspend partition
I'm assuming this only works for raw file & block devices ? Are you planning
to support the funky QCow / VMDK formats too ?
Yes, interesting point. Since I always use flat files or straight
partitions for my guests I admit I hadn't given this much thought :-)
However support for these formats is just a matter of decoding enough
of the structure to enable the same mappings to be made in the
'virt-df' library, same as for LVM2 or indeed MBR partitions now.
I'll take a look at it. IIRC there are several different undocumented
variations on the QCow format?
The other thing that could be annoying is that Fedora 9 support for
encrypting all volumes - might need to prompt for a decryption key
for that.
Yes -- any encrypted volumes aren't going to work at the moment, and
couldn't work unless there was a way to access the passphrase.
> Included also is an experimental command line tool called
'diskzip'
> which intelligently compresses disk images by leaving out the bits
> which aren't actually used in the filesystems / partitions / volume
> groups contained within.
That's pretty neat. Which file systems does that work for ? VMWare have
a funky guest tool which tries to let you get to a similar point. It works
by basically openning a file inside the guest VM and filling it with zeros
until the entire disk is full. THeir backend can then detect and discard
all the sectors with zeros. Understanding the filesystem metdata is a much
nicer way todo this :-)
It works with most of the formats supported by virt-df. For MBR & LVM
once you've parsed the partition tables / LVM metadata, then the
information you need just falls out naturally. For NTFS & DOS FAT
(you won't believe it but ...) you need to find the allocation
bitmaps/tables in both cases in order to calculate blocks used/free
for df anyway. For ext2 it's a little bit more tricky because one
needs to additionally parse the group block free bitmaps [this bit
doesn't work at the moment, but is in principle very simple to add].
Rich.
--
Richard Jones, Emerging Technologies, Red Hat
http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top