list filesystems
This inspection command looks for filesystems on partitions, block devices and logical volumes, returning a list of mountables
containing filesystems and their type.
The return value is a hash, where the keys are the devices containing filesystems, and the values are the filesystem types. For example:
<![CDATA["/dev/sda1" => "ntfs"]]>
<![CDATA["/dev/sda2" => "ext2"]]>
<![CDATA["/dev/vg_guest/lv_root" => "ext4"]]>
<![CDATA["/dev/vg_guest/lv_swap" => "swap"]]>
The key is not necessarily a block device. It may also be an opaque ‘mountable’ string which can be passed to mount.
The value can have the special value "unknown", meaning the content of the device is undetermined or empty. "swap" means a Linux swap partition.
In libguestfs ≤ 1.36 this command ran other libguestfs commands, which might have included mount and umount, and therefore you had to use this soon after launch and only when nothing else was mounted. This restriction is removed in libguestfs ≥ 1.38.
Not all of the filesystems returned will be mountable. In particular, swap partitions are returned in the list. Also this command does not check that each filesystem found is valid and mountable, and some filesystems might be mountable but require special options. Filesystems may not all belong to a single logical operating system (use inspect_os to look for OSes).
this |
A GuestfsSession object |
a GHashTable of results, or NULL on error |