Whamcloud - gitweb
LU-3363 api: HSM import uses new released pattern
[fs/lustre-release.git] / lustre / doc / lfs.1
index 4e703e8..8a976e6 100644 (file)
@@ -13,6 +13,8 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
 .br
 .B lfs df [-i] [-h] [--pool|-p <fsname>[.<pool>] [path]
 .br
+.B lfs fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
+.br
 .B lfs find <directory|filename>
         \fB[[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N] [[!] --ctime|-C [+-]N]
         \fB[--maxdepth|-D N] [[!] --mdt|-m <uuid|index,...>] [--name|-n pattern]
@@ -21,6 +23,7 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
         \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
@@ -29,6 +32,7 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
 .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]
@@ -40,6 +44,8 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
 .B lfs osts
 .RB [ path ]
 .br
+.B path2fid <path> ...
+.br
 .B lfs pool_list <filesystem>[.<pool>] | <pathname>
 .br
 .B lfs quota [-q] [-v] [-o obd_uuid|-I ost_idx|-i mdt_idx] [-u <uname>| -u <uid>|-g <gname>| -g <gid>] <filesystem>
@@ -48,14 +54,10 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
 .br
 .B lfs quotacheck [-ug] <filesystem>
 .br
-.B lfs quotachown [-i] <filesystem>
-.br
 .B lfs quotaon [-ugf] <filesystem>
 .br
 .B lfs quotaoff [-ug] <filesystem>
 .br
-.B lfs quotainv [-ug] [-f] <filesystem>
-.br
 .B lfs setquota <-u|--user|-g|--group> <uname|uid|gname|gid>
              \fB[--block-softlimit <block-softlimit>]
              \fB[--block-hardlimit <block-hardlimit>]
@@ -77,6 +79,9 @@ lfs \- Lustre utility to create a file with specific striping pattern, find the
              \fB[-b <block-grace>] [-i <inode-grace>]
              \fB<filesystem>\fR
 .br
+.br
+.B lfs swap_layouts <filename1> <filename2>
+.br
 .B lfs data_version [-n] \fB<filename>\fR
 .br
 .B lfs help
@@ -107,7 +112,7 @@ 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.
 .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
@@ -124,6 +129,7 @@ to that filesystem are displayed.
 .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.
@@ -133,6 +139,7 @@ only want specific striping information then the options of
 .BR --size ,
 .BR --index ,
 .BR --offset ,
+.BR --layout ,
 or
 .B --pool  
 can be used to return only the specific fields.
@@ -196,6 +203,18 @@ must be part of the pool or an error will be returned.
 .B setstripe -d
 Delete the default striping on the specified directory.
 .TP
+.B fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
+Print out the pathname(s) for the specified \fIfid\fR(s) from the filesystem
+mounted at \fBrootpath\fR or named \fBfsname\fR.  If a file has multiple
+hard links, then all of the pathnames for that file are printed, unless
+\fB--link\fR limits the printing to only the specified link number (starting
+at 0, in no particular order).  If multiple fids are specified, but only a
+single pathname is needed for each file, use \fB--link 0\fR.
+.TP
+.B path2fid <path> ...
+Print out the FIDs for the specified \fBpath(s)\fR.  If multiple pathnames
+are given, then they will be printed one per line with the path as prefix.
+.TP
 .B pool_list
 .RI { filesystem }[ .poolname "] | {" pathname }
 List the pools in 
@@ -211,20 +230,14 @@ To display disk usage and limits, either for the full filesystem, or for objects
 .B quota -t <-u|-g> <filesystem>
 To display block and inode grace times for user (-u) or group (-g) quotas
 .TP
-.B quotachown
-To change files' owner and group on OSTs of the specified filesystem
-.TP
-.B quotacheck [-ugf] <filesystem>
-To scan the specified filesystem for disk usage, and create or update quota files. Options specify quota for users (-u) groups (-g) and force (-f)
+.B quotacheck [-ugf] <filesystem> (deprecated as of 2.4.0)
+To scan the specified filesystem for disk usage, and create or update quota files. Options specify quota for users (-u) groups (-g) and force (-f). Not useful anymore with servers >= 2.4.0 since space accounting is always turned on.
 .TP
-.B quotaon [-ugf] <filesystem>
-To turn filesystem quotas on. Options specify quota for users (-u) groups (-g) and force (-f)
+.B quotaon [-ugf] <filesystem> (deprecated as of 2.4.0)
+To turn filesystem quotas on. Options specify quota for users (-u) groups (-g) and force (-f). Not used anymore in lustre 2.4.0 where quota enforcement must be enabled via conf_param (e.g. lctl conf_param ${FSNAME}.quota.<ost|mdt>=<u|g|ug>)
 .TP
-.B quotaoff [-ugf] <filesystem>
-To turn filesystem quotas off.  Options specify quota for users (-u) groups (-g) and force (-f)
-.TP
-.B quotainv [-ug] [-f] <filesystem>
-Clear quota files (administrative quota files if used without -f, operational quota files otherwise), all of their quota entries, for (-u) users or (-g) groups; after quotainv one must use quotacheck before using quotas. DO NOT USE THIS COMMAND UNLESS YOU REALLY KNOW WHAT IT DOES. IT IS MAINLY FOR INTERNAL PURPOSES.
+.B quotaoff [-ugf] <filesystem> (deprecated as of 2.4.0)
+To turn filesystem quotas off.  Options specify quota for users (-u) groups (-g) and force (-f). Not used anymore in lustre 2.4.0 where quota enforcement can be turned off (for inode or block) by running the following command on the MGS: lctl conf_param ${FSNAME}.quota.<ost|mdt>=""
 .TP
 .B setquota  <-u|-g> <uname>|<uid>|<gname>|<gid> [--block-softlimit <block-softlimit>] [--block-hardlimit <block-hardlimit>] [--inode-softlimit <inode-softlimit>] [--inode-hardlimit <inode-hardlimit>] <filesystem>
 To set filesystem quotas for users or groups. Limits can be specified with -b, -k, -m, -g, -t, -p suffixes which specify units of 1, 2^10, 2^20, 2^30, 2^40 and 2^50 accordingly. Block limits unit is kilobyte (1024) by default and block limits are always kilobyte-grained (even if specified in bytes), see EXAMPLES
@@ -232,6 +245,13 @@ To set filesystem quotas for users or groups. Limits can be specified with -b, -
 .B setquota -t [-u|-g] [--block-grace <block-grace>] [--inode-grace <inode-grace>] <filesystem>
 To set filesystem quota grace times for users or groups. Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds value, see EXAMPLES
 .TP
+.B 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.
+.TP
 .B data_version [-n] <filename>
 Display current version of file data. If -n is specified, data version is read
 without taking lock. As a consequence, data version could be outdated if there
@@ -307,9 +327,9 @@ Set quotas of user `bob': 1GB block quota hardlimit and 2 GB block quota softlim
 Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 days for inode quotas
 .SH BUGS
 The \fBlfs find\fR command isn't as comprehensive as \fBfind\fR(1).
-Report bugs using http://bugzilla.lustre.org.
 .SH AUTHOR
-The lfs command is part of the Lustre filesystem.  Contact http://www.lustre.org/
+The lfs command is part of the Lustre filesystem.
 .SH SEE ALSO
+.BR lfs-hsm (1),
 .BR lctl (8),
 .BR lustre (7)