Expand description

Use lfs_core::read_mounts to get information on all mounted volumes on a unix system.

// get all mount points
let mut mounts = lfs_core::read_mounts().unwrap();
// only keep the one with size stats
mounts.retain(|m| m.stats.is_some());
// print them
for mount in mounts {

The lfs application is a viewer for lfs-core and shows you the information you’re expected to find in mounts.


a “block device”, that is a device listed in the /sys/block tree with a device id

the list of all found block devices

Id of a device, as can be found in MetadataExt.dev().

what we have most looking like a physical device

inode information

the labelling of a file-system, that is the pair (label, fs)

A mount point

A mount point as described in /proc/self/mountinfo

inode & blocs information given by statvfs


lfs error type


try to find all file-system labels

read all the mount points

Read all the mount points and load basic information on them

Type Definitions

An id of a mount