[Libguestfs] [RFC] Inconsistent output of guestfs_list_filesystems

Richard W.M. Jones rjones at redhat.com
Tue Jan 23 13:09:04 UTC 2018


On Tue, Jan 23, 2018 at 02:26:38PM +0200, Nikolay Ivanets wrote:
> 2018-01-23 12:11 GMT+02:00 Richard W.M. Jones <rjones at redhat.com>:
> > On Tue, Jan 23, 2018 at 12:44:10AM +0200, Mykola Ivanets wrote:
> >> Before I rush to change something I request your comments on the subject.
> >> Let me know what do you think and if it does make sense.
> >>
> >> The issue: guesfs_list_filesystems is inconsistent in its output.
> >
> > The concept of guestfs_list_filesystem is that it returns a list
> > something like the list that running ‘df’ inside a traditional Unix
> > would return, ie. a list of mounted filesystems backed by real
> > devices, plus swap.
> >
> > That's not an exact definition.  A better way to understand it might
> > be to look at how it is is used (ie. ‘git grep list[-_]filesystems’).
> 
> Isn't more like 'lsblk' rather than 'df'?  Because 'df' is useless
> with unmounted
> file systems where is 'lsblk' discovers all available block devices.

It's not really precisely like either.  ‘lsblk’ lists partitioned
devices too).  ‘df’ on a guest would probably not list other OS
filesystems for a multi-boot OS.  Best to look at how the API is used
to understand it.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list