OS Manuals

lfs(1)

lfs - Lustre client utility for file layouts and space usage

LFS(1) Lustre User Utilities LFS(1)

lfs - Lustre client utility for file layouts and space usage

lfs COMMAND [ARGS]
lfs

lfs is used by all users to create new files with a specific layout pattern, show the layout (geomety and OST objects) for a specific file or directory, show the space and inode usage of filesystem targets, and more. It can be invoked non-interactivly to execute the specified COMMAND, or it can be run interactively without arguments to execute multiple commands.

The most common commands are: df, find, getstripe, setstripe, migrate, mirror, and project. Most commands are described in separate man pages of the form lfs-COMMAND as listed in the SEE ALSO section at the end. Some sub-commands do not have their own detailed man page are listed below.

The following options can be used to invoke lfs.

To get basic help on the meaning and syntax of a command.
Ignore errors during script processing.
Output a list of the commands supported by the lctl utility.
Output the build version of the utility itself.
Quit an interactive session.

The lfs command supports bash-completion(1) for tab completion of sub-command names and their options, with proper package installation and supporing shell usage. This can greatly simplify finding available commands, their options, and in many cases option arguments.

To list commands, type 'lfs TAB', or after partially completing a command name. To list long options (more descriptive and easily understood) type 'COMMAND --TAB', and to list short options type 'COMMAND -TAB'. Some commands also allow context-specific completion of arguments to the command-line option, for example generating a list of mountpoints for the df command, or a list of OST pools for the --pool option.

Display the status of the MGTs, MDTs or OSTs (as specified in the command) or all the servers (MGTs, MDTs and OSTs). If PATH is provided, display the status of the lustre file system mounted at specified PATH only. This command will make an RPC to all the servers in scope to discover the server status. NOTE: lfs osts may be preferable for some use cases.
Show the last modified version code for a file. See lfs-data_version(1).
Flush security context of a user. See lfs-flushctx(1).
Migrate a file to new OST(s), or directory to new MDTs. See lfs-migrate(1).
Create a directory with a specific layout or MDTs. See lfs-mkdir(1).
List all the MDTs for all mounted filesystems. If a PATH is provided that is located on a lustre mounted file system then only the MDTs belonging to that filesystem are displayed.
List all the OSTs for all mounted filesystems. If a PATH is provided that is located on a lustre mounted file system then only the OSTs belonging to that filesystem are displayed. This command will use a cached value for the OST status and will not make a RPC to discover status. The cached value will be updated by the client during the course of normal operations and would typically be less than 30 seconds old. NOTE: lfs check osts may be preferable for some use cases.
List the pools in FILESYSTEM or PATHNAME, or the OSTs in FILESYSTEM.POOL.
Shows or sets the PROJECT ID of a file or directory. See lfs-project(1).
Remove the name entry of a remote directory. This command will only delete the name entry, making the remote directory inaccessible. This can only be done by the administrator.
Swap the data (layout and OST objects) of two regular files. The two files have to be in the same filesystem, owned by the same user, reside on the same MDT and writable by the user.

Swapping the layout of two directories is not permitted.

Set the layout on a new file, or default on a directory. See lfs-setstripe(1).
Remove the foreign files/dirs that are prevented to be using regular unlink/rmdir commands/syscalls. Works also for regular files/dirs.

Check the status of all servers (MGT, MDT, OST):

# lfs check all

List all the OSTs:

# lfs osts

List all the MDTs:

# lfs mdts

The lfs command is part of the lustre(7) filesystem package since release 0.10.0

lfs-changelog(1), lfs-changelog_clear(1), lfs-data_version(1), lfs-df(1), lfs-fid2path(1), lfs-find(1), lfs-flushctx(1), lfs-getdirstripe(1), lfs-getname(1), lfs-getsom(1), lfs-getstripe(1), lfs-heat_get(1), lfs-heat_set(1), lfs-hsm(1), lfs-ladvise(1), lfs-migrate(1), lfs-mirror(1), lfs-mkdir(1), lfs-path2fid(1), lfs-pcc(1), lfs-project(1), lfs-quota(1), lfs-rm_entry(8), lfs-rmfid(1), lfs-setdirstripe(1), lfs-setquota(1), lfs-setstripe(1), lfs-somsync(1), lfs-swap_layouts(1), lfs-unlink_foreign(1), lustre(7), lctl(8)

2026-03-06 Lustre

lustre 2.17.59-r2 · enterprise-packages · ingested 2026-10-11