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