LFS(1)

NAME
lfs - client utility for Lustre-specific file layout and other attributes

SYNOPSIS
lfs
lfs --version
lfs --list-commands
lfs help

DESCRIPTION
lfs can be used to create a new file with a specific striping pattern, determine the default striping pattern, gather the extended attributes (object numbers and location) for a specific file. It can be invoked interactively without any arguments or in a non-interactive mode with one of the arguments supported.

COMMANDS
A number of sub-commands supported by lfs are listed below. Other commands are described in separate man pages of the form lfs-COMMAND as listed in the SEE ALSO section at the end.

check {mgts|mdts|osts|all} [PATH]
    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
    See lfs-data_version(1).

flushctx
    See lfs-flushctx(1).

osts [PATH]
    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.

mdts [PATH]
    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.

pool_list {FILESYSTEM}[.POOLNAME] | {PATHNAME}
    List the pools in FILESYSTEM or PATHNAME, or the OSTs in FILESYSTEM.POOL.

swap_layoutsFILENAME1 FILENAME2
    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.

mkdir
    lfs mkdir is documented in the man page: lfs-mkdir(1). NOTE: lfs setdirstripe is an alias of the command lfs mkdir

migrate
    See lfs-migrate(1).

setstripe
    See lfs-setstripe(1).

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

rm_entry | rmentry
    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.

--version
    Output the build version of the lfs utility. Use "lctl lustre_build_version" to get the version of the Lustre kernel modules

--list-commands
    Output a list of the commands supported by the lfs utility

help
    Provides brief help on the various arguments

exit/quit
    Quit the interactive lfs session

NOTES
The usage of lfs find, lfs getstripe, lfs hsm_*, lfs setstripe, lfs migrate, lfs getdirstripe, lfs setdirstripe, lfs mkdir, lfs flushctx, lfs changelog, lfs changelog_clear and lfs project are explained in separate man pages.

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
The lfs command is part of the lustre(7) filesystem package since release 0.10.0

SEE ALSO
lctl(8), 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_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)