* configure.ac: Changed version to 0.3.2.9.
[virt-top.git] / virt-df / README
1 $Id$
2
3 virt-df is a 'df' tool for printing out the used and available disk
4 space in all active and inactive domains.  Without this tool you would
5 need to log in to each domain individually or set up monitoring.
6
7 It is only a proof-of-concept.  Please bare in mind the following
8 limitations when using this tool:
9
10 (1) It does not work over remote connections.  Part of the reason why
11 I wrote virt-df was to get an idea of how the remote storage API for
12 libvirt might look.
13
14 (2) It only understands a limited set of partition types.  Assuming
15 that the files and partitions that we get back from libvirt / Xen
16 correspond to block devices in the guests, we can go some way towards
17 manually parsing those partitions to find out what they contain.  We
18 can read the MBR, LVM, superblocks and so on.  However that's a lot of
19 parsing work, and currently there is no library which understands a
20 wide range of partition schemes and filesystem types (not even
21 libparted which doesn't support LVM yet).  The Linux kernel does
22 support that, but there's not really any good way to access that work.
23
24 The current implementation uses a hand-coded parser which understands
25 some simple formats (MBR, LVM2, ext2/3).  In future we should use
26 something like libparted.
27
28 (3) The statistics you get are delayed.  The real state of, for
29 example, an ext2 filesystem is only stored in the memory of the
30 guest's kernel.  The ext2 superblock contains some meta-information
31 about blocks used and free, but this superblock is not up to date.  In
32 fact the guest kernel may not update it even on a 'sync', not until
33 the filesystem is unmounted.  Some operations do appear to write the
34 superblock, for example fsync(2) [that is my reading of the ext2/3
35 source code at least].