lfs-df(1)

NAME
lfs-df - report Lustre filesystem disk usage

SYNOPSIS
lfs df [-i] [-h|-H] [--lazy|-l] [--pool|-p <fsname>[.<pool>]] [--verbose|-v] [path]

DESCRIPTION
lfs df displays filesystem usage information by default for each Lustre filesystem currently mounted on that node, or for the filesystem that contains path if given. It displays the current usage and totals for each MDT and OST separately, as well as a per-filesystem summary that matches df(1) output for each filesystem.

By default lfs df reports the space usage of the OSTs (the MDT space usage is shown only for reference). With -i it reports the inode (object) usage for each target and in the summary. For ZFS-backed targets, the IUsed count accurately reflects the number of in-use objects on each target, but the Inodes total and Free inode counts are estimated based on the current average (mean) space used per object on each target, and may fluctuate over time to reflect the current usage pattern of the target. The estimate becomes more accurate as the target becomes more full, assuming the usage pattern is consistent.

lfs df may also report additional target status as the last column in the display, if there are issues with that target. States include:

    D: degraded
        The target has a failed drive in the RAID device, or is undergoing RAID reconstruction. This state is marked on the server automatically for ZFS targets via zed(8), or a (user-supplied) script that monitors the target device and sets 'lctl set_param obdfilter.<target>.degraded=1' on the OST. This target will be avoided for new allocations, but will still be used for existing files located there or if there are not enough non-degraded OSTs to make up a widely-striped file.

    N: no-precreate
        The target is configured to deny object precreation by the 'lctl set_param obdfilter.<target>.no_precreate=1' parameter or '-o no_precreate' mount option. This may be done to add an OST to the filesystem without allowing objects to be allocated on it yet, or for other reasons.

    R: read-only
        The target filesystem is marked read-only due to filesystem corruption detected by ldiskfs or ZFS. No modifications are allowed on this OST, and it needs to have e2fsck(8) or zpool(8) scrub run to repair the underlying filesystem.

    S: out-of-space
        The target filesystem has less than the minimum required free space and will not be used for new object allocations until it has more free space.

    I: out-of-inodes
        The target filesystem has less than the minimum required free inodes and will not be used for new object allocations until it has more free inodes.

    f: flash
        The target filesystem is using a flash (non-rotational) storage device. This lower-case status is only shown in conjunction with the -v option, since it is not an error condition.

OPTIONS
The various options supported by lfs df are listed and explained below:

-h, --human-readable
    Print output in a human readable format (e.g. 16.3T, 4.25P). Suffixes are base-2 units (i.e. 1 GiB = 1024 MiB).

-H, --si
    Like -h, but suffixes are SI base-10 units (i.e. 1 GB = 1000 MB).

-i, --inodes
    Print information about the inode usage and totals for the MDTs and OSTs rather than space usage. Note that the Inodes total, IUsed, and IFree counts typically reflect the sum of values from the MDTs. If the total number of objects available on the OSTs is smaller (factoring in the filesystem default stripe_count, as one OST object is used for each stripe in a file) then the reported Inodes and IFree values will be reduced to reflect the minimum number of files that could potentially be created with the default stripe count. The actual total number of files that can be created may be different.

-l, --lazy
    Do not attempt to contact any OST or MDT not currently connected to the client. This avoids blocking the lfs df output if a target is offline or unreachable, and only returns the space on OSTs that can currently be accessed.

-p, --pool=[fsname.]pool
    Limit the usage to report only MDTs and OSTs that are in the specified pool. If multiple filesystems are mounted, list OSTs in pool for every filesystem, or limit the display to only a pool for a specific filesystem if fsname.pool is given. Specifying both the fsname and pool like:
    lfs df --pool=fsname.pool
    is equivalent to specifying the mountpoint for the given fsname:
    lfs df --pool=pool /mnt/fsname

-v, --verbose
    Show deactivated MDTs and OSTs in the listing, along with any additional status flags for each MDT and OST. By default, any MDTs and OSTs that are deactivated by the administrator are not shown. However, targets that are only temporarily inaccessible are still shown.

EXAMPLES

$ lfs df -hv /mnt/testfs
    Lists space usage per OST and MDT for the testfs filesystem in human readable format.

    UUID bytes Used Avail Use% Mounted on
    testfs-MDT0000_UUID 13.0G 1.2G 11.0G 10% /testfs[MDT:0]
    testfs-OST0000_UUID 3.6T 2.9T 585.7G 84% /testfs[OST:0]
    testfs-OST0001_UUID 3.6T 3.1T 472.5G 87% /testfs[OST:1] D
    testfs-OST0002_UUID 3.6T 3.0T 570.3G 84% /testfs[OST:2] DR
    OST0003 : inactive device
    testfs-OST0006_UUID 5.4T 4.9T 417.8G 92% /testfs[OST:3]
    filesystem_summary: 16.2T 13.8T 2.0T 88% /testfs

The above example output shows that OST0003 is currently temporarily inactive or offline, while OST0004 and OST0005 are not shown at all, either because they are marked permanently offline by the administrator (via lctl set_param -P osc.testfs-OST000[45].active=0) or they were never added to the filesystem. The testfs-OST0001 and testfs-OST0002 targets are currently marked Degraded (perhaps they both share the same underlying storage controller), while testfs-OST0002 is also marked Read-only, after detecting non-recoverable corruption in the backing filesystem.

$ lfs df -iH
    List inode usage per OST and MDT for all mounted Lustre filesystems.
    UUID Inodes IUsed IFree IUse% Mounted on
    testfs-MDT0000_UUID 932.2k 884.6k 47.6k 95% /testfs[MDT:0]
    testfs-OST0000_UUID 267.5k 179.6k 87.8k 67% /testfs[OST:0]
    testfs-OST0001_UUID 268.9k 173.5k 95.4k 64% /testfs[OST:1] D
    testfs-OST0002_UUID 267.5k 169.6k 97.9k 63% /testfs[OST:2] DR
    OST0003 : inactive device
    testfs-OST0006_UUID 426.1k 377.4k 48.7k 88% /testfs[OST:3]
    filesystem_summary: 932.1k 884.6k 47.6k 95% /testfs

$ lfs df --pool ssd /mnt/testfs
    List space usage for only the ssd pool of the testfs filesystem.

$ lfs df -v /mnt/testfs
    List all MDTs and OSTs for the testfs filesystem, even if not currently connected.

SEE ALSO
lfs(1), lustre(7)