.TH lfs 1 "2009 Jan 29" Lustre "user utilities"
.SH NAME
-lfs \- Lustre utility to create a file with specific striping pattern, find the striping pattern of existing files
+lfs \- Lustre utility to create a file with specific striping pattern, find the striping pattern of existing files, do certain quota operations, and manage distributed namespace options for directories
.SH SYNOPSIS
.br
.B lfs
.br
.B lfs check <mds|osts|servers>
.br
-.B lfs df [-i] [-h] [--pool|-p <fsname>[.<pool>] [path]
+.B lfs df [-i] [-h] [--lazy] [--pool|-p <fsname>[.<pool>] [path]
.br
.B lfs fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
.br
\fB[[!] --stripe-count|-c [+-]<stripes>]
\fB[[!] --stripe-index|-i <index,...>]
\fB[[!] --stripe-size|-S [+-]N[kMG]]
+ \fB[[!] --layout|-L raid0,released]
\fB[--type |-t {bcdflpsD}] [[!] --gid|-g|--group|-G <gname>|<gid>]
\fB[[!] --uid|-u|--user|-U <uname>|<uid>] [[!] --pool <pool>]\fR
.br
.B lfs getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v]
\fB[--stripe-count|-c ] [--stripe-index|-i] [--mdt-index|-M]
\fB[--stripe-size|-S] [--directory|-d]
+ \fB[--layout|-L]
\fB[--pool|-p] [--recursive|-r] [--raw|-R] <dirname|filename> ...\fR
.br
.B lfs setstripe [--stripe-size|-S stripe_size] [--stripe-count|-c stripe_count]
.br
.B lfs data_version [-n] \fB<filename>\fR
.br
+.B lfs mkdir <--index|-i mdt_index> <dir>
+.br
.B lfs help
.SH DESCRIPTION
.B lfs
.B check
Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs)
.TP
-.B df [-i] [-h] [--pool|-p <fsname>[.<pool>] [path]
+.B df [-i] [-h] [--lazy] [--pool|-p <fsname>[.<pool>] [path]
Report filesystem disk space usage or inodes usage (with \fB-i\fR) of each
MDT/OST, or a subset of OSTs if a pool is specified with \fB-p\fR. By default
print the usage of all mounted Lustre filesystems, otherwise if \fBpath\fR is
specified print only the usage of that filesystem. If \fB-h\fR is given, the
output is printed in \fIh\fRuman readable format, using SI base-2 suffixes
for \fBM\fRega-, \fBG\fRiga-, \fBT\fRera-, \fBP\fReta-, or \fBE\fRxabytes.
+The \fB--lazy\fR/\fB-l\fR option skips any OST that is currently disconnected
+from the client. This avoids blocking the \fBdf\fR output if an OST is down,
+and only returns the space on the OSTs that can currently be accessed.
.TP
.B find
-To search the directory tree rooted at the given dir/file name for the files that match the given parameters: \fB--atime\fR (file was last accessed N*24 hours ago), \fB--ctime\fR (file's status was last changed N*24 hours ago), \fB--mtime\fR (file's data was last modified N*24 hours ago), \fB--obd\fR (file has an object on a specific OST or OSTs), \fB--size\fR (file has size in bytes, or \fBk\fRilo-, \fBM\fRega-, \fBG\fRiga-, \fBT\fRera-, \fBP\fReta-, or \fBE\fRxabytes if a suffix is given), \fB--type\fR (file has the type: \fBb\fRlock, \fBc\fRharacter, \fBd\fRirectory, \fBp\fRipe, \fBf\fRile, sym\fBl\fRink, \fBs\fRocket, or \fBD\fRoor (Solaris)), \fB--uid\fR (file has specific numeric user ID), \fB--user\fR (file owned by specific user, numeric user ID allowed), \fB--gid\fR (file has specific group ID), \fB--group\fR (file belongs to specific group, numeric group ID allowed). The option \fB--maxdepth\fR limits find to decend at most N levels of directory tree. The options \fB--print\fR and \fB--print0\fR print full file name, followed by a newline or NUL character correspondingly. Using \fB!\fR before an option negates its meaning (\fIfiles NOT matching the parameter\fR). Using \fB+\fR before a numeric value means \fIfiles with the parameter OR MORE\fR, while \fB-\fR before a numeric value means \fIfiles with the parameter OR LESS\fR.
+To search the directory tree rooted at the given dir/file name for the files that match the given parameters: \fB--atime\fR (file was last accessed N*24 hours ago), \fB--ctime\fR (file's status was last changed N*24 hours ago), \fB--mtime\fR (file's data was last modified N*24 hours ago), \fB--obd\fR (file has an object on a specific OST or OSTs), \fB--size\fR (file has size in bytes, or \fBk\fRilo-, \fBM\fRega-, \fBG\fRiga-, \fBT\fRera-, \fBP\fReta-, or \fBE\fRxabytes if a suffix is given), \fB--type\fR (file has the type: \fBb\fRlock, \fBc\fRharacter, \fBd\fRirectory, \fBp\fRipe, \fBf\fRile, sym\fBl\fRink, \fBs\fRocket, or \fBD\fRoor (Solaris)), \fB--uid\fR (file has specific numeric user ID), \fB--user\fR (file owned by specific user, numeric user ID allowed), \fB--gid\fR (file has specific group ID), \fB--group\fR (file belongs to specific group, numeric group ID allowed), \fB--layout\fR (file has a raid0 layout or is released). The option \fB--maxdepth\fR limits find to decend at most N levels of directory tree. The options \fB--print\fR and \fB--print0\fR print full file name, followed by a newline or NUL character correspondingly. Using \fB!\fR before an option negates its meaning (\fIfiles NOT matching the parameter\fR). Using \fB+\fR before a numeric value means \fIfiles with the parameter OR MORE\fR, while \fB-\fR before a numeric value means \fIfiles with the parameter OR LESS\fR.
.TP
.B getname [-h]|[path ...]
Report all the Lustre mount points and the corresponding Lustre filesystem
.B getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v]
\fB[--count | -c ] [--index | -i | --offset | -o ]
\fB[--pool | -p ] [--size | -s ] [--directory | -d ]
+ \fB[--layout | -L]
\fB[--recursive | -r ] [--raw | -R ] <dirname|filename>\fR
.br
List the striping information for a given filename or directory tree.
.BR --size ,
.BR --index ,
.BR --offset ,
+.BR --layout ,
or
.B --pool
can be used to return only the specific fields.
checked before and after an operation to be confident the data did not change
during it.
.TP
+.B mkdir <--index|-i mdt_index> <dir>
+Allocate a new directory on a specified MDT.
+
+The "lfs mkdir" command is only executable by root unless
+"mdt.*.enable_remote_dir_gid" is set via "lctl set_param" to be either a
+non-zero GID to limit it to a single group (e.g. "operator" or "admin"),
+or "-1" to allow any group to create remote directories.
+
+The root of the file system is on MDT0000, and directories and files inherit the
+MDT of their parent directory unless a different MDT is specified with this
+command.
+
+By default, only directories on MDT0000 can contain directories that are not on
+the same MDT. However, if "mdt.*.enable_remote_dir" is set non-zero on an MDT
+then it will allow creating remote directories that have parents other than
+MDT0000. This is restricted to avoid creating directory trees that have
+intermediate path components on a series different MDTs and become unavailable
+if any of the intermediate MDTs are offline.
+.TP
.B help
Provides brief help on the various arguments
.TP
.TP
.B $ lfs setquota -t -u --block-grace 1000 --inode-grace 1w4d /mnt/lustre
Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 days for inode quotas
+.TP
+.B $ lfs mkdir -i 1 new_directory
+Create directory 'new_directory' on the mdt with index 1.
.SH BUGS
The \fBlfs find\fR command isn't as comprehensive as \fBfind\fR(1).
.SH AUTHOR