Whamcloud - gitweb
LUDOC-394 manual: remove 'dbdoclet.' from crossrefs
[doc/manual.git] / UserUtilities.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <chapter xmlns="http://docbook.org/ns/docbook"
3  xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US"
4  xmlns:xi="http://www.w3.org/2001/XInclude" xml:id="userutilities">
5   <title xml:id="userutilities.title">User Utilities</title>
6   <para>This chapter describes user utilities.</para>
7   <section xml:id="userutilities.lfs">
8     <title>
9       <indexterm>
10         <primary>lfs</primary>
11       </indexterm>
12       <literal>lfs</literal>
13     </title>
14     <para>The 
15     <literal>lfs</literal> utility can be used for user configuration routines
16     and monitoring.</para>
17     <section remap="h5">
18       <title>Synopsis</title>
19       <screen>
20 lfs
21 lfs changelog [--follow] <replaceable>mdt_name</replaceable> [startrec [endrec]]
22 lfs changelog_clear <replaceable>mdt_name id endrec</replaceable>
23 lfs check <replaceable>mds|osts|servers</replaceable>
24 lfs data_version [-nrw] <replaceable>filename</replaceable>
25 lfs df [-i] [-h] [--pool]-p <replaceable>fsname</replaceable>[.<replaceable>pool</replaceable>] [<replaceable>path</replaceable>] [--lazy]
26 lfs find [[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N]
27          [[!] --ctime|-C [-+]N] [--maxdepth|-D N] [--name|-n <replaceable>pattern</replaceable>]
28          [--print|-p] [--print0|-P] [[!] --obd|-O <replaceable>ost_name</replaceable>[,<replaceable>ost_name...</replaceable>]]
29          [[!] --size|-S [+-]N[kMGTPE]] --type |-t {bcdflpsD}]
30          [[!] --gid|-g|--group|-G <replaceable>gname|gid</replaceable>]
31          [[!] --uid|-u|--user|-U <replaceable>uname|uid</replaceable>]
32          <replaceable>dirname|filename</replaceable>
33 lfs getname [-h]|[path...]
34 lfs getstripe [--obd|-O <replaceable>ost_name</replaceable>] [--quiet|-q] [--verbose|-v]
35               [--stripe-count|-c] [--stripe-index|-i]
36               [--stripe-size|-s] [--pool|-p] [--directory|-d]
37               [--mdt-index|-M] [--recursive|-r] [--raw|-R]
38               [--layout|-L]
39               <replaceable>dirname|filename</replaceable> ...
40 lfs setstripe [--size|-s stripe_size] [--stripe-count|-c <replaceable>stripe_count</replaceable>]
41               [--overstripe-count|-C <replaceable>stripe_count</replaceable>]
42               [--stripe-index|-i <replaceable>start_ost_index</replaceable>]
43               [--ost-list|-o <replaceable>ost_indicies</replaceable>]
44               [--pool|-p <replaceable>pool</replaceable>]
45               <replaceable>dirname|filename</replaceable>
46 lfs setstripe -d <replaceable>dir</replaceable>
47 lfs osts [path]
48 lfs pool_list <replaceable>filesystem</replaceable>[.<replaceable>pool</replaceable>]| <replaceable>pathname</replaceable>
49 lfs quota [-q] [-v] [-h] [-o <replaceable>obd_uuid</replaceable>|-I <replaceable>ost_idx</replaceable>|-i <replaceable>mdt_idx</replaceable>]
50           [-u <replaceable>username|uid|-g</replaceable> <replaceable>group|gid</replaceable>|-p <replaceable>projid</replaceable>] <replaceable>/mount_point</replaceable>
51 lfs quota -t -u|-g|-p <replaceable>/mount_point</replaceable>
52 lfs setquota {-u|--user|-g|--group|-p|--project} <replaceable>uname|uid|gname|gid|projid</replaceable>
53              [--block-softlimit <replaceable>block_softlimit</replaceable>]
54              [--block-hardlimit <replaceable>block_hardlimit</replaceable>]
55              [--inode-softlimit <replaceable>inode_softlimit</replaceable>]
56              [--inode-hardlimit <replaceable>inode_hardlimit</replaceable>]
57              <replaceable>/mount_point</replaceable>
58 lfs setquota -u|--user|-g|--group|-p|--project <replaceable>uname|uid|gname|gid|projid</replaceable>
59              [-b <replaceable>block_softlimit</replaceable>] [-B <replaceable>block_hardlimit</replaceable>]
60              [-i <replaceable>inode-softlimit</replaceable>] [-I <replaceable>inode_hardlimit</replaceable>]
61              <replaceable>/mount_point</replaceable>
62 lfs setquota -t -u|-g|-p [--block-grace <replaceable>block_grace</replaceable>]
63              [--inode-grace <replaceable>inode_grace</replaceable>]
64              <replaceable>/mount_point</replaceable>
65 lfs setquota -t -u|-g|-p [-b <replaceable>block_grace</replaceable>] [-i <replaceable>inode_grace</replaceable>]
66              <replaceable>/mount_point</replaceable>
67 lfs help
68 </screen>
69       <note>
70         <para>In the above example, the 
71         <literal>
72           <replaceable>/mount_point</replaceable>
73         </literal> parameter refers to the mount point of the Lustre file
74         system.</para>
75       </note>
76       <note>
77         <para>The old lfs quota output was very detailed and contained
78         cluster-wide quota statistics (including cluster-wide limits for a
79         user/group and cluster-wide usage for a user/group), as well as
80         statistics for each MDS/OST. Now, 
81         <literal>lfs quota</literal> has been updated to provide only
82         cluster-wide statistics, by default. To obtain the full report of
83         cluster-wide limits, usage and statistics, use the 
84         <literal>-v</literal> option with 
85         <literal>lfs quota</literal>.</para>
86       </note>
87       <para condition="l28">
88        The <literal>quotacheck</literal>, <literal>quotaon</literal> and
89        <literal>quotaoff</literal> sub-commands were deprecated in the
90        Lustre 2.4 release, and removed completely in the Lustre 2.8 release.
91        See <xref linkend="enabling_disk_quotas"/> for details on
92        configuring and checking quotas.
93       </para>
94     </section>
95     <section remap="h5">
96       <title>Description</title>
97       <para>The 
98       <literal>lfs</literal> utility is used to create a new file with a
99       specific striping pattern, determine the default striping pattern, gather
100       the extended attributes (object numbers and location) for a specific
101       file, find files with specific attributes, list OST information or set
102       quota limits. It can be invoked interactively without any arguments or in
103       a non-interactive mode with one of the supported arguments.</para>
104     </section>
105     <section remap="h5">
106       <title>Options</title>
107       <para>The various 
108       <literal>lfs</literal> options are listed and described below. For a
109       complete list of available options, type help at the 
110       <literal>lfs</literal> prompt.</para>
111       <informaltable frame="all">
112         <tgroup cols="3">
113           <colspec colname="c1" colwidth="20*" />
114           <colspec colname="c2" colwidth="30*" />
115           <colspec colname="c3" colwidth="50*" />
116           <thead>
117             <row>
118               <entry nameend="c2" namest="c1">
119                 <para>
120                   <emphasis role="bold">Option</emphasis>
121                 </para>
122               </entry>
123               <entry>
124                 <para>
125                   <emphasis role="bold">Description</emphasis>
126                 </para>
127               </entry>
128             </row>
129           </thead>
130           <tbody>
131             <row>
132               <entry nameend="c2" namest="c1">
133                 <para>
134                   <literal>changelog</literal>
135                 </para>
136               </entry>
137               <entry>
138                 <para>Shows the metadata changes on an MDT. Start and end
139                 points are optional. The 
140                 <literal>--follow</literal> option blocks on new changes; this
141                 option is only valid when run directly on the MDT node.</para>
142               </entry>
143             </row>
144             <row>
145               <entry nameend="c2" namest="c1">
146                 <para>
147                   <literal>changelog_clear</literal>
148                 </para>
149               </entry>
150               <entry>
151                 <para>Indicates that changelog records previous to 
152                 <literal>
153                   <replaceable>endrec</replaceable>
154                 </literal> are no longer of interest to a particular consumer 
155                 <literal>
156                   <replaceable>id</replaceable>
157                 </literal>, potentially allowing the MDT to free up disk space.
158                 An 
159                 <literal>
160                   <replaceable>endrec</replaceable>
161                 </literal> of 0 indicates the current last record. Changelog
162                 consumers must be registered on the MDT node using 
163                 <literal>lctl</literal>.</para>
164               </entry>
165             </row>
166             <row>
167               <entry nameend="c2" namest="c1">
168                 <literal>check</literal>
169               </entry>
170               <entry>
171                 <para>Displays the status of MDS or OSTs (as specified in the
172                 command) or all servers (MDS and OSTs).</para>
173               </entry>
174             </row>
175             <row>
176               <entry nameend="c2" namest="c1">
177                 <para>
178                   <literal>data_version [-nrw]
179                   <replaceable>filename</replaceable></literal>
180                 </para>
181               </entry>
182               <entry>
183                 <para>Displays the current version of file data. If
184                 <literal>-n</literal> is specified, the data version is read
185                 without taking a lock. As a consequence, the data version could
186                 be outdated if there are dirty caches on filesystem clients, but
187                 this option will not force data flushes and has less of an
188                 impact on the filesystem. If <literal>-r</literal> is specified,
189                 the data version is read after dirty pages on clients are
190                 flushed. If <literal>-w</literal> is specified, the data version
191                 is read after all caching pages on clients are flushed.
192                 </para>
193                 <para>
194                 Even with <literal>-r</literal> or <literal>-w</literal>, race
195                 conditions are possible and the data version should be checked
196                 before and after an operation to be confident the data did not
197                 change during it.
198                 </para>
199                 <para>
200                 The  data  version is the sum of the last committed transaction
201                 numbers of all data objects of a file. It is used by HSM policy
202                 engines for verifying that file data has not been changed during
203                 an archive operation or before a release operation, and by OST
204                 migration, primarily for verifying that file data has not been
205                 changed during a data copy, when done in non-blocking mode.
206                 </para>
207               </entry>
208             </row>
209             <row>
210               <entry nameend="c2" namest="c1">
211                 <literal>df [-i] [-h] [--pool|-p 
212                 <replaceable>fsname</replaceable>[.
213                 <replaceable>pool</replaceable>] [
214                 <replaceable>path</replaceable>] [--lazy]</literal>
215               </entry>
216               <entry>
217                 <para>Use 
218                 <literal>-i</literal> to report file system disk space usage or
219                 inode usage of each MDT or OST or, if a pool is specified with
220                 the 
221                 <literal>-p</literal> option, a subset of OSTs.</para>
222                 <para>By default, the usage of all mounted Lustre file systems
223                 is reported. If the 
224                 <literal>path</literal> option is included, only the usage for
225                 the specified file system is reported. If the 
226                 <literal>-h</literal> option is included, the output is printed
227                 in human-readable format, using SI base-2 suffixes for 
228                 <emphasis role="bold">M</emphasis>ega-, 
229                 <emphasis role="bold">G</emphasis>iga-, 
230                 <emphasis role="bold">T</emphasis>era-, 
231                 <emphasis role="bold">P</emphasis>eta-, or 
232                 <emphasis role="bold">E</emphasis>xabytes.</para>
233                 <para>If the 
234                 <literal>--lazy</literal> option is specified, any OST that is
235                 currently disconnected from the client will be skipped. Using
236                 the 
237                 <literal>--lazy</literal> option prevents the 
238                 <literal>df</literal> output from being blocked when an OST is
239                 offline. Only the space on the OSTs that can currently be
240                 accessed are returned. The 
241                 <literal>llite.*.lazystatfs</literal> tunable can be enabled to
242                 make this the default behaviour for all 
243                 <literal>statfs()</literal> operations.</para>
244               </entry>
245             </row>
246             <row>
247               <entry nameend="c2" namest="c1">
248                 <para>
249                   <literal>find</literal>
250                 </para>
251               </entry>
252               <entry>
253                 <para>Searches the directory tree rooted at the given
254                 directory/filename for files that match the given
255                 parameters.</para>
256                 <para>Using 
257                 <literal>!</literal> before an option negates its meaning (files
258                 NOT matching the parameter). Using 
259                 <literal>+</literal> before a numeric value means files with the
260                 parameter OR MORE. Using 
261                 <literal>-</literal> before a numeric value means files with the
262                 parameter OR LESS.</para>
263               </entry>
264             </row>
265             <row>
266               <entry />
267               <entry>
268                 <literal>--atime</literal>
269               </entry>
270               <entry>
271                 <para>File was last accessed N*24 hours ago. (There is no
272                 guarantee that 
273                 <literal>atime</literal> is kept coherent across the
274                 cluster.)</para>
275                 <para>OSTs by default only hold a transient 
276                 <literal>atime</literal> that is updated when clients do read
277                 requests. Permanent 
278                 <literal>atime</literal> is written to the MDT when the file is
279                 closed. However, on-disk atime is only updated if it is more
280                 than 60 seconds old (
281                 <literal>mdd.*.atime_diff</literal>).
282                 </para>
283                 <para condition='l2D'>In Lustre 2.14, it is possible to set
284                 the OSTs to persistently store atime with each object, in
285                 order to get more accurate persistent atime updates for files
286                 that are open for a long time via the similarly-named
287                 <literal>obdfilter.*.atime_diff</literal> parameter.
288                 </para>
289                 <para>
290                 The client considers the latest <literal>atime</literal> from
291                 all OSTs and MDTs. If a 
292                 <literal>setattr</literal> is set by user, then it is updated on
293                 both the MDT and OST, allowing the 
294                 <literal>atime</literal> to go backward.</para>
295               </entry>
296             </row>
297             <row>
298               <entry>
299                 <para>&#160;</para>
300               </entry>
301               <entry>
302                 <para>
303                   <literal>--ctime</literal>
304                 </para>
305               </entry>
306               <entry>
307                 <para>File status was last changed N*24 hours ago.</para>
308               </entry>
309             </row>
310             <row>
311               <entry>
312                 <para>&#160;</para>
313               </entry>
314               <entry>
315                 <para>
316                   <literal>--mtime</literal>
317                 </para>
318               </entry>
319               <entry>
320                 <para>File data was last modified N*24 hours ago.</para>
321               </entry>
322             </row>
323             <row>
324               <entry>
325                 <para>&#160;</para>
326               </entry>
327               <entry>
328                 <para>
329                   <literal>--obd</literal>
330                 </para>
331               </entry>
332               <entry>
333                 <para>File has an object on a specific OST(s).</para>
334               </entry>
335             </row>
336             <row>
337               <entry>
338                 <para>&#160;</para>
339               </entry>
340               <entry>
341                 <para>
342                   <literal>--size</literal>
343                 </para>
344               </entry>
345               <entry>
346                 <para>File has a size in bytes, or kilo-, Mega-, Giga-, Tera-,
347                 Peta- or Exabytes if a suffix is given.</para>
348               </entry>
349             </row>
350             <row>
351               <entry>
352                 <para>&#160;</para>
353               </entry>
354               <entry>
355                 <para>
356                   <literal>--type</literal>
357                 </para>
358               </entry>
359               <entry>
360                 <para>File has the type - block, character, directory, pipe,
361                 file, symlink, socket or door (used in Solaris operating
362                 system).</para>
363               </entry>
364             </row>
365             <row>
366               <entry>
367                 <para>&#160;</para>
368               </entry>
369               <entry>
370                 <para>
371                   <literal>--uid</literal>
372                 </para>
373               </entry>
374               <entry>
375                 <para>File has a specific numeric user ID.</para>
376               </entry>
377             </row>
378             <row>
379               <entry>
380                 <para>&#160;</para>
381               </entry>
382               <entry>
383                 <para>
384                   <literal>--user</literal>
385                 </para>
386               </entry>
387               <entry>
388                 <para>File owned by a specific user (numeric user ID
389                 allowed).</para>
390               </entry>
391             </row>
392             <row>
393               <entry>
394                 <para>&#160;</para>
395               </entry>
396               <entry>
397                 <para>
398                   <literal>--gid</literal>
399                 </para>
400               </entry>
401               <entry>
402                 <para>File has a specific group ID.</para>
403               </entry>
404             </row>
405             <row>
406               <entry>
407                 <para>&#160;</para>
408               </entry>
409               <entry>
410                 <para>
411                   <literal>--group</literal>
412                 </para>
413               </entry>
414               <entry>
415                 <para>File belongs to a specific group (numeric group ID
416                 allowed).</para>
417               </entry>
418             </row>
419             <row>
420               <entry>
421                 <para>&#160;</para>
422               </entry>
423               <entry>
424                 <para>-
425                 <literal>-maxdepth</literal></para>
426               </entry>
427               <entry>
428                 <para>Limits find to descend at most N levels of the directory
429                 tree.</para>
430               </entry>
431             </row>
432             <row>
433               <entry>
434                 <para>&#160;</para>
435               </entry>
436               <entry>
437                 <para>
438                 <literal>--print</literal>/ 
439                 <literal>--print0</literal></para>
440               </entry>
441               <entry>
442                 <para>Prints the full filename, followed by a new line or NULL
443                 character correspondingly.</para>
444               </entry>
445             </row>
446             <row>
447               <entry nameend="c2" namest="c1">
448                 <para>
449                   <literal>osts [path]</literal>
450                 </para>
451               </entry>
452               <entry>
453                 <para>Lists all OSTs for the file system. If a path located on
454                 a mounted Lustre file system is specified, then only OSTs
455                 belonging to this file system are displayed.</para>
456               </entry>
457             </row>
458             <row>
459               <entry nameend="c2" namest="c1">
460                 <para>
461                   <literal>getname [path...]</literal>
462                 </para>
463               </entry>
464               <entry>
465                 <para>List each Lustre file system instance associated with
466                 each Lustre mount point. If no path is specified, all Lustre
467                 mount points are interrogated. If a list of paths is provided,
468                 the instance of each path is provided. If the path is not a
469                 Lustre instance 'No such device' is returned.</para>
470               </entry>
471             </row>
472             <row>
473               <entry nameend="c2" namest="c1">
474                 <para>
475                   <literal>getstripe</literal>
476                 </para>
477               </entry>
478               <entry>
479                 <para>Lists striping information for a given filename or
480                 directory. By default, the stripe count, stripe size and offset
481                 are returned.</para>
482                 <para>If you only want specific striping information, then the
483                 options of 
484                 <literal>--stripe-count</literal>,
485                 <literal>--stripe-size</literal>,
486                 <literal>--stripe-index</literal>,
487                 <literal>--layout</literal>, or
488                 <literal>--pool</literal> plus various combinations of these
489                 options can be used to retrieve specific information.</para>
490                 <para>If the 
491                 <literal>--raw</literal> option is specified, the stripe
492                 information is printed without substituting the file system
493                 default values for unspecified fields. If the striping EA is
494                 not set, 0, 0, and -1 will be printed for the stripe count,
495                 size, and offset respectively.</para>
496                 <para>The <literal>--mdt-index</literal> prints the index of
497                 the MDT for a given directory. See 
498                 <xref linkend="lustremaint.rmremotedir" />.</para>
499               </entry>
500             </row>
501             <row>
502               <entry>
503                 <para>&#160;</para>
504               </entry>
505               <entry>
506                 <para>
507                   <literal>--obd 
508                   <replaceable>ost_name</replaceable></literal>
509                 </para>
510               </entry>
511               <entry>
512                 <para>Lists files that have an object on a specific OST.</para>
513               </entry>
514             </row>
515             <row>
516               <entry>
517                 <para>&#160;</para>
518               </entry>
519               <entry>
520                 <para>
521                   <literal>--quiet</literal>
522                 </para>
523               </entry>
524               <entry>
525                 <para>Lists details about the file's object ID
526                 information.</para>
527               </entry>
528             </row>
529             <row>
530               <entry>
531                 <para>&#160;</para>
532               </entry>
533               <entry>
534                 <para>
535                   <literal>--verbose</literal>
536                 </para>
537               </entry>
538               <entry>
539                 <para>Prints additional striping information.</para>
540               </entry>
541             </row>
542             <row>
543               <entry>
544                 <para>&#160;</para>
545               </entry>
546               <entry>
547                 <para>
548                   <literal>--stripe-count</literal>
549                 </para>
550               </entry>
551               <entry>
552                 <para>Lists the stripe count (how many OSTs to use).</para>
553               </entry>
554             </row>
555             <row>
556               <entry>
557                 <para>&#160;</para>
558               </entry>
559               <entry>
560                 <para>
561                   <literal>--index</literal>
562                 </para>
563               </entry>
564               <entry>
565                 <para>Lists the index for each OST in the file system.</para>
566               </entry>
567             </row>
568             <row>
569               <entry>
570                 <para>&#160;</para>
571               </entry>
572               <entry>
573                 <para>
574                   <literal>--offset</literal>
575                 </para>
576               </entry>
577               <entry>
578                 <para>Lists the OST index on which file striping starts.</para>
579               </entry>
580             </row>
581             <row>
582               <entry>
583                 <para>&#160;</para>
584               </entry>
585               <entry>
586                 <para>
587                   <literal>--pool</literal>
588                 </para>
589               </entry>
590               <entry>
591                 <para>Lists the pools to which a file belongs.</para>
592               </entry>
593             </row>
594             <row>
595               <entry>
596                 <para>&#160;</para>
597               </entry>
598               <entry>
599                 <para>
600                   <literal>--size</literal>
601                 </para>
602               </entry>
603               <entry>
604                 <para>Lists the stripe size (how much data to write to one OST
605                 before moving to the next OST).</para>
606               </entry>
607             </row>
608             <row>
609               <entry>
610                 <para>&#160;</para>
611               </entry>
612               <entry>
613                 <para>
614                   <literal>--directory</literal>
615                 </para>
616               </entry>
617               <entry>
618                 <para>Lists entries about a specified directory instead of its
619                 contents (in the same manner as 
620                 <literal>ls -d</literal>).</para>
621               </entry>
622             </row>
623             <row>
624               <entry>
625                 <para>&#160;</para>
626               </entry>
627               <entry>
628                 <para>
629                   <literal>--recursive</literal>
630                 </para>
631               </entry>
632               <entry>
633                 <para>Recurses into all sub-directories.</para>
634               </entry>
635             </row>
636             <row>
637               <entry nameend="c2" namest="c1">
638                 <para>
639                   <literal>setstripe</literal>
640                 </para>
641               </entry>
642               <entry>
643                 <para>Create new files with a specific file layout (stripe
644                 pattern) configuration.
645                 <footnote>
646                   <para>The file cannot exist prior to using 
647                   <literal>setstripe</literal>. A directory must exist prior to
648                   using 
649                   <literal>setstripe</literal>.</para>
650                 </footnote></para>
651               </entry>
652             </row>
653             <row>
654               <entry>
655                 <para>&#160;</para>
656               </entry>
657               <entry>
658                 <para>
659                   <literal>--stripe-count stripe_cnt</literal>
660                 </para>
661               </entry>
662               <entry>
663                 <para>Number of OSTs over which to stripe a file. A 
664                 <literal>stripe_cnt</literal> of 0 uses the file system-wide
665                 default stripe count (default is 1). A 
666                 <literal>stripe_cnt</literal> of -1 stripes over all available
667                 OSTs.</para>
668               </entry>
669             </row>
670             <row>
671               <entry>
672                 <para>&#160;</para>
673               </entry>
674               <entry>
675                 <para>
676                   <literal>--overstripe-count stripe_cnt</literal>
677                 </para>
678               </entry>
679               <entry>
680                 <para>The same as --stripe-count, but allows overstriping,
681                 which will place more than one stripe per OST if
682                 <literal>stripe_cnt</literal> is greater than the number of
683                 OSTs. Overstriping is useful for matching the number of stripes
684                 to the number of processes, or with very fast OSTs, where one
685                 stripe per OST is not enough to get full performance.</para>
686               </entry>
687             </row>
688             <row>
689               <entry>
690                 <para>&#160;</para>
691               </entry>
692               <entry>
693                 <para>
694                 <literal>--size stripe_size</literal>
695                 <footnote>
696                   <para>The default stripe-size is 0. The default start-ost is
697                   -1. Do NOT confuse them! If you set start-ost to 0, all new
698                   file creations occur on OST 0 (seldom a good idea).</para>
699                 </footnote>&#160;</para>
700               </entry>
701               <entry>
702                 <para>Number of bytes to store on an OST before moving to the
703                 next OST. A stripe_size of 0 uses the file system's default
704                 stripe size, (default is 1 MB). Can be specified with 
705                 <emphasis role="bold">k</emphasis>(KB), 
706                 <emphasis role="bold">m</emphasis>(MB), or 
707                 <emphasis role="bold">g</emphasis>(GB), respectively.</para>
708               </entry>
709             </row>
710             <row>
711               <entry>
712                 <para>&#160;</para>
713               </entry>
714               <entry>
715                 <para>
716                   <literal>--stripe-index start_ost_index</literal>
717                 </para>
718               </entry>
719               <entry>
720                 <para>The OST index (base 10, starting at 0) on which to start
721                 striping for this file. A start_ost_index value of -1 allows
722                 the MDS to choose the starting index. This is the default
723                 value, and it means that the MDS selects the starting OST as it
724                 wants. We strongly recommend selecting this default, as it
725                 allows space and load balancing to be done by the MDS as
726                 needed. The 
727                 <literal>start_ost_index</literal> value has no relevance on
728                 whether the MDS will use round-robin or QoS weighted allocation
729                 for the remaining stripes in the file.</para>
730               </entry>
731             </row>
732             <row>
733               <entry>
734                 <para>&#160;</para>
735               </entry>
736               <entry>
737                 <para>
738                   <literal>--ost-index ost_indices</literal>
739                 </para>
740               </entry>
741               <entry>
742                                 <para>This option is used to specify the exact stripe
743                 layout on the the file system. <literal>ost_indices</literal>
744                 is a list of OSTs referenced by their indices and index ranges
745                 separated by commas, e.g. <literal>1,2-4,7</literal>.</para>
746               </entry>
747             </row>
748             <row>
749               <entry>
750                 <para>&#160;</para>
751               </entry>
752               <entry>
753                 <para>
754                   <literal>--pool 
755                   <replaceable>pool</replaceable></literal>
756                 </para>
757               </entry>
758               <entry>
759                 <para>Name of the pre-defined pool of OSTs (see 
760                 <xref linkend="lctl" />) that will be used
761                 for striping. The 
762                 <literal>stripe_cnt</literal>, 
763                 <literal>stripe_size</literal> and 
764                 <literal>start_ost</literal> values are used as well. The
765                 start-ost value must be part of the pool or an error is
766                 returned.</para>
767               </entry>
768             </row>
769             <row>
770               <entry nameend="c2" namest="c1">
771                 <para>
772                   <literal>setstripe -d</literal>
773                 </para>
774               </entry>
775               <entry>
776                 <para>Deletes default striping on the specified
777                 directory.</para>
778               </entry>
779             </row>
780             <row>
781               <entry nameend="c2" namest="c1">
782                 <para>
783                   <literal>pool_list {filesystem}[.poolname]|{pathname}</literal>
784                 </para>
785               </entry>
786               <entry>
787                 <para>Lists pools in the file system or pathname, or OSTs in
788                 the file system's pool.</para>
789               </entry>
790             </row>
791             <row>
792               <entry nameend="c2" namest="c1">
793                 <para>
794                   <literal>quota [-q] [-v] [-o 
795                   <replaceable>obd_uuid</replaceable>|-i 
796                   <replaceable>mdt_idx</replaceable>|-I 
797                   <replaceable>ost_idx</replaceable>] [-u|-g|-p
798                   <replaceable>uname|uid|gname|gid|projid]</replaceable>
799                   <replaceable>/mount_point</replaceable></literal>
800                 </para>
801                 <para>&#160;</para>
802               </entry>
803               <entry>
804                 <para>Displays disk usage and limits, either for the full file
805                 system or for objects on a specific OBD. A user or group name
806                 or an usr, group and project ID can be specified. If all user,
807                 group project ID are omitted, quotas for the current UID/GID
808                 are shown. The <literal>-q</literal> option disables printing
809                 of additional descriptions (including column titles). It fills
810                 in blank spaces in the
811                 <literal>grace</literal> column with zeros (when there is no
812                 grace period set), to ensure that the number of columns is
813                 consistent. The 
814                 <literal>-v</literal> option provides more verbose (per-OBD
815                 statistics) output.</para>
816               </entry>
817             </row>
818             <row>
819               <entry nameend="c2" namest="c1">
820                 <para>
821                   <literal>quota -t 
822                   <replaceable>-u|-g|-p</replaceable>
823                   <replaceable>/mount_point</replaceable></literal>
824                 </para>
825               </entry>
826               <entry>
827                 <para>Displays block and inode grace times for user (
828                 <literal>-u</literal>) or group (
829                 <literal>-g</literal>) or project (
830                 <literal>-p</literal>) quotas.</para>
831               </entry>
832             </row>
833             <row>
834               <entry nameend="c2" namest="c1">
835                 <para>
836                   <literal>setquota {-u|-g|-p
837                   <replaceable>uname|uid|gname|gid|projid}</replaceable>
838                   [--block-softlimit
839                   <replaceable>block_softlimit</replaceable>]
840                   [--block-hardlimit 
841                   <replaceable>block_hardlimit</replaceable>]
842                   [--inode-softlimit 
843                   <replaceable>inode_softlimit</replaceable>]
844                   [--inode-hardlimit 
845                   <replaceable>inode_hardlimit</replaceable>] 
846                   <replaceable>/mount_point</replaceable></literal>
847                 </para>
848               </entry>
849               <entry>
850                 <para>Sets file system quotas for users, groups or one project.
851                 Limits can be specified with
852                 <literal>--{block|inode}-{softlimit|hardlimit}</literal> or
853                 their short equivalents 
854                 <literal>-b</literal>, 
855                 <literal>-B</literal>, 
856                 <literal>-i</literal>, 
857                 <literal>-I</literal>. Users can set 1, 2, 3 or 4 limits.
858                 <footnote>
859                   <para>The old 
860                   <literal>setquota</literal> interface is supported, but it may
861                   be removed in a future Lustre software release.</para>
862                 </footnote>Also, limits can be specified with special suffixes,
863                 -b, -k, -m, -g, -t, and -p to indicate units of 1, 2^10, 2^20,
864                 2^30, 2^40 and 2^50, respectively. By default, the block limits
865                 unit is 1 kilobyte (1,024), and block limits are always
866                 kilobyte-grained (even if specified in bytes). See 
867                 <xref linkend="setquota_grace_time_example" />.</para>
868               </entry>
869             </row>
870             <row>
871               <entry nameend="c2" namest="c1">
872                 <para>
873                   <literal>setquota -t -u|-g|-p [--block-grace
874                   <replaceable>block_grace</replaceable>] [--inode-grace 
875                   <replaceable>inode_grace</replaceable>] 
876                   <replaceable>/mount_point</replaceable></literal>
877                 </para>
878               </entry>
879               <entry>
880                 <para>Sets the file system quota grace times for users or
881                 groups. Grace time is specified in '
882                 <literal>XXwXXdXXhXXmXXs</literal>' format or as an integer
883                 seconds value. See 
884                 <xref linkend="setquota_grace_time_example" />.</para>
885               </entry>
886             </row>
887             <row>
888               <entry nameend="c2" namest="c1">
889                 <para>
890                   <literal>help</literal>
891                 </para>
892               </entry>
893               <entry>
894                 <para>Provides brief help on various 
895                 <literal>lfs</literal> arguments.</para>
896               </entry>
897             </row>
898             <row>
899               <entry nameend="c2" namest="c1">
900                 <para>
901                   <literal>exit/quit</literal>
902                 </para>
903               </entry>
904               <entry>
905                 <para>Quits the interactive 
906                 <literal>lfs</literal> session.</para>
907               </entry>
908             </row>
909           </tbody>
910         </tgroup>
911       </informaltable>
912     </section>
913     <section remap="h5" xml:id="setquota_grace_time_example">
914       <title>Examples</title>
915       <para>Creates a file striped on two OSTs with 128 KB on each
916       stripe.</para>
917       <screen>
918 $ lfs setstripe -s 128k -c 2 /mnt/lustre/file1
919 </screen>
920       <para>Deletes a default stripe pattern on a given directory. New files
921       use the default striping pattern.</para>
922       <screen>
923 $ lfs setstripe -d /mnt/lustre/dir
924 </screen>
925       <para>Lists the detailed object allocation of a given file.</para>
926       <screen>
927 $ lfs getstripe -v /mnt/lustre/file1
928 </screen>
929       <para>List all the mounted Lustre file systems and corresponding Lustre
930       instances.</para>
931       <screen>
932 $ lfs getname
933 </screen>
934       <para>Efficiently lists all files in a given directory and its
935       subdirectories.</para>
936       <screen>
937 $ lfs find /mnt/lustre
938 </screen>
939       <para>Recursively lists all regular files in a given directory more than
940       30 days old.</para>
941       <screen>
942 $ lfs find /mnt/lustre -mtime +30 -type f -print
943 </screen>
944       <para>Recursively lists all files in a given directory that have objects
945       on OST2-UUID. The lfs check servers command checks the status of all
946       servers (MDT and OSTs).</para>
947       <screen>
948 $ lfs find --obd OST2-UUID /mnt/lustre/
949 </screen>
950       <para>Lists all OSTs in the file system.</para>
951       <screen>
952 $ lfs osts
953 </screen>
954       <para>Lists space usage per OST and MDT in human-readable format.</para>
955       <screen>
956 $ lfs df -h
957 </screen>
958       <para>Lists inode usage per OST and MDT.</para>
959       <screen>
960 $ lfs df -i
961 </screen>
962       <para>List space or inode usage for a specific OST pool.</para>
963       <screen>
964 $ lfs df --pool 
965 <replaceable>filesystem</replaceable>[.
966 <replaceable>pool</replaceable>] | 
967 <replaceable>pathname</replaceable>
968 </screen>
969       <para>List quotas of user 'bob'.</para>
970       <screen>
971 $ lfs quota -u bob /mnt/lustre
972 </screen>
973       <para>List quotas of project ID '1'.</para>
974       <screen>
975 $ lfs quota -p 1 /mnt/lustre
976 </screen>
977       <para>Show grace times for user quotas on 
978       <literal>/mnt/lustre</literal>.</para>
979       <screen>
980 $ lfs quota -t -u /mnt/lustre
981 </screen>
982       <para>Sets quotas of user 'bob', with a 1 GB block quota hardlimit and a
983       2 GB block quota softlimit.</para>
984       <screen>
985 $ lfs setquota -u bob --block-softlimit 2000000 --block-hardlimit 1000000
986 /mnt/lustre
987 </screen>
988       <para>Sets grace times for user quotas: 1000 seconds for block quotas, 1
989       week and 4 days for inode quotas.</para>
990       <screen>
991 $ lfs setquota -t -u --block-grace 1000 --inode-grace 1w4d /mnt/lustre
992 </screen>
993       <para>Checks the status of all servers (MDT, OST)</para>
994       <screen>
995 $ lfs check servers
996 </screen>
997       <para>Creates a file striped on two OSTs from the pool 
998       <literal>my_pool</literal></para>
999       <screen>
1000 $ lfs setstripe --pool my_pool -c 2 /mnt/lustre/file
1001 </screen>
1002       <para>Lists the pools defined for the mounted Lustre file system 
1003       <literal>/mnt/lustre</literal></para>
1004       <screen>
1005 $ lfs pool_list /mnt/lustre/
1006 </screen>
1007       <para>Lists the OSTs which are members of the pool 
1008       <literal>my_pool</literal> in file system 
1009       <literal>my_fs</literal></para>
1010       <screen>
1011 $ lfs pool_list my_fs.my_pool
1012 </screen>
1013       <para>Finds all directories/files associated with 
1014       <literal>poolA</literal>.</para>
1015       <screen>
1016 $ lfs find /mnt/lustre --pool poolA
1017 </screen>
1018       <para>Finds all directories/files not associated with a pool.</para>
1019       <screen>
1020 $ lfs find /mnt//lustre --pool ""
1021 </screen>
1022       <para>Finds all directories/files associated with pool.</para>
1023       <screen>
1024 $ lfs find /mnt/lustre ! --pool ""
1025 </screen>
1026       <para>Associates a directory with the pool 
1027       <literal>my_pool</literal>, so all new files and directories are created
1028       in the pool.</para>
1029       <screen>
1030 $ lfs setstripe --pool my_pool /mnt/lustre/dir
1031 </screen>
1032     </section>
1033     <section remap="h5">
1034       <title>See Also</title>
1035       <para>
1036         <xref linkend="lctl" />
1037       </para>
1038     </section>
1039   </section>
1040   <section xml:id="lfs_migrate">
1041     <title>
1042       <indexterm>
1043         <primary>lfs_migrate</primary>
1044       </indexterm>
1045       <literal>lfs_migrate</literal>
1046     </title>
1047     <para>The 
1048     <literal>lfs_migrate</literal> utility is a simple to migrate file
1049     <emphasis>data</emphasis> between OSTs.</para>
1050     <section remap="h5">
1051       <title>Synopsis</title>
1052       <screen>
1053 lfs_migrate [<replaceable>lfs_setstripe_options</replaceable>]
1054         [-h] [-n] [-q] [-R] [-s] [-y] [-0] [file|directory ...]
1055 </screen>
1056     </section>
1057     <section remap="h5">
1058       <title>Description</title>
1059       <para>The 
1060       <literal>lfs_migrate</literal> utility is a tool to assist migration
1061       of file data between Lustre OSTs. The utility copies each specified
1062       file to a temporary file using supplied <literal>lfs setstripe</literal>
1063       options, if any, optionally verifies the file contents have not changed,
1064       and then swaps the layout (OST objects) from the temporary file and the
1065       original file (for Lustre 2.5 and later), or renames the temporary file
1066       to the original filename. This allows the user/administrator to balance
1067       space usage between OSTs, or move files off OSTs that are starting to show
1068       hardware problems (though are still functional) or will be removed.</para>
1069       <warning>
1070         <para>For versions of Lustre before 2.5, 
1071         <literal>lfs_migrate</literal> was not integrated with the MDS at all.
1072         That made it UNSAFE for use on files that were being modified by other
1073         applications, since the file was migrated through a copy and rename of
1074         the file.  With Lustre 2.5 and later, the new file layout is swapped
1075         with the existing file layout, which ensures that the user-visible
1076         inode number is kept, and open file handles and locks on the file are
1077         kept.</para>
1078       </warning>
1079       <para>Files to be migrated can be specified as command-line arguments. If
1080       a directory is specified on the command-line then all files within the
1081       directory are migrated. If no files are specified on the command-line,
1082       then a list of files is read from the standard input, making 
1083       <literal>lfs_migrate</literal> suitable for use with 
1084       <literal>lfs find</literal> to locate files on specific OSTs and/or
1085       matching other file attributes, and other tools that generate a list
1086       of files on standard output.</para>
1087       <para>Unless otherwise specified through command-line options, the
1088       file allocation policies on the MDS dictate where the new files
1089       are placed, taking into account whether specific OSTs have been
1090       disabled on the MDS via <literal>lctl</literal> (preventing new
1091       files from being allocated there), whether some OSTs are overly full
1092       (reducing the number of files placed on those OSTs), or if there is
1093       a specific default file striping for the parent directory (potentially
1094       changing the stripe count, stripe size, OST pool, or OST index of a
1095       new file).</para>
1096       <note>
1097         <para>The 
1098         <literal>lfs_migrate</literal> utility can also be used in some cases to
1099         reduce file 
1100         <indexterm>
1101           <primary>fragmentation</primary>
1102         </indexterm>fragmentation. File fragmentation will typically reduce
1103         Lustre file system performance. File fragmentation may be observed on
1104         an aged file system and will commonly occur if the file was written by
1105         many threads. Provided there is sufficient free space (or if it was
1106         written when the file system was nearly full) that is less fragmented
1107         than the file being copied, re-writing a file with 
1108         <literal>lfs_migrate</literal> will result in a migrated file with
1109         reduced fragmentation. The tool 
1110         <literal>filefrag</literal> can be used to report file fragmentation.
1111         See 
1112         <xref linkend="filefrag" /></para>
1113       </note>
1114       <note>
1115         <para>As long as a file has extent lengths of tens of megabytes (
1116         <replaceable>read_bandwidth * seek_time</replaceable>) or more, the
1117         read performance for the file will not be significantly impacted by
1118         fragmentation, since the read pipeline can be filled by large reads
1119         from disk even with an occasional disk seek.</para>
1120       </note>
1121     </section>
1122     <section remap="h5">
1123       <title>Options</title>
1124       <para>Options supporting 
1125       <literal>lfs_migrate</literal> are described below.</para>
1126       <informaltable frame="all">
1127         <tgroup cols="2">
1128           <colspec colname="c1" colwidth="50*" />
1129           <colspec colname="c2" colwidth="50*" />
1130           <thead>
1131             <row>
1132               <entry>
1133                 <para>
1134                   <emphasis role="bold">Option</emphasis>
1135                 </para>
1136               </entry>
1137               <entry>
1138                 <para>
1139                   <emphasis role="bold">Description</emphasis>
1140                 </para>
1141               </entry>
1142             </row>
1143           </thead>
1144           <tbody>
1145             <row>
1146               <entry>
1147                 <para>
1148                   <literal>-c 
1149                   <replaceable>stripecount</replaceable></literal>
1150                 </para>
1151               </entry>
1152               <entry>
1153                 <para>Restripe file using the specified stripe count. This
1154                 option may not be specified at the same time as the 
1155                 <literal>-R</literal> option.</para>
1156               </entry>
1157             </row>
1158             <row>
1159               <entry>
1160                 <para>
1161                   <literal>-h</literal>
1162                 </para>
1163               </entry>
1164               <entry>
1165                 <para>Display help information.</para>
1166               </entry>
1167             </row>
1168             <row>
1169               <entry>
1170                 <literal>-l</literal>
1171               </entry>
1172               <entry>
1173                 <para>Migrate files with hard links (skips, by default). Files
1174                 with multiple hard links are split into multiple separate files
1175                 by 
1176                 <literal>lfs_migrate</literal>, so they are skipped, by
1177                 default, to avoid breaking the hard links.</para>
1178               </entry>
1179             </row>
1180             <row>
1181               <entry>
1182                 <literal>-n</literal>
1183               </entry>
1184               <entry>
1185                 <para>Only print the names of files to be migrated.</para>
1186               </entry>
1187             </row>
1188             <row>
1189               <entry>
1190                 <para>
1191                   <literal>-q</literal>
1192                 </para>
1193               </entry>
1194               <entry>
1195                 <para>Run quietly (does not print filenames or status).</para>
1196               </entry>
1197             </row>
1198             <row>
1199               <entry>
1200                 <literal>-R</literal>
1201               </entry>
1202               <entry>Restripe file using default directory striping instead of
1203               keeping striping. This option may not be specified at the same
1204               time as the 
1205               <literal>-c</literal> option.</entry>
1206             </row>
1207             <row>
1208               <entry>
1209                 <literal>-s</literal>
1210               </entry>
1211               <entry>Skip file data comparison after migrate. Default is to
1212               compare migrated file against original to verify
1213               correctness.</entry>
1214             </row>
1215             <row>
1216               <entry>
1217                 <para>
1218                   <literal>-y</literal>
1219                 </para>
1220               </entry>
1221               <entry>
1222                 <para>Answer '
1223                 <literal>y</literal>' to usage warning without prompting (for
1224                 scripts, use with caution).</para>
1225               </entry>
1226             </row>
1227             <row>
1228               <entry>
1229                 <literal>-0</literal>
1230               </entry>
1231               <entry>Expect NUL-terminated filenames on standard input, as
1232               generated by <literal>lfs find -print0</literal> or
1233               <literal>find -print0</literal>.  This allows filenames with
1234               embedded newlines to be handled correctly.
1235               </entry>
1236             </row>
1237           </tbody>
1238         </tgroup>
1239       </informaltable>
1240     </section>
1241     <section remap="h5">
1242       <title>Examples</title>
1243       <para>Rebalance all files in 
1244       <literal>/mnt/lustre/dir</literal>:</para>
1245       <screen>
1246 $ lfs_migrate /mnt/lustre/dir
1247 </screen>
1248       <para>Migrate files in /test filesystem on OST0004 larger than 4 GB in
1249       size and older than a day old:</para>
1250       <screen>
1251 $ lfs find /test -obd test-OST0004 -size +4G -mtime +1 | lfs_migrate -y
1252 </screen>
1253     </section>
1254     <section remap="h5">
1255       <title>See Also</title>
1256       <para>
1257         <xref linkend="userutilities.lfs" />
1258       </para>
1259     </section>
1260   </section>
1261   <section xml:id="filefrag">
1262     <title>
1263       <indexterm>
1264         <primary>filefrag</primary>
1265       </indexterm>
1266       <literal>filefrag</literal>
1267     </title>
1268     <para>The 
1269     <literal>e2fsprogs</literal> package contains the 
1270     <literal>filefrag</literal> tool which reports the extent of file
1271     fragmentation.</para>
1272     <section remap="h5">
1273       <title>Synopsis</title>
1274       <screen>
1275 filefrag [ -belsv ] [ files...  ]
1276 </screen>
1277     </section>
1278     <section remap="h5">
1279       <title>Description</title>
1280       <para>The 
1281       <literal>filefrag</literal> utility reports the extent of fragmentation in
1282       a given file. The 
1283       <literal>filefrag</literal> utility obtains the extent information from
1284       Lustre files using the 
1285       <literal>FIEMAP ioctl</literal>, which is efficient and fast, even for
1286       very large files.</para>
1287       <para>In default mode 
1288       <footnote>
1289         <para>The default mode is faster than the verbose/extent mode since it
1290         only counts the number of extents.</para>
1291       </footnote>, 
1292       <literal>filefrag</literal> prints the number of physically discontiguous
1293       extents in the file. In extent or verbose mode, each extent is printed
1294       with details such as the blocks allocated on each OST. For a Lustre file
1295       system, the extents are printed in device offset order (i.e. all of the
1296       extents for one OST first, then the next OST, etc.), not file logical
1297       offset order. If the file logical offset order was used, the Lustre
1298       striping would make the output very verbose and difficult to see if there
1299       was file fragmentation or not.</para>
1300       <note>
1301         <para>Note that as long as a file has extent lengths of tens of
1302         megabytes or more (i.e. 
1303         <replaceable>read_bandwidth * seek_time &gt;
1304         extent_length</replaceable>), the read performance for the file will
1305         not be significantly impacted by fragmentation, since file readahead
1306         can fully utilize the disk disk bandwidth even with occasional
1307         seeks.</para>
1308       </note>
1309       <para>In default mode 
1310       <footnote>
1311         <para>The default mode is faster than the verbose/extent mode.</para>
1312       </footnote>, 
1313       <literal>filefrag</literal> returns the number of physically discontiguous
1314       extents in the file. In extent or verbose mode, each extent is printed
1315       with details. For a Lustre file system, the extents are printed in device
1316       offset order, not logical offset order.</para>
1317     </section>
1318     <section remap="h5">
1319       <title>Options</title>
1320       <para>The options and descriptions for the 
1321       <literal>filefrag</literal> utility are listed below.</para>
1322       <informaltable frame="all">
1323         <tgroup cols="2">
1324           <colspec colname="c1" colwidth="50*" />
1325           <colspec colname="c2" colwidth="50*" />
1326           <thead>
1327             <row>
1328               <entry>
1329                 <para>
1330                   <emphasis role="bold">Option</emphasis>
1331                 </para>
1332               </entry>
1333               <entry>
1334                 <para>
1335                   <emphasis role="bold">Description</emphasis>
1336                 </para>
1337               </entry>
1338             </row>
1339           </thead>
1340           <tbody>
1341             <row>
1342               <entry>
1343                 <para>
1344                   <literal>-b</literal>
1345                 </para>
1346               </entry>
1347               <entry>
1348                 <para>Uses the 1024-byte blocksize for the output. By default,
1349                 this blocksize is used by the Lustre file system, since OSTs
1350                 may use different block sizes.</para>
1351               </entry>
1352             </row>
1353             <row>
1354               <entry>
1355                 <para>
1356                   <literal>-e</literal>
1357                 </para>
1358               </entry>
1359               <entry>
1360                 <para>Uses the extent mode when printing the output. This is
1361                 the default for Lustre files in verbose mode.</para>
1362               </entry>
1363             </row>
1364             <row>
1365               <entry>
1366                 <para>
1367                   <literal>-l</literal>
1368                 </para>
1369               </entry>
1370               <entry>
1371                 <para>Displays extents in LUN offset order. This is the only
1372                 available mode for Lustre.</para>
1373               </entry>
1374             </row>
1375             <row>
1376               <entry>
1377                 <para>
1378                   <literal>-s</literal>
1379                 </para>
1380               </entry>
1381               <entry>
1382                 <para>Synchronizes any unwritten file data to disk before
1383                 requesting the mapping.</para>
1384               </entry>
1385             </row>
1386             <row>
1387               <entry>
1388                 <para>
1389                   <literal>-v</literal>
1390                 </para>
1391               </entry>
1392               <entry>
1393                 <para>Prints the file's layout in verbose mode when checking
1394                 file fragmentation, including the logical to physical mapping
1395                 for each extent in the file and the OST index.</para>
1396               </entry>
1397             </row>
1398           </tbody>
1399         </tgroup>
1400       </informaltable>
1401     </section>
1402     <section remap="h5">
1403       <title>Examples</title>
1404       <para>Lists default output.</para>
1405       <screen>
1406 $ filefrag /mnt/lustre/foo
1407 /mnt/lustre/foo: 13 extents found
1408 </screen>
1409       <para>Lists verbose output in extent format.</para>
1410       <screen>
1411 $ filefrag -v /mnt/lustre/foo
1412 Filesystem type is: bd00bd0
1413 File size of /mnt/lustre/foo is 1468297786 (1433888 blocks of 1024 bytes)
1414  ext:     device_logical:        physical_offset: length:  dev: flags:
1415    0:        0..  122879: 2804679680..2804802559: 122880: 0002: network
1416    1:   122880..  245759: 2804817920..2804940799: 122880: 0002: network
1417    2:   245760..  278527: 2804948992..2804981759:  32768: 0002: network
1418    3:   278528..  360447: 2804982784..2805064703:  81920: 0002: network
1419    4:   360448..  483327: 2805080064..2805202943: 122880: 0002: network
1420    5:   483328..  606207: 2805211136..2805334015: 122880: 0002: network
1421    6:   606208..  729087: 2805342208..2805465087: 122880: 0002: network
1422    7:   729088..  851967: 2805473280..2805596159: 122880: 0002: network
1423    8:   851968..  974847: 2805604352..2805727231: 122880: 0002: network
1424    9:   974848.. 1097727: 2805735424..2805858303: 122880: 0002: network
1425   10:  1097728.. 1220607: 2805866496..2805989375: 122880: 0002: network
1426   11:  1220608.. 1343487: 2805997568..2806120447: 122880: 0002: network
1427   12:  1343488.. 1433599: 2806128640..2806218751:  90112: 0002: network
1428 /mnt/lustre/foo: 13 extents found
1429 </screen>
1430     </section>
1431   </section>
1432   <section xml:id="mount">
1433     <title>
1434       <indexterm>
1435         <primary>mount</primary>
1436       </indexterm>
1437       <literal>mount</literal>
1438     </title>
1439     <para>The standard 
1440     <literal>mount(8)</literal> Linux command is used to mount a Lustre file
1441     system. When mounting a Lustre file system, mount(8) executes the 
1442     <literal>/sbin/mount.lustre</literal> command to complete the mount. The
1443     mount command supports these options specific to a Lustre file
1444     system:</para>
1445     <informaltable frame="all">
1446       <tgroup cols="2">
1447         <colspec colname="c1" colwidth="50*" />
1448         <colspec colname="c2" colwidth="50*" />
1449         <thead>
1450           <row>
1451             <entry>
1452               <para>
1453                 <emphasis role="bold">Server options</emphasis>
1454               </para>
1455             </entry>
1456             <entry>
1457               <para>
1458                 <emphasis role="bold">Description</emphasis>
1459               </para>
1460             </entry>
1461           </row>
1462         </thead>
1463         <tbody>
1464           <row>
1465             <entry>
1466               <para>
1467                 <literal>abort_recov</literal>
1468               </para>
1469             </entry>
1470             <entry>
1471               <para>Aborts recovery when starting a target</para>
1472             </entry>
1473           </row>
1474           <row>
1475             <entry>
1476               <para>
1477                 <literal>nosvc</literal>
1478               </para>
1479             </entry>
1480             <entry>
1481               <para>Starts only MGS/MGC servers</para>
1482             </entry>
1483           </row>
1484           <row>
1485             <entry>
1486               <para>
1487                 <literal>nomgs</literal>
1488               </para>
1489             </entry>
1490             <entry>
1491               <para>Start a MDT with a co-located MGS without starting the
1492               MGS</para>
1493             </entry>
1494           </row>
1495           <row>
1496             <entry>
1497               <para>
1498                 <literal>exclude</literal>
1499               </para>
1500             </entry>
1501             <entry>
1502               <para>Starts with a dead OST</para>
1503             </entry>
1504           </row>
1505           <row>
1506             <entry>
1507               <para>
1508                 <literal>md_stripe_cache_size</literal>
1509               </para>
1510             </entry>
1511             <entry>
1512               <para>Sets the stripe cache size for server side disk with a
1513               striped raid configuration</para>
1514             </entry>
1515           </row>
1516         </tbody>
1517       </tgroup>
1518     </informaltable>
1519     <informaltable frame="all">
1520       <tgroup cols="2">
1521         <colspec colname="c1" colwidth="50*" />
1522         <colspec colname="c2" colwidth="50*" />
1523         <thead>
1524           <row>
1525             <entry>
1526               <para>
1527                 <emphasis role="bold">Client options</emphasis>
1528               </para>
1529             </entry>
1530             <entry>
1531               <para>
1532                 <emphasis role="bold">Description</emphasis>
1533               </para>
1534             </entry>
1535           </row>
1536         </thead>
1537         <tbody>
1538           <row>
1539             <entry>
1540               <para>
1541                 <literal>flock/noflock/localflock</literal>
1542               </para>
1543             </entry>
1544             <entry>
1545               <para>Enables/disables global flock or local flock support</para>
1546             </entry>
1547           </row>
1548           <row>
1549             <entry>
1550               <para>
1551                 <literal>user_xattr/nouser_xattr</literal>
1552               </para>
1553             </entry>
1554             <entry>
1555               <para>Enables/disables user-extended attributes</para>
1556             </entry>
1557           </row>
1558           <row>
1559             <entry>
1560               <para>
1561                 <literal>user_fid2path/nouser_fid2path</literal>
1562               </para>
1563             </entry>
1564             <entry>
1565               <para>Enables/disables FID to path translation by
1566               regular users</para>
1567             </entry>
1568           </row>
1569           <row>
1570             <entry>
1571               <para>
1572                 <literal>retry=</literal>
1573               </para>
1574             </entry>
1575             <entry>
1576               <para>Number of times a client will retry to mount the file
1577               system</para>
1578             </entry>
1579           </row>
1580         </tbody>
1581       </tgroup>
1582     </informaltable>
1583   </section>
1584   <section xml:id="handling_timeouts">
1585     <title>Handling Timeouts</title>
1586     <para>Timeouts are the most common cause of hung applications. After a
1587     timeout involving an MDS or failover OST, applications attempting to access
1588     the disconnected resource wait until the connection gets
1589     established.</para>
1590     <para>When a client performs any remote operation, it gives the server a
1591     reasonable amount of time to respond. If a server does not reply either due
1592     to a down network, hung server, or any other reason, a timeout occurs which
1593     requires a recovery.</para>
1594     <para>If a timeout occurs, a message (similar to this one), appears on the
1595     console of the client, and in 
1596     <literal>/var/log/messages</literal>:</para>
1597     <screen>
1598 LustreError: 26597:(client.c:810:ptlrpc_expire_one_request()) @@@ timeout
1599
1600 req@a2d45200 x5886/t0 o38-&gt;mds_svc_UUID@NID_mds_UUID:12 lens 168/64 ref 1 fl
1601
1602 RPC:/0/0 rc 0
1603 </screen>
1604   </section>
1605 </chapter>
1606 <!--
1607   vim:expandtab:shiftwidth=2:tabstop=8:
1608   -->