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