lfs(1)

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

SYNOPSIS
lfs changelog [--follow] <mdtname> [startrec [endrec]]
lfs changelog_clear <mdtname> <id> <endrec>
lfs check <mgts|mdts|osts|all> [path]
lfs data_version [-nrw] <filename>
lfs df [-ihlv] [--pool|-p <fsname>[.<pool>]] [path]
lfs fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
lfs find <directory|filename ...>
      [[!] --atime|-A [-+]n] [[!] --ctime|-C [+-]n]
      [[!] --mtime|-M [-+]n]
      [[!] --component-count|--comp-count [+-]n]
      [[!] --component-flags|--comp-flags <[^]flag,...>]
      [[!] --component-end|--comp-end|-E [+-]n[KMGTPE]]
      [[!] --component-start|--comp-start [+-]n[KMGTPE]]
      [[!] --mirror-count|-N [+-]n]
      [[!] --mirror-state <[^]state>]
      [[!] --gid|-g|--group|-G <gname>|<gid>]
      [[!] --layout|-L mdt,raid0,released] [--maxdepth|-D n]
      [[!] --mdt|--mdt-index|-m <uuid|index,...>]
      [[!] --mdt-count|-T [+-]n] [[!] --mdt-hash|-H <hashtype>]
      [[!] --name|-n <pattern>] [[!] --ost|-O <uuid|index,...>]
      [[!] --pool <pool>] [--print|-P] [--print0|-0]
      [[!] --projid |<projid>] [[!] --size|-s [-+]n[KMGTPE]]
      [[!] --stripe-count|-c [+-]n]
      [[!] --stripe-index|-i n,...]
      [[!] --extension-size|-ext-size|-z [+-]n[KMG]]
      [[!] --stripe-size|-S [+-]n[KMG]] [[!] --type|-t {bcdflps}]
      [[!] --uid|-u|--user|-U <uname>|<uid>]
lfs flushctx [--help|-h] [-k] [-r] [rootpath]
lfs getname [--help|-h] [--instance|-i] [--fsname|-n] [ path...]
lfs getstripe [--component-count|--comp-count]
        [--component-end|-E[=[+-]N[KMGTPE]]
        [--component-flags[=[^]flag,...]]
        [--component-id|-I [=comp_id]]
        [--component-start[=[+-]N[KMGTPE]]]
        [--directory|-d] [--fid|-F] [--generation|-g]
        [--layout|-L] [--mdt|--mdt-index|-m] [--ost|-O <uuid>]
        [--pool|-p] [--quiet|-q] [--recursive|-r]
        [--raw|-R] [--stripe-count|-c] [--stripe-index|-i]
        [--stripe-size|-S] [--extension-size|--ext-size|-z]
        [--verbose|-v] [--yaml|-y]
        <dirname|filename> ...
lfs migrate {--mdt-index|-m} <mdt_index> directory
lfs migrate [--stripe-count|-c <stripe_count>]
            [--stripe-index|-i <start_ost_idx>]
            [--stripe-size|-S <stripe_size>] [--pool|-p <pool_name>]
            [-o|--ost-list <ost_indices>] [--block|-b]
            [--non-block|-n] <file|directory>
lfs migrate <--component-end|-E comp_end1> [STRIPE_OPTIONS]
            <--component-end|-E comp_end2> [STRIPE_OPTIONS]
            ... filename
lfs mkdir [-c|--count <stripe_count>] [-i|--index <mdt_idx>]
          [-h|--hash-type <hash_name>] [-m|--mode <mode>]
          [-D|--default] directory
lfs osts [<path>]
lfs mdts [<path>]
lfs path2fid [--parents] <path> ...
lfs pool_list <filesystem>[.<pool>] | <pathname>
lfs setstripe [--stripe-size|-S <size>] [--stripe-count|-c <count>]
        [--stripe-index|-i <start_ost_index>] [--pool|-p <poolname>]
        [--extension-size|--ext-size|-z <ext_size>]
        [--ost-list|-o <ost_indices>] <directory|filename>
lfs setstripe -d <dir>
lfs setstripe --component-end|-E <end1> [STRIPE_OPTIONS]
             [--component-end|-E <end2> [STRIPE_OPTIONS]]
             ... <filename>
lfs setstripe --component-add -E <end1> [STRIPE_OPTIONS]
             [--component-end|-E <end2> [STRIPE_OPTIONS]]
             ... <filename>
lfs setstripe --component-del {--component-id|-I <id> |
                        --component-flags <flags>} <filename>
lfs setstripe --yaml=<yaml_template_file> <filename>
lfs unlink_foreign path[path...]
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.

data_version [-nrw] <filename>
    Display the current version of file data. If -n is specified, the data version is read without taking a lock. As a consequence, the data version could be outdated if there are dirty caches on filesystem clients, but this option will not force data flushes and has less of an impact on the filesystem. If -r is specified, the data version is read after dirty pages on clients are flushed. If -w is specified, the data version is read after all caching pages on clients are flushed. Even with -r or -w, race conditions are possible and the data version should be checked before and after an operation to be confident the data did not change during it. The data version is the sum of the last committed transaction numbers of all data objects of a file. It is used by HSM policy engines for verifying that file data has not been changed during an archive operation or before a release operation, and by OST migration, primarily for verifying that file data has not been changed during a data copy, when done in non-blocking mode.

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.

pool_list
    {filesystem}[.poolname] | {pathname} List the pools in filesystem or pathname, or the OSTs in filesystem.pool.

swap_layouts <filename1> <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

mv  lfs mv is deprecated, use lfs migrate instead.

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.

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

EXAMPLES

$ lfs check all
    Check the status of all servers (MGT, MDT, OST)

$ lfs osts
    List all the OSTs

$ lfs mdts
    List all the MDTs

$ lfs quotaoff -ug /mnt/lustre
    Turn quotas of user and group off

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.

AUTHOR
The lfs command is part of the Lustre filesystem.

SEE ALSO
lctl(8), lfs-changelog(1), lfs-changelog_clear(1), lfs-df(1), lfs-fid2path(1), lfs-find(1), lfs-flushctx(1), lfs-getdirstripe(1), lfs-getname(1), lfs-getstripe(1), lfs-hsm(1), lfs_migrate(1), lfs-migrate(1), lfs-mkdir(1), lfs-path2fid(1), lfs-pcc(1), lfs-project(1), lfs-quota(1), lfs-setdirstripe(1), lfs-setquota(1), lfs-setstripe(1), lustre(7)