LFS(1) Lustre User Utilities LFS(1)

# [NAME](#NAME)

lfs - Lustre client utility for file layouts and space usage

# [SYNOPSIS](#SYNOPSIS)

`lfs` *COMMAND* \[*ARGS*]

`lfs`

# [DESCRIPTION](#DESCRIPTION)

**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.

# [OPTIONS](#OPTIONS)

The following options can be used to invoke **lfs**.

[**help COMMAND**](#help)

To get basic help on the meaning and syntax of a command.

[**--ignore\_errors**, **ignore\_errors**](#ignore_errors)

Ignore errors during script processing.

[**--list-commands**](#list-commands)

Output a list of the commands supported by the lctl utility.

[**-V**, **--version**](#V)

Output the build version of the utility itself.

[**exit**, **quit**](#exit)

Quit an interactive session.

# [BASH COMPLETION](#BASH_COMPLETION)

The **lfs** command supports [**bash-completion**(1)](/man/enterprise-packages/lustre/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.

# [COMMANDS](#COMMANDS)

[**check** {**mgts**|**mdts**|**osts**|**all**} \[***PATH*\]**](#check)

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.

[**data\_version**](#data_version)

Show the last modified version code for a file. See [**lfs-data\_version**(1)](/man/enterprise-packages/lustre/lfs-data_version.1).

[**flushctx**](#flushctx)

Flush security context of a user. See [**lfs-flushctx**(1)](/man/enterprise-packages/lustre/lfs-flushctx.1).

[**migrate**](#migrate)

Migrate a file to new OST(s), or directory to new MDTs. See [**lfs-migrate**(1)](/man/enterprise-packages/lustre/lfs-migrate.1).

[**mkdir**|**setdirstripe**](#mkdir)

Create a directory with a specific layout or MDTs. See [**lfs-mkdir**(1)](/man/enterprise-packages/lustre/lfs-mkdir.1).

[**mdts** \[**PATH**\]](#mdts)

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.

[**osts** \[**PATH**\]](#osts)

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.

[**pool\_list** {***FILESYSTEM*}\[*.POOLNAME*\] | {*PATHNAME*}**](#pool_list)

List the pools in *FILESYSTEM* or *PATHNAME*, or the OSTs in *FILESYSTEM.POOL*.

[**project**](#project)

Shows or sets the PROJECT ID of a file or directory. See [**lfs-project**(1)](/man/enterprise-packages/lustre/lfs-project.1).

[**rm\_entry** | **rmentry**](#rm_entry)

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\_layoutsFILENAME1 FILENAME2**](#swap_layouts)

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.

[**setstripe**](#setstripe)

Set the layout on a new file, or default on a directory. See [**lfs-setstripe**(1)](/man/enterprise-packages/lustre/lfs-setstripe.1).

[**unlink\_foreign**](#unlink_foreign)

Remove the foreign files/dirs that are prevented to be using regular unlink/rmdir commands/syscalls. Works also for regular files/dirs.

# [EXAMPLES](#EXAMPLES)

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

```
# lfs check all
```

List all the OSTs:

```
# lfs osts
```

List all the MDTs:

```
# lfs mdts
```

# [AVAILABILITY](#AVAILABILITY)

The **lfs** command is part of the [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7) filesystem package since release 0.10.0

# [SEE ALSO](#SEE_ALSO)

[**lfs-changelog**(1)](/man/enterprise-packages/lustre/lfs-changelog.1), [**lfs-changelog\_clear**(1)](/man/enterprise-packages/lustre/lfs-changelog_clear.1), [**lfs-data\_version**(1)](/man/enterprise-packages/lustre/lfs-data_version.1), [**lfs-df**(1)](/man/enterprise-packages/lustre/lfs-df.1), [**lfs-fid2path**(1)](/man/enterprise-packages/lustre/lfs-fid2path.1), [**lfs-find**(1)](/man/enterprise-packages/lustre/lfs-find.1), [**lfs-flushctx**(1)](/man/enterprise-packages/lustre/lfs-flushctx.1), [**lfs-getdirstripe**(1)](/man/enterprise-packages/lustre/lfs-getdirstripe.1), [**lfs-getname**(1)](/man/enterprise-packages/lustre/lfs-getname.1), [**lfs-getsom**(1)](/man/enterprise-packages/lustre/lfs-getsom.1), [**lfs-getstripe**(1)](/man/enterprise-packages/lustre/lfs-getstripe.1), [**lfs-heat\_get**(1)](/man/enterprise-packages/lustre/lfs-heat_get.1), [**lfs-heat\_set**(1)](/man/enterprise-packages/lustre/lfs-heat_set.1), [**lfs-hsm**(1)](/man/enterprise-packages/lustre/lfs-hsm.1), [**lfs-ladvise**(1)](/man/enterprise-packages/lustre/lfs-ladvise.1), [**lfs-migrate**(1)](/man/enterprise-packages/lustre/lfs-migrate.1), [**lfs-mirror**(1)](/man/enterprise-packages/lustre/lfs-mirror.1), [**lfs-mkdir**(1)](/man/enterprise-packages/lustre/lfs-mkdir.1), [**lfs-path2fid**(1)](/man/enterprise-packages/lustre/lfs-path2fid.1), [**lfs-pcc**(1)](/man/enterprise-packages/lustre/lfs-pcc.1), [**lfs-project**(1)](/man/enterprise-packages/lustre/lfs-project.1), [**lfs-quota**(1)](/man/enterprise-packages/lustre/lfs-quota.1), [**lfs-rm\_entry**(8)](/man/enterprise-packages/lustre/lfs-rm_entry.8), [**lfs-rmfid**(1)](/man/enterprise-packages/lustre/lfs-rmfid.1), [**lfs-setdirstripe**(1)](/man/enterprise-packages/lustre/lfs-setdirstripe.1), [**lfs-setquota**(1)](/man/enterprise-packages/lustre/lfs-setquota.1), [**lfs-setstripe**(1)](/man/enterprise-packages/lustre/lfs-setstripe.1), [**lfs-somsync**(1)](/man/enterprise-packages/lustre/lfs-somsync.1), [**lfs-swap\_layouts**(1)](/man/enterprise-packages/lustre/lfs-swap_layouts.1), [**lfs-unlink\_foreign**(1)](/man/enterprise-packages/lustre/lfs-unlink_foreign.1), [**lustre**(7)](/man/enterprise-packages/lustre/lustre.7), [**lctl**(8)](/man/enterprise-packages/lustre/lctl.8)

2026-03-06 Lustre

---

Document: lfs(1) from lustre 2.17.59-r2 (Chainguard OS)
Source: https://github.com/lustre/lustre-release
