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