LFS-DF(1)
π LFS-DF(1) β lfs-df π
Lustre User Utilities β¨ bestie edition, section 1 of the manual
β¨ NAME β¨
lfs-df β report Lustre filesystem disk usage πΎπ¦
π SYNOPSIS π
lfs df [-i] [-h|-H] [--lazy|-l] [--no-header|-N] [--only-summary|-s]
[--output|-u FIELD_LIST] [--pool|-p FSNAME[.POOL]] [--mdt|-m]
[--ost|-o] [--verbose|-v] [path]
πΈ DESCRIPTION πΈ
okay so listen. lfs df shows you filesystem usage info β and by default it does this for every single Lustre filesystem that's mounted on that node rn. Or, if you hand it a PATH, it'll show you just the filesystem that contains that PATH. no cap.
It breaks it all the way down: current usage and totals for each MDT and each OST separately, plus a per-filesystem summary that matches what df(1) gives you for each filesystem. π
By default, lfs df reports the SPACE usage of the OSTs (and the MDT space usage is shown only for reference, like a lil bonus). But with -i? Then it reports the INODE (object) usage for each target, and in the summary too.
Now here's the tea for ZFS-backed targets π«: the IUsed count accurately reflects the number of in-use objects on each target β fr fr accurate. But the Inodes total and Free inode counts are ESTIMATED, based on the current average (mean) space used per object on each target, and they may fluctuate over time to reflect the current usage pattern of the target. The estimate gets more accurate as the target gets more full, assuming the usage pattern stays consistent. so basically it gets better at guessing when it's stuffed. π
lfs df may also report additional target status as the last column in the display, if there's drama with that target. The 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 viazed(8), or a (user-supplied) script that monitors the target device and setslctl set_param obdfilter.TARGET.degraded=1on the OST. This target will be avoided for new allocations, but will still be used for existing files located there, or if there aren't enough non-degraded OSTs to make up a widely-striped file. πN: no-create β The target is configured to deny new OST object creation by thelctl set_param obdfilter.FSNAME-OSTXXXX.no_create=1option, or new subdirectory creation by thelctl set_param obdfilter.FSNAME-MDTXXXX.no_create=1parameter or the-o no_createmount option. This can be used to add an OST or MDT to the filesystem without allowing objects to be allocated on it yet, or for other reasons. very "i'm here but don't talk to me" energy π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 havee2fsck(8)orzpool(8)scrub run to repair the underlying filesystem. it's in its healing era, let it rest π©Ή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-voption, since it is not an error condition. (lowercase means it's just a vibe, not a problem β¨)
π OPTIONS π
The various options supported by lfs df are listed and explained below β every single one, bestie, we're not skipping:
-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). same energy, metric flavored β-i,--inodesβ Print information about the inode usage and totals for the MDTs and OSTs rather than space usage. Note that theInodestotal,IUsed, andIFreecounts 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 defaultstripe_count, as one OST object is used for each stripe in a file) then the reportedInodesandIFreevalues 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 thelfs dfoutput if a target is offline or unreachable, and only returns the space on OSTs that can currently be accessed. we're not waiting around, we're busy π-m,--mdt[=INDEX]β Filter output to show information on MDT devices. IfINDEXis specified, it must be attached to the option without a space, like"-mINDEX"or"--mdt=INDEX". For example:"-m0"or"--mdt=0". Can be used with-oto show both types of devices, which is equivalent to having neither option. π-N,--no-headerβ Suppress column headers in the output. This is useful for scripting and automation where only the data values are needed without the header line. When combined with--output,--ost, and--mdt, this allows for clean extraction of specific field values. scripts said "no small talk" π-s,--only-summaryβ Display only the filesystem summary line without showing individual MDT and OST entries. This provides a consolidated view of the total filesystem usage, Useful for monitoring scripts that only need overall filesystem statistics. just the highlight reel, periodt β¨-o,--ost[=INDEX]β Filter output to show information on OST devices. IfINDEXis specified, it must be attached to the option without a space, like"-oINDEX"or"--ost=INDEX". For example:"-o0"or"--ost=0". Can be used with-mto show both types of devices, which is equivalent to having neither option. π¦-u,--output=FIELD_LISTβ Print only the specified fields in a customizable format. This allows printing only specific fields, avoiding the need for complexawk(1)orgrep(1)parsing to extract values in test scripts and automation. Headers are shown when no specific OST or MDT index is specified. When a specific target index is given (e.g.,-o0or-m1), headers are suppressed for easier scripting. Field aliases are provided to match the column headings reported bydf(1). Available fields include:source(aliasdevice) β Display the UUID of the target device.size(aliastotal,btotal) β Display the total block space available (in KiB by default).used(aliasbused) β Display the used block space (in KiB by default).free(aliasbfree) β Display the free block space (in KiB by default).avail(aliasbavail) β Display the available block space (in KiB by default).pcent(aliasusepct,bpct,pct) β Display the percentage of used block space.itotal(aliasinodes) β Display the total number of inodes (in KiB by default).iusedβ Display the number of used inodes (in KiB by default).iavail(aliasifree) β Display the number of free inodes (in KiB by default).ipcent(aliasiusepct,ipct) β Display the percentage of used inodes.domainβ Display the failure-domain.targetβ Display the mount point path.stateβ Display the targetos_stateflags.
Fields are displayed in the order specified in FIELD_LIST. When using --output, both block and inode fields can be mixed in the same command, allowing users to see comprehensive statistics in a single view. mixing them? iconic behavior π
-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 ifFSNAME.POOLis 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 β¨
Okay bestie, this is the part where it all clicks. Sit with me π
Wanna see space usage per OST and MDT for the testfs filesystem, in human-readable format? Say less:
# lfs df -hv /mnt/testfs
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
So what is this output even telling us π 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 because they were never added to the filesystem. The testfs-OST0001 and testfs-OST0002 targets are currently marked Degraded (maybe they both share the same underlying storage controller? sharing is caring until it isn't π), while testfs-OST0002 is also marked Read-only, after detecting non-recoverable corruption in the backing filesystem. Not the glow-up we wanted.
Now for inode usage per OST and MDT across all mounted Lustre filesystems:
# lfs df -iH
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
Just the ssd pool of testfs? We got you π
# lfs df --pool ssd /mnt/testfs
Every single MDT and OST for testfs, even the ones that aren't currently connected (ghosting us, but we still count them) π
# lfs df -v /mnt/testfs
Only OST index 1 of testfs? Precisely. β¨
# lfs df -o1 /mnt/testfs
Custom fields, showing both block and inode stats at the same time, because why choose:
# lfs df --output=source,size,used,itotal,iused -h /mnt/lustre
UUID bytes Used Inodes IUsed
lustre-MDT0000_UUID 122.1M 1.6M 97.7K 275
lustre-OST0000_UUID 305.8M 1.4M 97.7K 302
lustre-OST0001_UUID 305.8M 1.4M 97.7K 302
filesystem_summary: 611.5M 2.7M 97.7K 275
Only available space and usage percentages β minimal, clean, iconic:
# lfs df --output=source,avail,pcent,iavail,ipcent /mnt/lustre
UUID Available Use% IFree IUse%
lustre-MDT0000_UUID 112156 2% 99725 1%
lustre-OST0000_UUID 284544 1% 99698 1%
lustre-OST0001_UUID 284544 1% 99698 1%
filesystem_summary: 569088 1% 99725 1%
Filesystem summary with the custom field order you picked yourself, main character energy:
# lfs df --output=pcent,avail,used,size,target /mnt/lustre
Use% Available Used 1K-blocks Mounted on
2% 112156 1664 125056 /mnt/lustre[MDT:0]
1% 284544 1400 313104 /mnt/lustre[OST:0]
1% 284544 1400 313104 /mnt/lustre[OST:1]
1% 569088 2800 626208 /mnt/lustre
Single field output with headers, for all targets:
# lfs df --output=avail /mnt/lustre
Available
112156
284544
284544
569088
Multiple fields with headers, obviously:
# lfs df --output=source,avail /mnt/lustre
UUID Available
lustre-MDT0000_UUID 112156
lustre-OST0000_UUID 284544
lustre-OST0001_UUID 284544
filesystem_summary: 569088
Multiple fields, but no headers and no filesystem summary β stripped down, no notes:
# lfs df --output=source,avail --no-header /mnt/lustre
lustre-MDT0000_UUID 112156
lustre-OST0000_UUID 284544
lustre-OST0001_UUID 284544
OST available space, no headers (super useful when you're hunting for the minimum, iykyk):
# lfs df --output=avail --no-header -o /mnt/lustre
284544
284544
Single field for target OST1, no headers β this one is made for scripting, fr fr:
# lfs df --output=avail --ost=1 /mnt/lustre
284544
And if literally all you want is the filesystem summary and nothing else, periodt:
# lfs df --only-summary /mnt/lustre
filesystem_summary: 626208 2800 569088 1% /mnt/lustre
AVAILABILITY π
lfs df is part of the lustre(7) filesystem package since release 1.4.0. Been here since before some of us could walk π«Ά
SEE ALSO π
That's the whole page bestie, go check your free space before it checks you π This one comes straight from the Lustre docs, dated 2024-08-15 β drink water, run lfs df -h, slay β¨π
π¦ where this page comes from
- ubuntu stonking: lustre-client-utils 2.17.58+dfsg-0ubuntu2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms