1 .TH lfs 1 "2018-01-24" Lustre "user utilities"
3 lfs \- client utility for Lustre-specific file layout and other attributes
6 .B lfs changelog [--follow] <mdtname> [startrec [endrec]]
8 .B lfs changelog_clear <mdtname> <id> <endrec>
10 .B lfs check <mds|osts|servers>
12 .B lfs data_version [-n] \fB<filename>\fR
14 .B lfs df [-ihlv] [--pool|-p <fsname>[.<pool>]] [path]
16 .B lfs fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
18 .B lfs find \fR<\fIdirectory\fR|\fIfilename \fR...>
19 [[\fB!\fR] \fB--atime\fR|\fB-A\fR [\fB-+\fR]\fIn\fR]
20 [[\fB!\fR] \fB--ctime\fR|\fB-C\fR [\fB+-\fR]\fIn\fR]
21 [[\fB!\fR] \fB--mtime\fR|\fB-M\fR [\fB-+\fR]\fIn\fR]
22 [[\fB!\fR] \fB--component-count|\fB--comp-count\fR [\fB+-\fR]\fIn\fR]
23 [[\fB!\fR] \fB--component-flags|\fB--comp-flags\fR <[\fB^\fR]\fIflag\fB,\fR...>]
24 [[\fB!\fR] \fB--component-end|\fB--comp-end\fR|\fB-E\fR [\fB+-\fR]\fIn\fR[\fBKMGTPE\fR]]
25 [[\fB!\fR] \fB--component-start|\fB--comp-start\fR [\fB+-\fR]\fIn\fR[\fBKMGTPE\fR]]
26 [[\fB!\fR] \fB--gid\fR|\fB-g\fR|\fB--group\fR|\fB-G\fR <\fIgname\fR>|<\fIgid\fR>]
27 [[\fB!\fR] \fB--layout\fR|\fB-L mdt\fR,\fBraid0\fR,\fBreleased\fR]
28 [\fB--maxdepth\fR|\fB-D\fI n\fR]
29 [[\fB!\fR] \fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR <\fIuuid\fR|\fIindex\fR,...>]
30 [[\fB!\fR] \fB--mdt-count\fR|\fB-T\fR [\fB+-\fR]\fIn\fR]
31 [[\fB!\fR] \fB--mdt-hash\fR|\fB-H \fI<hashtype>\fR]
32 [[\fB!\fR] \fB--name\fR|\fB-n \fI<pattern>\fR]
33 [[\fB!\fR] \fB--ost\fR|\fB-O\fR <\fIuuid\fR|\fIindex\fR,...>]
34 [[\fB!\fR] \fB--pool\fR <\fIpool\fR>]
35 [\fB--print\fR|\fB-P\fR] [\fB--print0\fR|\fB-0\fR]
36 [[\fB!\fR] \fB--projid\fR |<\fIprojid\fR>]
37 [[\fB!\fR] \fB--size|\fB-s\fR [\fB-+\fR]\fIn\fR[\fBKMGTPE\fR]]
38 [[\fB!\fR] \fB--stripe-count|\fB-c\fR [\fB+-\fR]\fIn\fR]
39 [[\fB!\fR] \fB--stripe-index|\fB-i\fR \fIn\fR,...]
40 [[\fB!\fR] \fB--stripe-size|\fB-S\fR [\fB+-\fR]\fIn\fR[\fBKMG\fR]]
41 [[\fB!\fR] \fB--type\fR|\fB-t\fR {\fBbcdflps\fR}]
42 [[\fB!\fR] \fB--uid\fR|\fB-u\fR|\fB--user\fR|\fB-U
43 <\fIuname\fR>|<\fIuid>\fR]
45 .B lfs getname [-h]|[path ...]
48 [\fB--component-count\fR|\fB--comp-count\fR]
49 [\fB--component-end\fR[=[\fB+-\fR]\fIN\fR[kMGTPE]]|\fB-E\fR[[+-]\fIN\fR[kMGTPE]]]
50 [\fB--component-flags\fR[=[\fB^\fR]\fIflag\fB,\fR...]]
51 [\fB--component-id\fR[=\fIcomp_id\fR]|\fB-I\fR[<\fIcomp_id\fR>]]
52 [\fB--component-start\fR[=[\fB+-\fR]\fIN\fR[kMGTPE]]]
53 [\fB--directory\fR|\fB-d\fR]
54 [\fB--fid\fR|\fB-F\fR]
55 [\fB--generation\fR|\fB-g\fR]
56 [\fB--layout\fR|\fB-L\fR]
57 [\fB--mdt\fR|\fB--mdt-index\fR|\fB-m\fR]
58 [\fB--ost\fR|\fB-O\fR <\fIuuid\fR>]
59 [\fB--pool\fR|\fB-p\fR]
60 [\fB--quiet\fR|\fB-q\fR]
61 [\fB--recursive\fR|\fB-r\fR]
62 [\fB--raw\fR|\fB-R\fR]
63 [\fB--stripe-count\fR|\fB-c\fR]
64 [\fB--stripe-index\fR|\fB-i\fR]
65 [\fB--stripe-size\fR|\fB-S\fR]
66 [\fB--verbose\fR|\fB-v\fR]
67 [\fB--yaml\fR|\fB-y\fR]
68 <\fIdirname\fR|\fIfilename\fR> ...
70 .B lfs migrate { --mdt-index | -m } \fI<mdt_index>\fR
73 .B lfs migrate [\fB-c | --stripe-count <stripe_count>\fR]
74 [\fB-i | --stripe-index <start_ost_idx>\fR]
75 [\fB-S | --stripe-size <stripe_size>\fR]
76 [\fB-p | --pool <pool_name>\fR]
77 [\fB-o | --ost-list <ost_indices>\fR]
79 [\fB-n | --non-block\fR]
82 .B lfs migrate <\fB-E | --component-end comp_end1\fR> [\fBSTRIPE_OPTIONS\fR]
83 <\fB-E | --component-end comp_end2\fR> [\fBSTRIPE_OPTIONS\fR]
87 .B lfs mkdir [\fB-c | --count <stripe_count>\fR]
88 [\fB-i | --index <mdt_idx>\fR]
89 [\fB-h | --hash-type <hash_name>\fR]
90 [\fB-m | --mode <mode>\fR]
91 [\fB-D | --default\fR]
100 .B lfs path2fid [--parents] <path> ...
102 .B lfs pool_list <filesystem>[.<pool>] | <pathname>
104 .B lfs quota [-q] [-v] [-o obd_uuid|-I ost_idx|-i mdt_idx] [-u <uname>| -u <uid>|-g <gname>| -g <gid>] [-p <projid>] <filesystem>
106 .B lfs quota -t <-u|-g|-p> <filesystem>
108 .B lfs quotacheck [-ug] <filesystem>
110 .B lfs quotaon [-ugf] <filesystem>
112 .B lfs quotaoff [-ug] <filesystem>
114 .B lfs setstripe [--stripe-size|-S <size>] [--stripe-count|-c <count>]
115 \fB[--stripe-index|-i <start_ost_index>] [--pool|-p <poolname>]
116 \fB[--ost-list|-o <ost_indices>] <directory|filename>\fR
118 .B lfs setstripe -d <dir>
120 .B lfs setstripe --component-end|-E <end1> [STRIPE_OPTIONS]
121 [\fB--component-end|-E <end2> [STRIPE_OPTIONS]] ... <filename>\fR
123 .B lfs setstripe --component-add --component-end|-E <end1> [STRIPE_OPTIONS]
124 \fB<--component-end|-E <end2>> [STRIPE_OPTIONS]] ... <filename>\fR
126 .B lfs setstripe --component-del {--component-id|-I id |
127 \fB--component-flags <flags>} <filename>
129 .B lfs setstripe --yaml=<yaml_template_file> <filename>
133 .B lfs --list-commands
138 can be used to create a new file with a specific striping pattern, determine
139 the default striping pattern, gather the extended attributes (object numbers
140 and location) for a specific file. It can be invoked interactively without any
141 arguments or in a non-interactive mode with one of the arguments supported.
143 The various options supported by lfs are listed and explained below:
146 Show the metadata changes on an MDT. Start and end points are optional. The --follow option will block on new changes; this option is only valid when run direclty on the MDT node.
149 Indicate that changelog records previous to <endrec> are no longer of
150 interest to a particular consumer <id>, potentially allowing the MDT to
151 free up disk space. An <endrec> of 0 indicates the current last record.
152 Changelog consumers must be registered on the MDT node using \fBlctl\fR.
155 Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs)
157 .B data_version [-n] <filename>
158 Display current version of file data. If -n is specified, data version is read
159 without taking lock. As a consequence, data version could be outdated if there
160 is dirty caches on filesystem clients, but this will not force data flushes and
161 has less impact on filesystem.
163 Even without -n, race conditions are possible and data version should be
164 checked before and after an operation to be confident the data did not change
167 .B getname [-h]|[path ...]
168 Report all the Lustre mount points and the corresponding Lustre filesystem
169 instance. If one or more \fBpath\fR entries are provided, then only the
170 Lustre instance for these mount points is returned. If the path given is not on
171 a Lustre instance 'No such device' is reported.
175 List all the OSTs for all mounted filesystems. If a \fBpath\fR is provided
176 that is located on a lustre mounted file system then only the OSTs belonging
177 to that filesystem are displayed.
179 .B fid2path [--link <linkno>] <fsname|rootpath> <fid> ...
180 Print out the pathname(s) for the specified \fIfid\fR(s) from the filesystem
181 mounted at \fBrootpath\fR or named \fBfsname\fR. If a file has multiple
182 hard links, then all of the pathnames for that file are printed, unless
183 \fB--link\fR limits the printing to only the specified link number (starting
184 at 0, in no particular order). If multiple fids are specified, but only a
185 single pathname is needed for each file, use \fB--link 0\fR.
187 .B path2fid [--parents] <path> ...
188 Print out the FIDs for the specified \fBpath(s)\fR. If multiple pathnames
189 are given, then they will be printed one per line with the path as prefix.
190 The \fB--parents\fR switch makes it output the parent FID and name(s) of the
191 given entries. If an entry has multiple links, these are displayed on a single
195 .RI { filesystem }[ .poolname "] | {" pathname }
201 .IR filesystem.pool .
203 .B quota [-q] [-v] [-o obd_uuid|-i mdt_idx|-I ost_idx] [-u|-g|-p <uname>|<uid>|<gname>|<gid>|<projid>] <filesystem>
204 To display disk usage and limits, either for the full filesystem, or for objects on a specific obd. A user or group name or an ID can be specified. If user group and project are omitted quotas for current uid/gid/projid are shown. -v provides more verbose (with per-obd statistics) output. -q disables printing of additional descriptions (including column titles).
206 .B quota -t <-u|-g|-p> <filesystem>
207 To display block and inode grace times for user (-u) or group (-g) or project (-p) quotas
209 .B quotacheck [-ugf] <filesystem> (deprecated as of 2.4.0)
210 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.
212 .B quotaon [-ugf] <filesystem> (deprecated as of 2.4.0)
213 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>)
215 .B quotaoff [-ugf] <filesystem> (deprecated as of 2.4.0)
216 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>=""
218 .B swap_layouts <filename1> <filename2>
219 Swap the data (layout and OST objects) of two regular files. The
220 two files have to be in the same filesystem, owned by the same user,
221 reside on the same MDT and writable by the user.
223 Swapping the layout of two directories is not permitted.
226 lfs mkdir is documented in the man page: lfs-mkdir(1). NOTE:
228 is an alias of the command
232 lfs mv is deprecated, use lfs
240 See lfs-setstripe(1).
243 Output the build version of the lfs utility. Use "lctl lustre_build_version" to get the version of the Lustre kernel modules
246 Output a list of the commands supported by the lfs utility
249 Provides brief help on the various arguments
252 Quit the interactive lfs session
255 .B $ lfs check servers
256 Check the status of all servers (MDT, OST)
264 .B $ lfs quota -u bob /mnt/lustre
265 List quotas of user `bob'
267 .B $ lfs quota -t -u /mnt/lustre
268 Show grace times for user quotas on /mnt/lustre
270 .B $ lfs quotachown -i /mnt/lustre
271 Change file owner and group
273 .B $ lfs quotacheck -ug /mnt/lustre
274 Quotacheck for user and group - will turn on quotas after making the check.
276 .B $ lfs quotaon -ug /mnt/lustre
277 Turn quotas of user and group on
279 .B $ lfs quotaoff -ug /mnt/lustre
280 Turn quotas of user and group off
282 The usage of \fBlfs find\fR, \fBlfs getstripe\fR, \fBlfs hsm_*\fR,
283 \fBlfs setstripe\fR, \fBlfs migrate\fR, \fBlfs getdirstripe\fR,
284 \fBlfs setdirstripe\fR, \fBlfs mkdir\fR, and \fBlfs project\fR are explained
285 in separate man pages.
287 The lfs command is part of the Lustre filesystem.
292 .BR lfs-getstripe (1),
293 .BR lfs-getdirstripe (1),
299 .BR lfs-setdirstripe (1),
300 .BR lfs-setquota (1),
301 .BR lfs-setstripe (1),