Whamcloud - gitweb
LUDOC-11 misc: remove pre-2.5 conditional text
[doc/manual.git] / SystemConfigurationUtilities.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="systemconfigurationutilities">
3   <title xml:id="systemconfigurationutilities.title">System Configuration Utilities</title>
4   <para>This chapter includes system configuration utilities and includes the following sections:</para>
5   <itemizedlist>
6     <listitem>
7       <para><xref linkend="dbdoclet.50438219_55923"/></para>
8     </listitem>
9     <listitem>
10       <para><xref linkend="dbdoclet.l_getidentity"/></para>
11     </listitem>
12     <listitem>
13       <para><xref linkend="dbdoclet.50438219_38274"/></para>
14     </listitem>
15     <listitem>
16       <para><xref linkend="dbdoclet.50438219_58217"/></para>
17     </listitem>
18     <listitem>
19       <para><xref linkend="dbdoclet.50438219_44971"/></para>
20     </listitem>
21     <listitem>
22       <para><xref linkend="dbdoclet.50438219_90386"/></para>
23     </listitem>
24     <listitem>
25       <para><xref linkend="dbdoclet.50438219_23232"/></para>
26     </listitem>
27     <listitem>
28       <para><xref linkend="dbdoclet.50438219_23648"/></para>
29     </listitem>
30     <listitem>
31       <para><xref linkend="dbdoclet.50438219_64286"/></para>
32     </listitem>
33     <listitem>
34       <para><xref linkend="dbdoclet.50438219_90218"/></para>
35     </listitem>
36     <listitem>
37       <para><xref linkend="dbdoclet.50438219_54734"/></para>
38     </listitem>
39     <listitem>
40       <para><xref linkend="dbdoclet.50438219_63667"/></para>
41     </listitem>
42     <listitem>
43       <para><xref linkend="dbdoclet.50438219_75432"/></para>
44     </listitem>
45     <listitem>
46       <para><xref linkend="dbdoclet.50438219_12635"/></para>
47     </listitem>
48     <listitem>
49       <para><xref linkend="dbdoclet.50438219_82679"/></para>
50     </listitem>
51     <listitem>
52       <para><xref linkend="dbdoclet.50438219_51496"/></para>
53     </listitem>
54     <listitem>
55       <para><xref linkend="dbdoclet.50438219_39574"/></para>
56     </listitem>
57     <listitem>
58       <para><xref linkend="dbdoclet.50438219_99928"/></para>
59     </listitem>
60   </itemizedlist>
61   <section xml:id="dbdoclet.50438219_55923">
62       <title><indexterm><primary>e2scan</primary></indexterm>
63                   e2scan</title>
64     <para>The e2scan utility is an ext2 file system-modified inode scan program. The e2scan program uses libext2fs to find inodes with ctime or mtime newer than a given time and prints out their pathname. Use e2scan to efficiently generate lists of files that have been modified. The e2scan tool is included in the e2fsprogs package, located at:</para>
65     <para><link xl:href="http://downloads.whamcloud.com/public/e2fsprogs/latest/">http://downloads.whamcloud.com/public/e2fsprogs/latest/</link></para>
66     <section remap="h5">
67       <title>Synopsis</title>
68       <screen>e2scan [options] [-f file] block_device</screen>
69     </section>
70     <section remap="h5">
71       <title>Description</title>
72       <para>When invoked, the e2scan utility iterates all inodes on the block device, finds modified inodes, and prints their inode numbers. A similar iterator, using libext2fs(5), builds a table (called parent database) which lists the parent node for each inode. With a lookup function, you can reconstruct modified pathnames from root.</para>
73     </section>
74     <section remap="h5">
75       <title>Options</title>
76       <informaltable frame="all">
77         <tgroup cols="2">
78           <colspec colname="c1" colwidth="50*"/>
79           <colspec colname="c2" colwidth="50*"/>
80           <thead>
81             <row>
82               <entry>
83                 <para><emphasis role="bold">Option</emphasis></para>
84               </entry>
85               <entry>
86                 <para><emphasis role="bold">Description</emphasis></para>
87               </entry>
88             </row>
89           </thead>
90           <tbody>
91             <row>
92               <entry>
93                 <para> <literal>-b <replaceable>inode buffer blocks</replaceable></literal></para>
94               </entry>
95               <entry>
96                 <para> Sets the readahead inode blocks to get excellent performance when scanning the block device.</para>
97                 <para>&#160;</para>
98               </entry>
99             </row>
100             <row>
101               <entry>
102                 <para> <literal>-o <replaceable>output file</replaceable></literal></para>
103               </entry>
104               <entry>
105                 <para> If an output file is specified, modified pathnames are written to this file. Otherwise, modified parameters are written to stdout.</para>
106               </entry>
107             </row>
108             <row>
109               <entry>
110                 <para> <literal>-t <replaceable>inode</replaceable>| <replaceable>pathname</replaceable></literal></para>
111               </entry>
112               <entry>
113                 <para> Sets the e2scan type if type is inode. The e2scan utility prints modified inode numbers to stdout. By default, the type is set as pathname.</para>
114                 <para>The e2scan utility lists modified pathnames based on modified inode numbers.</para>
115               </entry>
116             </row>
117             <row>
118               <entry>
119                 <para> <literal>-u</literal></para>
120               </entry>
121               <entry>
122                 <para> Rebuilds the parent database from scratch. Otherwise, the current parent database is used.</para>
123               </entry>
124             </row>
125           </tbody>
126         </tgroup>
127       </informaltable>
128     </section>
129   </section>
130   <section xml:id="dbdoclet.l_getidentity">
131     <title><indexterm><primary>l_getidentity</primary></indexterm>
132 l_getidentity</title>
133     <para>The l_getidentity tool normally handles Lustre user/group mapping
134       upcall.</para>
135     <section remap="h5">
136       <title>Synopsis</title>
137       <screen>l_getidentity { $FSNAME-MDT{xxxx}| -d} {uid}</screen>
138     </section>
139     <section remap="h5">
140       <title>Description</title>
141       <para>The <literal>l_getidentity</literal> utility is called from the
142         MDS to map a numeric UID value into the list of supplementary group
143         values for that UID, and writes this into the
144         <literal>mdt.*.identity_info</literal> parameter file.  The list of
145         supplementary groups is cached in the kernel to avoid repeated
146         upcalls.  See <xref linkend="dbdoclet.identity_upcall"/> for more
147         details.</para>
148       <para>The <literal>l_getidentity</literal> utility can also be run
149         directly for debugging purposes to ensure that the UID mapping for a
150         particular user is configured correctly, by using the
151         <literal>-d</literal> argument instead of the MDT name.
152       </para>
153     </section>
154     <section remap="h5">
155       <title>Options</title>
156       <informaltable frame="all">
157         <tgroup cols="2">
158           <colspec colname="c1" colwidth="50*"/>
159           <colspec colname="c2" colwidth="50*"/>
160           <thead>
161             <row>
162               <entry>
163                 <para><emphasis role="bold">Option</emphasis></para>
164               </entry>
165               <entry>
166                 <para><emphasis role="bold">Description</emphasis></para>
167               </entry>
168             </row>
169           </thead>
170           <tbody>
171             <row>
172               <entry>
173                 <para>
174                   <literal>${FSNAME}-MDT{xxxx}</literal></para>
175               </entry>
176               <entry>
177                 <para> Metadata server target name</para>
178               </entry>
179             </row>
180             <row>
181               <entry>
182                 <para> <literal>uid</literal></para>
183               </entry>
184               <entry>
185                 <para> User identifier</para>
186               </entry>
187             </row>
188           </tbody>
189         </tgroup>
190       </informaltable>
191     </section>
192     <section remap="h5">
193       <title>Files</title>
194       <para>The l_getidentity files are located at:</para>
195       <screen>/proc/fs/lustre/mdt/${FSNAME}-MDT{xxxx}/identity_upcall</screen>
196     </section>
197   </section>
198   <section xml:id="dbdoclet.50438219_38274">
199     <title><indexterm><primary>lctl</primary></indexterm>
200 lctl</title>
201     <para>The lctl utility is used for root control and configuration. With lctl you can directly control Lustre via an ioctl interface, allowing various configuration, maintenance and debugging features to be accessed.</para>
202     <section remap="h5">
203       <title>Synopsis</title>
204       <screen>lctl [--device <replaceable>devno</replaceable>] <replaceable>command [args]</replaceable></screen>
205     </section>
206     <section remap="h5">
207       <title>Description</title>
208       <para>The lctl utility can be invoked in interactive mode by issuing the lctl command. After that, commands are issued as shown below. The most common lctl commands are:</para>
209       <screen>dl
210 dk
211 device
212 network <replaceable>up|down</replaceable>
213 list_nids
214 ping <replaceable>nid</replaceable>help
215 quit</screen>
216       <para>For a complete list of available commands, type <literal>help</literal> at the <literal>lctl</literal> prompt. To get basic help on command meaning and syntax, type <literal>help <replaceable>command</replaceable></literal>. Command completion is activated with the TAB key (depending on compile options), and command history is available via the up- and down-arrow keys.</para>
217       <para>For non-interactive use, use the second invocation, which runs the command after connecting to the device.</para>
218     </section>
219     <section remap="h5">
220       <title>Setting Parameters with lctl</title>
221       <para>Lustre parameters are not always accessible using the procfs interface, as it is platform-specific. As a solution, lctl {get,set}_param has been introduced as a platform-independent interface to the Lustre tunables. Avoid direct references to /proc/{fs,sys}/{lustre,lnet}. For future portability, use lctl {get,set}_param .</para>
222       <para>When the file system is running, use the <literal>lctl set_param</literal> command on the affected node(s) to <emphasis>temporarily</emphasis> set parameters (mapping to items in /proc/{fs,sys}/{lnet,lustre}). The <literal>lctl set_param</literal> command uses this syntax:</para>
223       <screen>lctl set_param [-n] [-P] [-d] <replaceable>obdtype.obdname.property</replaceable>=<replaceable>value</replaceable></screen>
224       <para>For example:</para>
225       <screen>mds# lctl set_param mdt.testfs-MDT0000.identity_upcall=NONE</screen>
226       <para condition='l25'>Use <literal>-P</literal> option to set parameters permanently. Option <literal>-d </literal>deletes permanent parameters. For example:
227               <screen>mgs# lctl set_param -P mdt.testfs-MDT0000.identity_upcall=NONE
228 mgs# lctl set_param -P -d mdt.testfs-MDT0000.identity_upcall</screen></para>
229       <para>Many permanent parameters can be set with <literal>lctl conf_param</literal>. In general, <literal>lctl conf_param</literal> can be used to specify any OBD device parameter settable in a /proc/fs/lustre file. The <literal>lctl conf_param</literal> command must be run on the MGS node, and uses this syntax:</para>
230       <screen><replaceable>obd|fsname</replaceable>.obdtype.property=<replaceable>value</replaceable>) </screen>
231       <para>For example:</para>
232       <screen>mgs# lctl conf_param testfs-MDT0000.mdt.identity_upcall=NONE
233 $ lctl conf_param testfs.llite.max_read_ahead_mb=16 </screen>
234       <caution>
235         <para>The <literal>lctl conf_param</literal> command <emphasis>permanently</emphasis> sets parameters in the file system configuration for all nodes of the specified type.</para>
236       </caution>
237       <para>To get current Lustre parameter settings, use the <literal>lctl get_param</literal> command on the desired node with the same parameter name as <literal>lctl set_param</literal>:</para>
238       <screen>lctl get_param [-n] <replaceable>obdtype.obdname.parameter</replaceable></screen>
239       <para>For example:</para>
240       <screen>mds# lctl get_param mdt.testfs-MDT0000.identity_upcall</screen>
241       <para>To list Lustre parameters that are available to set, use the <literal>lctl list_param</literal> command, with this syntax:</para>
242       <screen>lctl list_param [-R] [-F] <replaceable>obdtype.obdname.*</replaceable></screen>
243       <para>For example, to list all of the parameters on the MDT:</para>
244       <screen>oss# lctl list_param -RF mdt</screen>
245       <para>For more information on using lctl to set temporary and permanent parameters, see <xref linkend="dbdoclet.50438194_51490"/>.</para>
246       <para><emphasis role="bold">Network Configuration</emphasis></para>
247       <informaltable frame="all">
248         <tgroup cols="2">
249           <colspec colname="c1" colwidth="50*"/>
250           <colspec colname="c2" colwidth="50*"/>
251           <thead>
252             <row>
253               <entry>
254                 <para><emphasis role="bold">Option</emphasis></para>
255               </entry>
256               <entry>
257                 <para><emphasis role="bold">Description</emphasis></para>
258               </entry>
259             </row>
260           </thead>
261           <tbody>
262             <row>
263               <entry>
264                 <para> <literal>network up|down|tcp|elan</literal></para>
265               </entry>
266               <entry>
267                 <para> Starts or stops LNet, or selects a network type for other <literal>lctl</literal> LNet commands.</para>
268               </entry>
269             </row>
270             <row>
271               <entry>
272                 <para> <literal>list_nids</literal></para>
273               </entry>
274               <entry>
275                 <para> Prints all NIDs on the local node. LNet must be running.</para>
276               </entry>
277             </row>
278             <row>
279               <entry>
280                 <para> <literal>which_nid <replaceable>nidlist</replaceable></literal></para>
281               </entry>
282               <entry>
283                 <para> From a list of NIDs for a remote node, identifies the NID on which interface communication will occur.</para>
284               </entry>
285             </row>
286             <row>
287               <entry>
288                 <para> <literal>ping <replaceable>nid</replaceable></literal></para>
289               </entry>
290               <entry>
291                 <para> Checks LNet connectivity via an LNet ping. This uses the fabric appropriate to the specified NID.</para>
292               </entry>
293             </row>
294             <row>
295               <entry>
296                 <para> <literal>interface_list</literal></para>
297               </entry>
298               <entry>
299                 <para> Prints the network interface information for a given <emphasis>network</emphasis> type.</para>
300               </entry>
301             </row>
302             <row>
303               <entry>
304                 <para> <literal>peer_list</literal></para>
305               </entry>
306               <entry>
307                 <para> Prints the known peers for a given <emphasis>network</emphasis> type.</para>
308               </entry>
309             </row>
310             <row>
311               <entry>
312                 <para> <literal>conn_list</literal></para>
313               </entry>
314               <entry>
315                 <para> Prints all the connected remote NIDs for a given <emphasis>network</emphasis> type.</para>
316               </entry>
317             </row>
318             <row>
319               <entry>
320                 <para> <literal>active_tx</literal></para>
321               </entry>
322               <entry>
323                 <para> This command prints active transmits. It is only used for the Elan <emphasis>network</emphasis> type.</para>
324               </entry>
325             </row>
326             <row>
327               <entry>
328                 <para> <literal>route_list</literal></para>
329               </entry>
330               <entry>
331                 <para> Prints the complete routing table.</para>
332               </entry>
333             </row>
334           </tbody>
335         </tgroup>
336       </informaltable>
337       <para><emphasis role="bold">Device Selection</emphasis></para>
338       <informaltable frame="all">
339         <tgroup cols="3">
340           <colspec colname="c1" colwidth="33*"/>
341           <colspec colname="c2" colwidth="33*"/>
342           <colspec colname="c3" colwidth="33*"/>
343           <thead>
344             <row>
345               <entry>
346                 <para><emphasis role="bold">Option</emphasis></para>
347               </entry>
348               <entry>
349                 <para><emphasis role="bold">&#160;</emphasis></para>
350               </entry>
351               <entry>
352                 <para><emphasis role="bold">Description</emphasis></para>
353               </entry>
354             </row>
355           </thead>
356           <tbody>
357             <row>
358               <entry>
359                 <para> <literal>device <replaceable>devname</replaceable></literal></para>
360               </entry>
361               <entry>
362                 <para> &#160;</para>
363               </entry>
364               <entry>
365                 <para> This selects the specified OBD device. All other commands depend on the device being set.</para>
366               </entry>
367             </row>
368             <row>
369               <entry>
370                 <para> <literal>device_list</literal></para>
371               </entry>
372               <entry>
373                 <para> &#160;</para>
374               </entry>
375               <entry>
376                 <para> Shows the local Lustre OBDs, a/k/a <literal>dl</literal>.</para>
377               </entry>
378             </row>
379           </tbody>
380         </tgroup>
381       </informaltable>
382       <para><emphasis role="bold">Device Operations</emphasis></para>
383       <informaltable frame="all">
384         <tgroup cols="3">
385           <colspec colname="c1" colwidth="33*"/>
386           <colspec colname="c2" colwidth="33*"/>
387           <colspec colname="c3" colwidth="33*"/>
388           <thead>
389             <row>
390               <entry nameend="c2" namest="c1">
391                 <para><emphasis role="bold">Option</emphasis></para>
392               </entry>
393               <entry>
394                 <para><emphasis role="bold">Description</emphasis></para>
395               </entry>
396             </row>
397           </thead>
398           <tbody>
399             <row>
400               <entry nameend="c2" namest="c1">
401                 <para> <literal>list_param [-F|-R] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
402               </entry>
403               <entry>
404                 <para> Lists the Lustre or LNet parameter name.</para>
405                 <para>&#160;</para>
406               </entry>
407             </row>
408             <row>
409               <entry>
410                 <para> &#160;</para>
411               </entry>
412               <entry>
413                 <para> <literal>-F</literal></para>
414               </entry>
415               <entry>
416                 <para> Adds &apos;/&apos;, &apos;@&apos; or &apos;=&apos; for directories, symlinks and writeable files, respectively.</para>
417               </entry>
418             </row>
419             <row>
420               <entry>
421                 <para> &#160;</para>
422               </entry>
423               <entry>
424                 <para> <literal>-R</literal></para>
425               </entry>
426               <entry>
427                 <para> Recursively lists all parameters under the specified path. If <literal>param_path</literal> is unspecified, all parameters are shown.</para>
428               </entry>
429             </row>
430             <row>
431               <entry nameend="c2" namest="c1">
432                 <para> <literal>get_param [-n|-N|-F] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
433               </entry>
434               <entry>
435                 <para> Gets the value of a Lustre or LNet parameter from the specified path.</para>
436               </entry>
437             </row>
438             <row>
439               <entry>
440                 <para> &#160;</para>
441               </entry>
442               <entry>
443                 <para> <literal>-n</literal></para>
444               </entry>
445               <entry>
446                 <para> Prints only the parameter value and not the parameter name.</para>
447               </entry>
448             </row>
449             <row>
450               <entry>
451                 <para> &#160;</para>
452               </entry>
453               <entry>
454                 <para> <literal>-N</literal></para>
455               </entry>
456               <entry>
457                 <para> Prints only matched parameter names and not the values; especially useful when using patterns.</para>
458               </entry>
459             </row>
460             <row>
461               <entry>
462                 <para> &#160;</para>
463               </entry>
464               <entry>
465                 <para> <literal>-F</literal></para>
466               </entry>
467               <entry>
468                 <para> When <literal>-N</literal> is specified, adds &apos;/&apos;, &apos;@&apos; or &apos;=&apos; for directories, symlinks and writeable files, respectively.</para>
469               </entry>
470             </row>
471             <row>
472               <entry nameend="c2" namest="c1">
473                 <para> <literal>set_param [-n] <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
474               </entry>
475               <entry>
476                 <para> Sets the value of a Lustre or LNet parameter from the specified path.</para>
477               </entry>
478             </row>
479             <row>
480               <entry>
481                 <para> &#160;</para>
482               </entry>
483               <entry>
484                 <para> <literal>-n</literal></para>
485               </entry>
486               <entry>
487                 <para> Disables printing of the key name when printing values.</para>
488               </entry>
489             </row>
490             <row>
491               <entry nameend="c2" namest="c1">
492                 <para><literal>conf_param [-d] <replaceable>device|fsname</replaceable> <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
493               </entry>
494               <entry>
495                 <para> Sets a permanent configuration parameter for any device via the MGS. This command must be run on the MGS node.</para>
496                 <para>All writeable parameters under <literal>lctl list_param</literal> (e.g. <literal>lctl list_param -F osc.*.* | grep</literal> =) can be permanently set using <literal>lctl conf_param</literal>, but the format is slightly different. For <literal>conf_param</literal>, the device is specified first, then the obdtype. Wildcards are not supported. Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout). For system-wide parameters, <replaceable>device</replaceable> is ignored.</para>
497                 <para>For more information on setting permanent parameters and <literal>lctl conf_param</literal> command examples, see <xref linkend="dbdoclet.50438194_64195"/> (Setting Permanent Parameters).</para>
498               </entry>
499             </row>
500             <row>
501               <entry>
502                 <para> &#160;</para>
503               </entry>
504               <entry>
505                 <para><literal>-d <replaceable>device|fsname</replaceable>.<replaceable>parameter</replaceable></literal></para>
506                 <para>&#160;</para>
507               </entry>
508               <entry>
509                 <para> Deletes a parameter setting (use the default value at the next restart). A null value for <replaceable>value</replaceable> also deletes the parameter setting.</para>
510               </entry>
511             </row>
512             <row>
513               <entry nameend="c2" namest="c1">
514                 <para> <literal>activate</literal></para>
515               </entry>
516               <entry>
517                 <para> Re-activates an import after the deactivate operation. This setting is only effective until the next restart (see <literal>conf_param</literal>).</para>
518               </entry>
519             </row>
520             <row>
521               <entry nameend="c2" namest="c1">
522                 <para> <literal>deactivate</literal></para>
523               </entry>
524               <entry>
525                 <para> Deactivates an import, in particular meaning do not assign new file stripes to an OSC. Running lctl deactivate on the MDS stops new objects from being allocated on the OST. Running lctl deactivate on Lustre clients causes them to return -EIO when accessing objects on the OST instead of waiting for recovery.</para>
526               </entry>
527             </row>
528             <row>
529               <entry nameend="c2" namest="c1">
530                 <para> <literal>abort_recovery</literal></para>
531               </entry>
532               <entry>
533                 <para> Aborts the recovery process on a re-starting MDT or OST.</para>
534               </entry>
535             </row>
536           </tbody>
537         </tgroup>
538       </informaltable>
539       <note>
540         <para>Lustre tunables are not always accessible using the procfs interface, as it is platform-specific. As a solution, <literal>lctl {get,set,list}_param</literal> has been introduced as a platform-independent interface to the Lustre tunables. Avoid direct references to <literal>/proc/{fs,sys}/{lustre,lnet}</literal>. For future portability, use <literal>lctl {get,set,list}_param</literal> instead.</para>
541       </note>
542       <para><emphasis role="bold">Virtual Block Device Operations</emphasis></para>
543       <para>Lustre can emulate a virtual block device upon a regular file. This emulation is needed when you are trying to set up a swap space via the file.</para>
544       <informaltable frame="all">
545         <tgroup cols="2">
546           <colspec colname="c1" colwidth="50*"/>
547           <colspec colname="c2" colwidth="50*"/>
548           <thead>
549             <row>
550               <entry>
551                 <para><emphasis role="bold">Option</emphasis></para>
552               </entry>
553               <entry>
554                 <para><emphasis role="bold">Description</emphasis></para>
555               </entry>
556             </row>
557           </thead>
558           <tbody>
559             <row>
560               <entry>
561                 <para><literal>blockdev_attach <replaceable>filename</replaceable> <replaceable>/dev/lloop_device</replaceable></literal></para>
562               </entry>
563               <entry>
564                 <para> Attaches a regular Lustre file to a block device. If the device node does not exist, <literal>lctl</literal> creates it. It is recommend that a device node is created by <literal>lctl</literal> since the emulator uses a dynamical major number.</para>
565               </entry>
566             </row>
567             <row>
568               <entry>
569                 <para><literal>blockdev_detach <replaceable>/dev/lloop_device</replaceable></literal></para>
570               </entry>
571               <entry>
572                 <para> Detaches the virtual block device.</para>
573               </entry>
574             </row>
575             <row>
576               <entry>
577                 <para><literal>blockdev_info <replaceable>/dev/lloop_device</replaceable></literal></para>
578               </entry>
579               <entry>
580                 <para> Provides information about the Lustre file attached to the device node.</para>
581               </entry>
582             </row>
583           </tbody>
584         </tgroup>
585       </informaltable>
586       <para><emphasis role="bold">Changelogs</emphasis></para>
587       <informaltable frame="all">
588         <tgroup cols="2">
589           <colspec colname="c1" colwidth="50*"/>
590           <colspec colname="c2" colwidth="50*"/>
591           <thead>
592             <row>
593               <entry>
594                 <para><emphasis role="bold">Option</emphasis></para>
595               </entry>
596               <entry>
597                 <para><emphasis role="bold">Description</emphasis></para>
598               </entry>
599             </row>
600           </thead>
601           <tbody>
602             <row>
603               <entry>
604                 <para> <literal>changelog_register</literal></para>
605               </entry>
606               <entry>
607                 <para> Registers a new changelog user for a particular device.
608                 Changelog entries are saved persistently on the MDT with each
609                 filesystem operation, and are only purged beyond all registered
610                 user&apos;s minimum set point (see
611                 <literal>lfs changelog_clear</literal>). This may cause the
612                 Changelog to consume a large amount of space, eventually
613                 filling the MDT, if a changelog user is registered but never
614                 consumes those records.</para>
615               </entry>
616             </row>
617             <row>
618               <entry>
619                 <para>changelog_deregister <replaceable>id</replaceable></para>
620               </entry>
621               <entry>
622                 <para> Unregisters an existing changelog user. If the
623                 user&apos;s &quot;clear&quot; record number is the minimum for
624                 the device, changelog records are purged until the next minimum.
625                 </para>
626               </entry>
627             </row>
628           </tbody>
629         </tgroup>
630       </informaltable>
631       <para><emphasis role="bold">Debug</emphasis></para>
632       <informaltable frame="all">
633         <tgroup cols="2">
634           <colspec colname="c1" colwidth="50*"/>
635           <colspec colname="c2" colwidth="50*"/>
636           <thead>
637             <row>
638               <entry>
639                 <para><emphasis role="bold">Option</emphasis></para>
640               </entry>
641               <entry>
642                 <para><emphasis role="bold">Description</emphasis></para>
643               </entry>
644             </row>
645           </thead>
646           <tbody>
647             <row>
648               <entry>
649                 <para> <literal>debug_daemon</literal></para>
650               </entry>
651               <entry>
652                 <para> Starts and stops the debug daemon, and controls the output filename and size.</para>
653               </entry>
654             </row>
655             <row>
656               <entry>
657                 <para> <literal>debug_kernel <replaceable>[file]</replaceable> [raw]</literal></para>
658               </entry>
659               <entry>
660                 <para> Dumps the kernel debug buffer to stdout or a file.</para>
661               </entry>
662             </row>
663             <row>
664               <entry>
665                 <para><literal>debug_file <replaceable>input_file</replaceable> <replaceable>[output_file]</replaceable></literal></para>
666               </entry>
667               <entry>
668                 <para> Converts the kernel-dumped debug log from binary to plain text format.</para>
669               </entry>
670             </row>
671             <row>
672               <entry>
673                 <para> <literal>clear</literal></para>
674               </entry>
675               <entry>
676                 <para> Clears the kernel debug buffer.</para>
677               </entry>
678             </row>
679             <row>
680               <entry>
681                 <para> <literal>mark <replaceable>text</replaceable></literal></para>
682               </entry>
683               <entry>
684                 <para> Inserts marker text in the kernel debug buffer.</para>
685               </entry>
686             </row>
687             <row>
688               <entry>
689                 <para> <literal>filter <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
690               </entry>
691               <entry>
692                 <para> Filters kernel debug messages by subsystem or mask.</para>
693               </entry>
694             </row>
695             <row>
696               <entry>
697                 <para> <literal>show <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
698               </entry>
699               <entry>
700                 <para> Shows specific types of messages.</para>
701               </entry>
702             </row>
703             <row>
704               <entry>
705                 <para> <literal>debug_list <replaceable>subsystems|types</replaceable></literal></para>
706               </entry>
707               <entry>
708                 <para> Lists all subsystem and debug types.</para>
709               </entry>
710             </row>
711             <row>
712               <entry>
713                 <para> <literal>modules <replaceable>path</replaceable></literal></para>
714               </entry>
715               <entry>
716                 <para> Provides GDB-friendly module information.</para>
717               </entry>
718             </row>
719           </tbody>
720         </tgroup>
721       </informaltable>
722     </section>
723     <section remap="h5">
724       <title>Options</title>
725       <para>Use the following options to invoke lctl.</para>
726       <informaltable frame="all">
727         <tgroup cols="2">
728           <colspec colname="c1" colwidth="50*"/>
729           <colspec colname="c2" colwidth="50*"/>
730           <thead>
731             <row>
732               <entry>
733                 <para><emphasis role="bold">Option</emphasis></para>
734               </entry>
735               <entry>
736                 <para><emphasis role="bold">Description</emphasis></para>
737               </entry>
738             </row>
739           </thead>
740           <tbody>
741             <row>
742               <entry>
743                 <para> <literal>--device</literal></para>
744               </entry>
745               <entry>
746                 <para> Device to be used for the operation (specified by name or number). See device_list.</para>
747               </entry>
748             </row>
749             <row>
750               <entry>
751                 <para> <literal>--ignore_errors | ignore_errors</literal></para>
752               </entry>
753               <entry>
754                 <para> Ignores errors during script processing.</para>
755               </entry>
756             </row>
757           </tbody>
758         </tgroup>
759       </informaltable>
760     </section>
761     <section remap="h5">
762       <title>Examples</title>
763       <para><literal>lctl</literal></para>
764       <screen>$ lctl
765 lctl &gt; dl 
766    0 UP mgc MGC192.168.0.20@tcp btbb24e3-7deb-2ffa-eab0-44dffe00f692 5 
767    1 UP ost OSS OSS_uuid 3 
768    2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3 
769 lctl &gt; dk /tmp/log Debug log: 87 lines, 87 kept, 0 dropped. 
770 lctl &gt; quit</screen>
771     </section>
772     <section remap="h5">
773       <title>See Also</title>
774       <itemizedlist>
775         <listitem>
776           <para> <xref linkend="dbdoclet.50438219_75432"/> </para>
777         </listitem>
778         <listitem>
779           <para> <xref linkend="dbdoclet.50438219_12635"/> </para>
780         </listitem>
781         <listitem>
782           <para> <xref linkend="dbdoclet.50438219_38274"/> </para>
783         </listitem>
784         <listitem>
785           <para> <xref linkend="dbdoclet.50438206_94597"/> </para>
786         </listitem>
787       </itemizedlist>
788     </section>
789   </section>
790   <section xml:id="dbdoclet.50438219_58217">
791     <title><indexterm><primary>ll_decode_filter_fid</primary></indexterm>
792 ll_decode_filter_fid</title>
793     <para>The <literal>ll_decode_filter_fid</literal> utility displays the
794     Lustre object ID and MDT parent FID.</para>
795     <section remap="h5">
796       <title>Synopsis</title>
797       <screen>ll_decode_filter_fid object_file [object_file ...]</screen>
798     </section>
799     <section remap="h5">
800       <title>Description</title>
801       <para>The ll_decode_filter_fid utility decodes and prints the Lustre OST
802         object ID, MDT FID, stripe index for the specified OST object(s), which
803         is stored in the &quot;trusted.fid&quot; attribute on each OST object.
804         This is accessible to <literal>ll_decode_filter_fid</literal> when the
805         OST file system is mounted locally as type ldiskfs for maintenance.
806       </para>
807       <para>The &quot;trusted.fid&quot; extended attribute is stored on each
808         OST object when it is first modified (data written or attributes set),
809         and is not accessed or modified by Lustre after that time.</para>
810       <para>The OST object ID (objid) may be useful in case of OST directory
811         corruption, though LFSCK can normally reconstruct the entire OST object
812         directory tree, see <xref linkend="dbdoclet.lfsckadmin" /> for details.
813         The MDS FID can be useful to determine which MDS inode an OST object
814         is (or was) used by. The stripe index can be used in conjunction with
815         other OST objects to reconstruct the layout of a file even if the MDT
816         inode was lost.
817       </para>
818     </section>
819     <section remap="h5">
820       <title>Examples</title>
821       <screen>root@oss1# cd /mnt/ost/lost+found
822 root@oss1# ll_decode_filter_fid #12345[4,5,8]
823 #123454: objid=690670 seq=0 parent=[0x751c5:0xfce6e605:0x0]
824 #123455: objid=614725 seq=0 parent=[0x18d11:0xebba84eb:0x1]
825 #123458: objid=533088 seq=0 parent=[0x21417:0x19734d61:0x0]</screen>
826       <para>This shows that the three files in lost+found have decimal object IDs - 690670, 614725, and 533088, respectively. The object sequence number (formerly object group) is 0 for all current OST objects.</para>
827       <para>The MDT parent inode FIDs are hexadecimal numbers of the form sequence:oid:idx. Since the sequence number is below 0x100000000 in all these cases, the FIDs are in the legacy Inode and Generation In FID (IGIF) namespace and are mapped directly to the MDT inode = seq and generation = oid values; the MDT inodes are 0x751c5, 0x18d11, and 0x21417 respectively. For objects with MDT parent sequence numbers above 0x200000000, this indicates that the FID needs to be mapped via the MDT Object Index (OI) file on the MDT to determine the internal inode number.</para>
828       <para>The idx field shows the stripe number of this OST object in the Lustre RAID-0 striped file.</para>
829     </section>
830     <section remap="h5">
831       <title>See Also</title>
832       <para><xref linkend="dbdoclet.50438219_44971"/></para>
833     </section>
834   </section>
835   <section xml:id="dbdoclet.50438219_44971" condition='l28'>
836     <title><indexterm><primary>ll_recover_lost_found_objs</primary></indexterm>
837 ll_recover_lost_found_objs</title>
838     <para>The <literal>ll_recover_lost_found_objs</literal> utility was
839       used to help recover Lustre OST objects (file data) from the
840       <literal>lost+found</literal> directory of an OST and return them to
841       their correct locations based on information stored in the
842       <literal>trusted.fid</literal> extended attribute stored on every
843       OST object containing data.</para>
844     <note condition="l26"><para>This utility is not needed with Lustre 2.6
845       and later, and is removed in Lustre 2.8 since <literal>LFSCK</literal>
846       online scanning will automatically move objects from
847       <literal>lost+found</literal> to the proper place in the OST.</para>
848     </note>
849     <section remap="h5">
850       <title>Synopsis</title>
851       <screen>llobdstat ost_name [interval]</screen>
852     </section>
853     <section remap="h5">
854       <title>Description</title>
855       <para>The llobdstat utility displays a line of OST statistics for the given ost_name every interval seconds. It should be run directly on an OSS node. Type <literal>CTRL-C</literal> to stop statistics printing.</para>
856     </section>
857     <section remap="h5">
858       <title>Example</title>
859       <screen># llobdstat liane-OST0002 1
860 /usr/bin/llobdstat on /proc/fs/lustre/obdfilter/liane-OST0002/stats
861 Processor counters run at 2800.189 MHz
862 Read: 1.21431e+07, Write: 9.93363e+08, create/destroy: 24/1499, stat: 34, p\
863 unch: 18
864 [NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]
865 Timestamp Read-delta ReadRate Write-delta WriteRate
866 --------------------------------------------------------
867 1217026053 0.00MB 0.00MB/s 0.00MB 0.00MB/s
868 1217026054 0.00MB 0.00MB/s 0.00MB 0.00MB/s
869 1217026055 0.00MB 0.00MB/s 0.00MB 0.00MB/s
870 1217026056 0.00MB 0.00MB/s 0.00MB 0.00MB/s
871 1217026057 0.00MB 0.00MB/s 0.00MB 0.00MB/s
872 1217026058 0.00MB 0.00MB/s 0.00MB 0.00MB/s
873 1217026059 0.00MB 0.00MB/s 0.00MB 0.00MB/s st:1</screen>
874     </section>
875     <section remap="h5">
876       <title>Files</title>
877       <screen>/proc/fs/lustre/obdfilter/<replaceable>ostname</replaceable>/stats</screen>
878     </section>
879   </section>
880   <section xml:id="dbdoclet.50438219_90386">
881     <title><indexterm><primary>llog_reader</primary></indexterm>
882 llog_reader</title>
883     <para>The llog_reader utility translates a Lustre configuration log into human-readable form.</para>
884     <section remap="h5">
885       <title>Synopsis</title>
886       <screen>llog_reader filename</screen>
887     </section>
888     <section remap="h5">
889       <title>Description</title>
890       <para>The llog_reader utility parses the binary format of Lustre&apos;s on-disk configuration logs. Llog_reader can only read logs; use tunefs.lustre to write to them.</para>
891       <para>To examine a log file on a stopped Lustre server, mount its backing file system as ldiskfs or zfs, then use llog_reader to dump the log file&apos;s contents, for example:</para>
892       <screen>mount -t ldiskfs /dev/sda /mnt/mgs 
893 llog_reader /mnt/mgs/CONFIGS/tfs-client</screen>
894       <para>To examine the same log file on a running Lustre server, use the ldiskfs-enabled debugfs utility (called debug.ldiskfs on some distributions) to extract the file, for example:</para>
895       <screen>debugfs -c -R &apos;dump CONFIGS/tfs-client /tmp/tfs-client&apos; /dev/sda 
896 llog_reader /tmp/tfs-client</screen>
897       <caution>
898         <para>Although they are stored in the CONFIGS directory, mountdata files do not use the configuration log format and will confuse the llog_reader utility.</para>
899       </caution>
900     </section>
901     <section remap="h5">
902       <title>See Also</title>
903       <para><xref linkend="dbdoclet.50438219_39574"/></para>
904     </section>
905   </section>
906   <section xml:id="dbdoclet.50438219_23232">
907     <title><indexterm><primary>llstat</primary></indexterm>
908 llstat</title>
909     <para>The llstat utility displays Lustre statistics.</para>
910     <section remap="h5">
911       <title>Synopsis</title>
912       <screen>llstat [-c] [-g] [-i <replaceable>interval</replaceable>] <replaceable>stats_file
913 </replaceable></screen>
914     </section>
915     <section remap="h5">
916       <title>Description</title>
917       <para>The llstat utility displays statistics from any of the Lustre statistics files that share a common format and are updated at <literal>interval</literal> seconds. To stop statistics printing, use <literal>ctrl</literal>-<literal>c.</literal></para>
918     </section>
919     <section remap="h5">
920       <title>Options</title>
921       <informaltable frame="all">
922         <tgroup cols="2">
923           <colspec colname="c1" colwidth="50*"/>
924           <colspec colname="c2" colwidth="50*"/>
925           <thead>
926             <row>
927               <entry>
928                 <para><emphasis role="bold">Option</emphasis></para>
929               </entry>
930               <entry>
931                 <para><emphasis role="bold">Description</emphasis></para>
932               </entry>
933             </row>
934           </thead>
935           <tbody>
936             <row>
937               <entry>
938                 <para> <literal>-c</literal></para>
939               </entry>
940               <entry>
941                 <para> Clears the statistics file.</para>
942               </entry>
943             </row>
944             <row>
945               <entry>
946                 <para> <literal>-i</literal></para>
947               </entry>
948               <entry>
949                 <para> Specifies the polling period (in seconds).</para>
950               </entry>
951             </row>
952             <row>
953               <entry>
954                 <para> <literal>-g</literal></para>
955               </entry>
956               <entry>
957                 <para> Specifies graphable output format.</para>
958               </entry>
959             </row>
960             <row>
961               <entry>
962                 <para> <literal>-h</literal></para>
963               </entry>
964               <entry>
965                 <para> Displays help information.</para>
966               </entry>
967             </row>
968             <row>
969               <entry>
970                 <para> <literal>stats_file</literal></para>
971               </entry>
972               <entry>
973                 <para> Specifies either the full path to a statistics file or the shorthand reference, <literal>mds</literal> or <literal>ost</literal></para>
974               </entry>
975             </row>
976           </tbody>
977         </tgroup>
978       </informaltable>
979     </section>
980     <section remap="h5">
981       <title>Example</title>
982       <para>To monitor /proc/fs/lustre/ost/OSS/ost/stats at 1 second intervals, run;</para>
983       <screen>llstat -i 1 ost</screen>
984     </section>
985     <section remap="h5">
986       <title>Files</title>
987       <para>The llstat files are located at:</para>
988       <screen>/proc/fs/lustre/mdt/MDS/*/stats
989 /proc/fs/lustre/mdt/*/exports/*/stats
990 /proc/fs/lustre/mdc/*/stats
991 /proc/fs/lustre/ldlm/services/*/stats
992 /proc/fs/lustre/ldlm/namespaces/*/pool/stats
993 /proc/fs/lustre/mgs/MGS/exports/*/stats
994 /proc/fs/lustre/ost/OSS/*/stats
995 /proc/fs/lustre/osc/*/stats
996 /proc/fs/lustre/obdfilter/*/exports/*/stats
997 /proc/fs/lustre/obdfilter/*/stats
998 /proc/fs/lustre/llite/*/stats
999 </screen>
1000     </section>
1001   </section>
1002   <section xml:id="dbdoclet.50438219_23648">
1003     <title><indexterm><primary>llverdev</primary></indexterm>
1004 llverdev</title>
1005     <para>The llverdev verifies a block device is functioning properly over its full size.</para>
1006     <section remap="h5">
1007       <title>Synopsis</title>
1008       <screen>llverdev [-c <replaceable>chunksize</replaceable>] [-f] [-h] [-o <replaceable>offset</replaceable>] [-l] [-p] [-r] [-t <replaceable>timestamp</replaceable>] [-v] [-w] <replaceable>device</replaceable></screen>
1009     </section>
1010     <section remap="h5">
1011       <title>Description</title>
1012       <para>Sometimes kernel drivers or hardware devices have bugs that prevent them from accessing the full device size correctly, or possibly have bad sectors on disk or other problems which prevent proper data storage. There are often defects associated with major system boundaries such as 2^32 bytes, 2^31 sectors, 2^31 blocks, 2^32 blocks, etc.</para>
1013       <para>The llverdev utility writes and verifies a unique test pattern across the entire device to ensure that data is accessible after it was written, and that data written to one part of the disk is not overwriting data on another part of the disk.</para>
1014       <para>It is expected that llverdev will be run on large size devices (TB). It is always better to run llverdev in verbose mode, so that device testing can be easily restarted from the point where it was stopped.</para>
1015       <para>Running a full verification can be time-consuming for very large devices. We recommend starting with a partial verification to ensure that the device is minimally sane before investing in a full verification.</para>
1016     </section>
1017     <section remap="h5">
1018       <title>Options</title>
1019       <informaltable frame="all">
1020         <tgroup cols="3">
1021           <colspec colname="c1" colwidth="33*"/>
1022           <colspec colname="c2" colwidth="33*"/>
1023           <colspec colname="c3" colwidth="33*"/>
1024           <thead>
1025             <row>
1026               <entry>
1027                 <para><emphasis role="bold">Option</emphasis></para>
1028               </entry>
1029               <entry>
1030                 <para><emphasis role="bold">&#160;</emphasis></para>
1031               </entry>
1032               <entry>
1033                 <para><emphasis role="bold">Description</emphasis></para>
1034               </entry>
1035             </row>
1036           </thead>
1037           <tbody>
1038             <row>
1039               <entry nameend="c2" namest="c1">
1040                 <para> <literal>-c|--chunksize</literal></para>
1041               </entry>
1042               <entry>
1043                 <para> I/O chunk size in bytes (default value is 1048576).</para>
1044               </entry>
1045             </row>
1046             <row>
1047               <entry nameend="c2" namest="c1">
1048                 <para> <literal>-f|--force</literal></para>
1049               </entry>
1050               <entry>
1051                 <para> Forces the test to run without a confirmation that the device will be overwritten and all data will be permanently destroyed.</para>
1052               </entry>
1053             </row>
1054             <row>
1055               <entry nameend="c2" namest="c1">
1056                 <para> <literal>-h|--help</literal></para>
1057               </entry>
1058               <entry>
1059                 <para> Displays a brief help message.</para>
1060               </entry>
1061             </row>
1062             <row>
1063               <entry nameend="c2" namest="c1">
1064                 <para> <literal>-o <replaceable>offset</replaceable></literal></para>
1065               </entry>
1066               <entry>
1067                 <para> Offset (in kilobytes) of the start of the test (default value is 0).</para>
1068               </entry>
1069             </row>
1070             <row>
1071               <entry nameend="c2" namest="c1">
1072                 <para> <literal>-l|--long</literal></para>
1073               </entry>
1074               <entry>
1075                 <para> Runs a full check, writing and then reading and verifying every block on the disk.</para>
1076               </entry>
1077             </row>
1078             <row>
1079               <entry nameend="c2" namest="c1">
1080                 <para> <literal>-p|--partial</literal></para>
1081               </entry>
1082               <entry>
1083                 <para> Runs a partial check, only doing periodic checks across the device (1 GB steps).</para>
1084               </entry>
1085             </row>
1086             <row>
1087               <entry nameend="c2" namest="c1">
1088                 <para> <literal>-r|--read</literal></para>
1089               </entry>
1090               <entry>
1091                 <para> Runs the test in read (verify) mode only, after having previously run the test in <literal>-w</literal> mode.</para>
1092               </entry>
1093             </row>
1094             <row>
1095               <entry nameend="c2" namest="c1">
1096                 <para> <literal>-t <replaceable>timestamp</replaceable></literal></para>
1097               </entry>
1098               <entry>
1099                 <para> Sets the test start time as printed at the start of a previously-interrupted
1100                   test to ensure that validation data is the same across the entire file system
1101                   (default value is the current time()).</para>
1102               </entry>
1103             </row>
1104             <row>
1105               <entry nameend="c2" namest="c1">
1106                 <para> <literal>-v|--verbose</literal></para>
1107               </entry>
1108               <entry>
1109                 <para> Runs the test in verbose mode, listing each read and write operation.</para>
1110               </entry>
1111             </row>
1112             <row>
1113               <entry nameend="c2" namest="c1">
1114                 <para> <literal>-w|--write</literal></para>
1115               </entry>
1116               <entry>
1117                 <para> Runs the test in write (test-pattern) mode (default runs both read and write).</para>
1118               </entry>
1119             </row>
1120           </tbody>
1121         </tgroup>
1122       </informaltable>
1123     </section>
1124     <section remap="h5">
1125       <title>Examples</title>
1126       <para>Runs a partial device verification on /dev/sda:</para>
1127       <screen>llverdev -v -p /dev/sda 
1128 llverdev: permanently overwrite all data on /dev/sda (yes/no)? y 
1129 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size 
1130 Timestamp: 1009839028 
1131 Current write offset: 4096 kB</screen>
1132       <para>Continues an interrupted verification at offset 4096kB from the start of the device, using the same timestamp as the previous run:</para>
1133       <screen>llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda 
1134 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size 
1135 Timestamp: 1009839028 
1136 write complete 
1137 read complete </screen>
1138     </section>
1139   </section>
1140   <section xml:id="dbdoclet.50438219_64286">
1141     <title><indexterm><primary>lshowmount</primary></indexterm>
1142 lshowmount</title>
1143     <para>The lshowmount utility shows Lustre exports.</para>
1144     <section remap="h5">
1145       <title>Synopsis</title>
1146       <screen>lshowmount [-ehlv]</screen>
1147     </section>
1148     <section remap="h5">
1149       <title>Description</title>
1150       <para>The lshowmount utility shows the hosts that have Lustre mounted to a server. This utility looks for exports from the MGS, MDS, and obdfilter.</para>
1151     </section>
1152     <section remap="h5">
1153       <title>Options</title>
1154       <informaltable frame="all">
1155         <tgroup cols="2">
1156           <colspec colname="c1" colwidth="50*"/>
1157           <colspec colname="c2" colwidth="50*"/>
1158           <thead>
1159             <row>
1160               <entry>
1161                 <para><emphasis role="bold">Option</emphasis></para>
1162               </entry>
1163               <entry>
1164                 <para><emphasis role="bold">Description</emphasis></para>
1165               </entry>
1166             </row>
1167           </thead>
1168           <tbody>
1169             <row>
1170               <entry>
1171                 <para> <literal>-e|--enumerate</literal></para>
1172               </entry>
1173               <entry>
1174                 <para> Causes lshowmount to list each client mounted on a separate line instead of trying to compress the list of clients into a hostrange string.</para>
1175               </entry>
1176             </row>
1177             <row>
1178               <entry>
1179                 <para> <literal>-h|--help</literal></para>
1180               </entry>
1181               <entry>
1182                 <para> Causes lshowmount to print out a usage message.</para>
1183               </entry>
1184             </row>
1185             <row>
1186               <entry>
1187                 <para> <literal>-l|--lookup</literal></para>
1188               </entry>
1189               <entry>
1190                 <para> Causes lshowmount to try to look up the hostname for NIDs that look like IP addresses.</para>
1191               </entry>
1192             </row>
1193             <row>
1194               <entry>
1195                 <para> <literal>-v|--verbose</literal></para>
1196               </entry>
1197               <entry>
1198                 <para> Causes lshowmount to output export information for each service instead of only displaying the aggregate information for all Lustre services on the server.</para>
1199               </entry>
1200             </row>
1201           </tbody>
1202         </tgroup>
1203       </informaltable>
1204     </section>
1205     <section remap="h5">
1206       <title>Files</title>
1207       <screen>/proc/fs/lustre/mgs/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1208 /proc/fs/lustre/mds/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1209 /proc/fs/lustre/obdfilter/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid</screen>
1210     </section>
1211   </section>
1212   <section xml:id="dbdoclet.50438219_90218">
1213     <title><indexterm><primary>lst</primary></indexterm>
1214 lst</title>
1215     <para>The lst utility starts LNet self-test.</para>
1216     <section remap="h5">
1217       <title>Synopsis</title>
1218       <screen>lst</screen>
1219     </section>
1220     <section remap="h5">
1221       <title>Description</title>
1222       <para>LNet self-test helps site administrators confirm that Lustre Networking (LNet) has been properly installed and configured. The self-test also confirms that LNet and the network software and hardware underlying it are performing as expected.</para>
1223       <para>Each LNet self-test runs in the context of a session. A node can be associated with only one session at a time, to ensure that the session has exclusive use of the nodes on which it is running. A session is create, controlled and monitored from a single node; this is referred to as the self-test console.</para>
1224       <para>Any node may act as the self-test console. Nodes are named and allocated to a self-test session in groups. This allows all nodes in a group to be referenced by a single name.</para>
1225       <para>Test configurations are built by describing and running test batches. A test batch is a named collection of tests, with each test composed of a number of individual point-to-point tests running in parallel. These individual point-to-point tests are instantiated according to the test type, source group, target group and distribution specified when the test is added to the test batch.</para>
1226     </section>
1227     <section remap="h5">
1228       <title>Modules</title>
1229       <para>To run LNet self-test, load these modules: libcfs, lnet, lnet_selftest and any one of the klnds (ksocklnd, ko2iblnd...). To load all necessary modules, run modprobe lnet_selftest, which recursively loads the modules on which lnet_selftest depends.</para>
1230       <para>There are two types of nodes for LNet self-test: the console node and test nodes. Both node types require all previously-specified modules to be loaded. (The userspace test node does not require these modules).</para>
1231       <para>Test nodes can be in either kernel or in userspace. A console user can invite a kernel test node to join the test session by running lst add_group NID, but the user cannot actively add a userspace test node to the test session. However, the console user can passively accept a test node to the test session while the test node runs lst client to connect to the console.</para>
1232     </section>
1233     <section remap="h5">
1234       <title>Utilities</title>
1235       <para>LNet self-test includes two user utilities, lst and lstclient.</para>
1236       <para>lst is the user interface for the self-test console (run on the console node). It provides a list of commands to control the entire test system, such as create session, create test groups, etc.</para>
1237       <para>lstclient is the userspace self-test program which is linked with userspace LNDs and LNet. A user can invoke lstclient to join a self-test session:</para>
1238       <screen>lstclient -sesid CONSOLE_NID group NAME</screen>
1239     </section>
1240     <section remap="h5">
1241       <title>Example Script</title>
1242       <para>This is a sample LNet self-test script which simulates the traffic pattern of a set of Lustre servers on a TCP network, accessed by Lustre clients on an IB network (connected via LNet routers), with half the clients reading and half the clients writing.</para>
1243       <screen>#!/bin/bash
1244 export LST_SESSION=$$
1245 lst new_session read/write
1246 lst add_group servers 192.168.10.[8,10,12-16]@tcp
1247 lst add_group readers 192.168.1.[1-253/2]@o2ib
1248 lst add_group writers 192.168.1.[2-254/2]@o2ib
1249 lst add_batch bulk_rw
1250 lst add_test --batch bulk_rw --from readers --to servers     brw read check\
1251 =simple size=1M
1252 lst add_test --batch bulk_rw --from writers --to servers     brw write chec\
1253 k=full size=4K
1254 # start running
1255 lst run bulk_rw
1256 # display server stats for 30 seconds
1257 lst stat servers &amp; sleep 30; kill $!
1258 # tear down
1259 lst end_session </screen>
1260     </section>
1261   </section>
1262   <section xml:id="dbdoclet.50438219_54734">
1263     <title><indexterm><primary>lustre_rmmod.sh</primary></indexterm>
1264 lustre_rmmod.sh</title>
1265     <para>The lustre_rmmod.sh utility removes all Lustre and LNet modules (assuming no Lustre services are running). It is located in /usr/bin.</para>
1266     <note>
1267       <para>The lustre_rmmod.sh utility does not work if Lustre modules are being used or if you have manually run the lctl network up command.</para>
1268     </note>
1269   </section>
1270   <section xml:id="dbdoclet.50438219_63667">
1271     <title><indexterm><primary>lustre_rsync</primary></indexterm>
1272 lustre_rsync</title>
1273     <para>The lustre_rsync utility synchronizes (replicates) a Lustre file system to a target file system.</para>
1274     <section remap="h5">
1275       <title>Synopsis</title>
1276       <screen>lustre_rsync --source|-s <replaceable>src</replaceable> --target|-t <replaceable>tgt</replaceable> 
1277    --mdt|-m <replaceable>mdt</replaceable> [--user|-u <replaceable>userid</replaceable>]
1278    [--xattr|-x <replaceable>yes|no</replaceable>] [--verbose|-v]
1279    [--statuslog|-l <replaceable>log</replaceable>] [--dry-run] [--abort-on-err] 
1280  
1281 lustre_rsync --statuslog|-l <replaceable>log</replaceable>
1282  
1283 lustre_rsync --statuslog|-l <replaceable>log</replaceable> --source|-s <replaceable>source</replaceable>
1284    --target|-t <replaceable>tgt</replaceable> --mdt|-m <replaceable>mdt</replaceable></screen>
1285     </section>
1286     <section remap="h5">
1287       <title>Description</title>
1288       <para>The lustre_rsync utility is designed to synchronize (replicate) a Lustre file system (source) to another file system (target). The target can be a Lustre file system or any other type, and is a normal, usable file system. The synchronization operation is efficient and does not require directory walking, as lustre_rsync uses Lustre MDT changelogs to identify changes in the Lustre file system.</para>
1289       <para>Before using lustre_rsync:</para>
1290       <itemizedlist>
1291         <listitem>
1292           <para>A changelog user must be registered (see lctl (8) changelog_register)</para>
1293         </listitem>
1294       </itemizedlist>
1295       <para>- AND -</para>
1296       <itemizedlist>
1297         <listitem>
1298           <para>Verify that the Lustre file system (source) and the replica file system (target) are identical before the changelog user is registered. If the file systems are discrepant, use a utility, e.g. regular rsync (not lustre_rsync) to make them identical.</para>
1299         </listitem>
1300       </itemizedlist>
1301     </section>
1302     <section remap="h5">
1303       <title>Options</title>
1304       <informaltable frame="all">
1305         <tgroup cols="2">
1306           <colspec colname="c1" colwidth="50*"/>
1307           <colspec colname="c2" colwidth="50*"/>
1308           <thead>
1309             <row>
1310               <entry>
1311                 <para><emphasis role="bold">Option</emphasis></para>
1312               </entry>
1313               <entry>
1314                 <para><emphasis role="bold">Description</emphasis></para>
1315               </entry>
1316             </row>
1317           </thead>
1318           <tbody>
1319             <row>
1320               <entry>
1321                 <para> <literal>--source=<replaceable>src</replaceable></literal></para>
1322               </entry>
1323               <entry>
1324                 <para> The path to the root of the Lustre file system (source) which will be synchronized. This is a mandatory option if a valid status log created during a previous synchronization operation (--statuslog) is not specified.</para>
1325               </entry>
1326             </row>
1327             <row>
1328               <entry>
1329                 <para> <literal>--target=<replaceable>tgt</replaceable></literal></para>
1330               </entry>
1331               <entry>
1332                 <para> The path to the root where the source file system will be synchronized (target). This is a mandatory option if the status log created during a previous synchronization operation (--statuslog) is not specified. This option can be repeated if multiple synchronization targets are desired.</para>
1333               </entry>
1334             </row>
1335             <row>
1336               <entry>
1337                 <para> <literal>--mdt=<replaceable>mdt</replaceable></literal></para>
1338               </entry>
1339               <entry>
1340                 <para> The metadata device to be synchronized. A changelog user must be registered for this device. This is a mandatory option if a valid status log created during a previous synchronization operation (--statuslog) is not specified.</para>
1341               </entry>
1342             </row>
1343             <row>
1344               <entry>
1345                 <para> <literal>--user=<replaceable>userid</replaceable></literal></para>
1346               </entry>
1347               <entry>
1348                 <para> The changelog user ID for the specified MDT. To use lustre_rsync, the changelog user must be registered. For details, see the changelog_register parameter in the lctl man page. This is a mandatory option if a valid status log created during a previous synchronization operation (--statuslog) is not specified.</para>
1349               </entry>
1350             </row>
1351             <row>
1352               <entry>
1353                 <para> <literal>--statuslog=<replaceable>log</replaceable></literal></para>
1354               </entry>
1355               <entry>
1356                 <para> A log file to which synchronization status is saved. When lustre_rsync starts, the state of a previous replication is read from here. If the status log from a previous synchronization operation is specified, otherwise mandatory options like --source, --target and --mdt options may be skipped. By specifying options like --source, --target and/or --mdt in addition to the --statuslog option, parameters in the status log can be overridden. Command line options take precedence over options in the status log.</para>
1357               </entry>
1358             </row>
1359             <row>
1360               <entry>
1361                 <para> <literal>--xattr<replaceable>yes|no</replaceable></literal></para>
1362               </entry>
1363               <entry>
1364                 <para> Specifies whether extended attributes (xattrs) are synchronized or not. The default is to synchronize extended attributes.</para>
1365                 <para>NOTE: Disabling xattrs causes Lustre striping information not to be synchronized.</para>
1366               </entry>
1367             </row>
1368             <row>
1369               <entry>
1370                 <para> <literal>--verbose</literal></para>
1371               </entry>
1372               <entry>
1373                 <para> Produces a verbose output.</para>
1374               </entry>
1375             </row>
1376             <row>
1377               <entry>
1378                 <para> <literal>--dry-run</literal></para>
1379               </entry>
1380               <entry>
1381                 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1382               </entry>
1383             </row>
1384             <row>
1385               <entry>
1386                 <para> <literal>--abort-on-err</literal></para>
1387               </entry>
1388               <entry>
1389                 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1390               </entry>
1391             </row>
1392           </tbody>
1393         </tgroup>
1394       </informaltable>
1395     </section>
1396     <section remap="h5">
1397       <title>Examples</title>
1398       <para>Register a changelog user for an MDT (e.g., MDT lustre-MDT0000).</para>
1399       <screen>$ ssh 
1400 $ MDS lctl changelog_register \
1401            --device lustre-MDT0000 -n 
1402 cl1</screen>
1403       <para>Synchronize/replicate a Lustre file system (/mnt/lustre) to a target file system (/mnt/target).</para>
1404       <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \ 
1405            --mdt=lustre-MDT0000 --user=cl1 \ 
1406            --statuslog replicate.log  --verbose 
1407 Lustre filesystem: lustre 
1408 MDT device: lustre-MDT0000 
1409 Source: /mnt/lustre 
1410 Target: /mnt/target 
1411 Statuslog: sync.log 
1412 Changelog registration: cl1 
1413 Starting changelog record: 0 
1414 Errors: 0 
1415 lustre_rsync took 1 seconds 
1416 Changelog records consumed: 22
1417 </screen>
1418       <para>After the file system undergoes changes, synchronize the changes with the target file system. Only the statuslog name needs to be specified, as it has all the parameters passed earlier.</para>
1419       <screen>$ lustre_rsync --statuslog replicate.log --verbose 
1420 Replicating Lustre filesystem: lustre 
1421 MDT device: lustre-MDT0000 
1422 Source: /mnt/lustre 
1423 Target: /mnt/target 
1424 Statuslog: replicate.log 
1425 Changelog registration: cl1 
1426 Starting changelog record: 22 
1427 Errors: 0 
1428 lustre_rsync took 2 seconds 
1429 Changelog records consumed: 42</screen>
1430       <para>Synchronize a Lustre file system (/mnt/lustre) to two target file systems (/mnt/target1 and /mnt/target2).</para>
1431       <screen>$ lustre_rsync --source=/mnt/lustre \ 
1432    --target=/mnt/target1 --target=/mnt/target2 \ 
1433    --mdt=lustre-MDT0000 --user=cl1 
1434    --statuslog replicate.log</screen>
1435     </section>
1436     <section remap="h5">
1437       <title>See Also</title>
1438       <para><xref linkend="dbdoclet.50438206_94597"/></para>
1439     </section>
1440   </section>
1441   <section xml:id="dbdoclet.50438219_75432">
1442     <title><indexterm><primary>mkfs.lustre</primary></indexterm>
1443 mkfs.lustre</title>
1444     <para>The <literal>mkfs.lustre</literal> utility formats a disk for a Lustre service.</para>
1445     <section remap="h5">
1446       <title>Synopsis</title>
1447       <screen>mkfs.lustre <replaceable>target_type</replaceable> [options] <replaceable>device</replaceable></screen>
1448       <para>where <replaceable>target_type</replaceable> is one of the following:</para>
1449       <informaltable frame="all">
1450         <tgroup cols="2">
1451           <colspec colname="c1" colwidth="50*"/>
1452           <colspec colname="c2" colwidth="50*"/>
1453           <thead>
1454             <row>
1455               <entry>
1456                 <para><emphasis role="bold">Option</emphasis></para>
1457               </entry>
1458               <entry>
1459                 <para><emphasis role="bold">Description</emphasis></para>
1460               </entry>
1461             </row>
1462           </thead>
1463           <tbody>
1464             <row>
1465               <entry>
1466                 <para> <literal>--ost</literal></para>
1467               </entry>
1468               <entry>
1469                 <para> Object storage target (OST)</para>
1470               </entry>
1471             </row>
1472             <row>
1473               <entry>
1474                 <para> <literal>--mdt</literal></para>
1475               </entry>
1476               <entry>
1477                 <para> Metadata storage target (MDT)</para>
1478               </entry>
1479             </row>
1480             <row>
1481               <entry>
1482                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1483               </entry>
1484               <entry>
1485                 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1486               </entry>
1487             </row>
1488             <row>
1489               <entry>
1490                 <para> <literal>--mgs</literal></para>
1491               </entry>
1492               <entry>
1493                 <para> Configuration management service (MGS), one per site. This service can be
1494                   combined with one <literal>--mdt</literal> service by specifying both
1495                   types.</para>
1496               </entry>
1497             </row>
1498           </tbody>
1499         </tgroup>
1500       </informaltable>
1501     </section>
1502     <section remap="h5">
1503       <title>Description</title>
1504       <para><literal>mkfs.lustre</literal> is used to format a disk device for use as part of a
1505         Lustre file system. After formatting, a disk can be mounted to start the Lustre service
1506         defined by this command.</para>
1507       <para>When the file system is created, parameters can simply be added as a
1508           <literal>--param</literal> option to the <literal>mkfs.lustre</literal> command. See <xref
1509           linkend="dbdoclet.50438194_17237"/>.</para>
1510       <informaltable frame="all">
1511         <tgroup cols="3">
1512           <colspec colname="c1" colwidth="1*"/>
1513           <colspec colname="c2" colwidth="1*"/>
1514           <colspec colname="c3" colwidth="3*"/>
1515           <thead>
1516             <row>
1517               <entry nameend="c2" namest="c1">
1518                 <para><emphasis role="bold">Option</emphasis></para>
1519               </entry>
1520               <entry>
1521                 <para><emphasis role="bold">Description</emphasis></para>
1522               </entry>
1523             </row>
1524           </thead>
1525           <tbody>
1526             <row>
1527               <entry nameend="c2" namest="c1">
1528                 <para> <literal>--backfstype=<replaceable>fstype</replaceable></literal></para>
1529               </entry>
1530               <entry>
1531                 <para> Forces a particular format for the backing file system such as ldiskfs (the default) or zfs.</para>
1532               </entry>
1533             </row>
1534             <row>
1535               <entry nameend="c2" namest="c1">
1536                 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
1537               </entry>
1538               <entry>
1539                 <para> Sets a user comment about this disk, ignored by the Lustre software.</para>
1540               </entry>
1541             </row>
1542             <row>
1543               <entry nameend="c2" namest="c1">
1544                 <para> <literal>--device-size=<replaceable>#</replaceable>>KB</literal></para>
1545               </entry>
1546               <entry>
1547                 <para>Sets the device size for loop devices.</para>
1548               </entry>
1549             </row>
1550             <row>
1551               <entry nameend="c2" namest="c1">
1552                 <para> <literal>--dryrun</literal></para>
1553               </entry>
1554               <entry>
1555                 <para>Only prints what would be done; it does not affect the disk.</para>
1556               </entry>
1557             </row>
1558             <row>
1559               <entry nameend="c2" namest="c1"
1560                     ><literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
1561               <entry>Sets the NID(s) of all service nodes, including primary and failover partner
1562                 service nodes. The <literal>--servicenode</literal> option cannot be used with
1563                   <literal>--failnode</literal> option. See <xref
1564                   xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
1565                 more details.</entry>
1566             </row>
1567             <row>
1568               <entry nameend="c2" namest="c1">
1569                 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
1570               </entry>
1571               <entry>
1572                 <para>Sets the NID(s) of a failover service node for a primary server for a target.
1573                   The <literal>--failnode</literal> option cannot be used with
1574                     <literal>--servicenode</literal> option. See <xref
1575                     xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
1576                   for more details.<note>
1577                     <para>When the <literal>--failnode</literal> option is used, certain
1578                       restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
1579                         linkend="dbdoclet.50438188_92688"/>).</para>
1580                   </note></para>
1581               </entry>
1582             </row>
1583             <row>
1584               <entry nameend="c2" namest="c1">
1585                 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
1586               </entry>
1587               <entry>
1588                 <para> The Lustre file system of which this service/node will be a part. The default
1589                   file system name is <literal>lustre</literal>.</para>
1590                 <para>&#160;</para>
1591                 <note>
1592                   <para>The file system name is limited to 8 characters.</para>
1593                 </note>
1594               </entry>
1595             </row>
1596             <row>
1597               <entry nameend="c2" namest="c1">
1598                 <para>
1599                   <literal>--index=<replaceable>index_number</replaceable></literal></para>
1600               </entry>
1601               <entry>
1602                 <para>Specifies the OST or MDT number (0...N). This allows mapping between the OSS
1603                   and MDS node and the device on which the OST or MDT is located.</para>
1604               </entry>
1605             </row>
1606             <row>
1607               <entry nameend="c2" namest="c1">
1608                 <para> <literal>--mkfsoptions=<replaceable>opts</replaceable></literal></para>
1609               </entry>
1610               <entry>
1611                 <para>  Formats options for the backing file system. For example, ext3 options could be set here.</para>
1612               </entry>
1613             </row>
1614             <row>
1615               <entry nameend="c2" namest="c1">
1616                 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
1617               </entry>
1618               <entry>
1619                 <para>  Sets the mount options used when the backing file system is mounted.</para>
1620                 <warning><para>Unlike earlier versions of <literal>mkfs.lustre</literal>, this version completely replaces
1621                     the default mount options with those specified on the command line, and issues a
1622                     warning on stderr if any default mount options are omitted.</para></warning>
1623                 <para>The defaults for ldiskfs are:</para>
1624                 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
1625                 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
1626                 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
1627                 <para>Use care when altering the default mount options.</para>
1628               </entry>
1629             </row>
1630             <row>
1631               <entry nameend="c2" namest="c1">
1632                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1633                 <para>&#160;</para>
1634               </entry>
1635               <entry>
1636                 <para>  Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1637               </entry>
1638             </row>
1639             <row>
1640               <entry nameend="c2" namest="c1">
1641                 <para> <literal>--mgsnode=<replaceable>nid,...</replaceable></literal></para>
1642               </entry>
1643               <entry>
1644                 <para> Sets the NIDs of the MGS node, required for all targets other than the MGS.</para>
1645               </entry>
1646             </row>
1647             <row>
1648               <entry nameend="c2" namest="c1">
1649                 <para> <literal>--param <replaceable>key</replaceable>=<replaceable>value</replaceable></literal></para>
1650               </entry>
1651               <entry>
1652                 <para> Sets the permanent parameter <replaceable>key</replaceable> to value <replaceable>value</replaceable>. This option can be repeated as necessary. Typical options might include:</para>
1653               </entry>
1654             </row>
1655             <row>
1656               <entry>
1657                 <para> &#160;</para>
1658               </entry>
1659               <entry>
1660                 <para> <literal>--param sys.timeout=40</literal>></para>
1661               </entry>
1662               <entry>
1663                 <para> System obd timeout.</para>
1664               </entry>
1665             </row>
1666             <row>
1667               <entry>
1668                 <para> &#160;</para>
1669               </entry>
1670               <entry>
1671                 <para> <literal>--param lov.stripesize=2M</literal></para>
1672               </entry>
1673               <entry>
1674                 <para> Default stripe size.</para>
1675               </entry>
1676             </row>
1677             <row>
1678               <entry>
1679                 <para> &#160;</para>
1680               </entry>
1681               <entry>
1682                 <para> <literal>param lov.stripecount=2</literal></para>
1683               </entry>
1684               <entry>
1685                 <para> Default stripe count.</para>
1686               </entry>
1687             </row>
1688             <row>
1689               <entry>
1690                 <para> &#160;</para>
1691               </entry>
1692               <entry>
1693                 <para> <literal>--param failover.mode=failout</literal></para>
1694               </entry>
1695               <entry>
1696                 <para> Returns errors instead of waiting for recovery.</para>
1697               </entry>
1698             </row>
1699             <row>
1700               <entry nameend="c2" namest="c1">
1701                 <para> <literal>--quiet</literal></para>
1702               </entry>
1703               <entry>
1704                 <para> Prints less information.</para>
1705               </entry>
1706             </row>
1707             <row>
1708               <entry nameend="c2" namest="c1">
1709                 <para> <literal>--reformat</literal></para>
1710               </entry>
1711               <entry>
1712                 <para> Reformats an existing Lustre disk.</para>
1713               </entry>
1714             </row>
1715             <row>
1716               <entry nameend="c2" namest="c1">
1717                 <para> <literal>--stripe-count-hint=stripes</literal></para>
1718               </entry>
1719               <entry>
1720                 <para> Used to optimize the MDT&apos;s inode size.</para>
1721               </entry>
1722             </row>
1723             <row>
1724               <entry nameend="c2" namest="c1">
1725                 <para> <literal>--verbose</literal></para>
1726               </entry>
1727               <entry>
1728                 <para> Prints more information.</para>
1729               </entry>
1730             </row>
1731           </tbody>
1732         </tgroup>
1733       </informaltable>
1734     </section>
1735     <section remap="h5">
1736       <title>Examples</title>
1737       <para>Creates a combined MGS and MDT for file system <literal>testfs</literal> on, e.g., node <literal>cfs21</literal>:</para>
1738       <screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
1739       <para>Creates an OST for file system <literal>testfs</literal> on any node (using the above
1740         MGS):</para>
1741       <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
1742       <para>Creates a standalone MGS on, e.g., node <literal>cfs22</literal>:</para>
1743       <screen>mkfs.lustre --mgs /dev/sda1</screen>
1744       <para>Creates an MDT for file system <literal>myfs1</literal> on any node (using the above MGS):</para>
1745       <screen>mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2</screen>
1746     </section>
1747     <section remap="h5">
1748       <title>See Also</title>
1749       <itemizedlist>
1750         <listitem>
1751           <para><xref linkend="dbdoclet.50438219_75432"/>mkfs.lustre, </para>
1752         </listitem>
1753         <listitem>
1754           <para><xref linkend="dbdoclet.50438219_12635"/>mount.lustre, </para>
1755         </listitem>
1756         <listitem>
1757           <para><xref linkend="dbdoclet.50438206_94597"/>lfs</para>
1758         </listitem>
1759       </itemizedlist>
1760     </section>
1761   </section>
1762   <section xml:id="dbdoclet.50438219_12635">
1763     <title><indexterm><primary>mount.lustre</primary></indexterm>
1764 mount.lustre</title>
1765     <para>The mount.lustre utility starts a Lustre client or target service.</para>
1766     <section remap="h5">
1767       <title>Synopsis</title>
1768       <screen>mount -t lustre [-o options] device mountpoint
1769 </screen>
1770     </section>
1771     <section remap="h5">
1772       <title>Description</title>
1773       <para>The mount.lustre utility starts a Lustre client or target service. This program should not be called directly; rather, it is a helper program invoked through mount(8), as shown above. Use the umount command to stop Lustre clients and targets.</para>
1774       <para>There are two forms for the device option, depending on whether a client or a target service is started:</para>
1775       <informaltable frame="all">
1776         <tgroup cols="2">
1777           <colspec colname="c1" colwidth="50*"/>
1778           <colspec colname="c2" colwidth="50*"/>
1779           <thead>
1780             <row>
1781               <entry>
1782                 <para><emphasis role="bold">Option</emphasis></para>
1783               </entry>
1784               <entry>
1785                 <para><emphasis role="bold">Description</emphasis></para>
1786               </entry>
1787             </row>
1788           </thead>
1789           <tbody>
1790             <row>
1791               <entry>
1792                 <para> <literal><replaceable>mgsname</replaceable>:/<replaceable>fsname</replaceable><replaceable>[/subdir]</replaceable></literal></para>
1793               </entry>
1794               <entry>
1795               <para> Mounts the Lustre file system named
1796               <replaceable>fsname</replaceable> (optionally starting at
1797               subdirectory <replaceable>subdir</replaceable> within the
1798               filesystem, if specified) on the client at the directory
1799               <replaceable>mountpoint</replaceable>, by contacting the Lustre
1800               Management Service at <replaceable>mgsname</replaceable>.  The
1801               format for <replaceable>mgsname</replaceable> is defined below. A
1802               client file system can be listed in <literal>fstab(5)</literal>
1803               for automatic mount at boot time, is usable like any local file
1804               system, and provides a full POSIX standard-compliant interface.
1805               </para>
1806               </entry>
1807             </row>
1808             <row>
1809               <entry>
1810                 <para> <replaceable>block_device</replaceable></para>
1811               </entry>
1812               <entry>
1813                 <para> Starts the target service defined by the
1814                 <literal>mkfs.lustre(8)</literal> command on the physical disk
1815                 <replaceable>block_device</replaceable>.  The
1816                 <replaceable>block_device</replaceable> may be specified using
1817                 <literal>-L <replaceable>label</replaceable></literal> to find
1818                 the first block device with that label (e.g.
1819                 <literal>testfs-MDT0000</literal>), or by UUID using the
1820                 <literal>-U <replaceable>uuid</replaceable></literal> option.
1821                 Care should be taken if there is a device-level backup of the
1822                 target filesystem on the same node, which would have a
1823                 duplicate label and UUID if it has not been changed with
1824                 <literal>tune2fs(8)</literal> or similar.  The mounted target
1825                 service filesystem mounted at
1826                 <replaceable>mountpoint</replaceable> is only useful for
1827                 <literal>df(1)</literal> operations and appears in
1828                 <literal>/proc/mounts</literal> to show the device is in use.
1829                 </para>
1830               </entry>
1831             </row>
1832           </tbody>
1833         </tgroup>
1834       </informaltable>
1835     </section>
1836     <section remap="h5">
1837       <title>Options</title>
1838       <informaltable frame="all">
1839         <tgroup cols="2">
1840           <colspec colname="c1" colwidth="50*"/>
1841           <colspec colname="c2" colwidth="50*"/>
1842           <thead>
1843             <row>
1844               <entry>
1845                 <para><emphasis role="bold">Option</emphasis></para>
1846               </entry>
1847               <entry>
1848                 <para><emphasis role="bold">Description</emphasis></para>
1849               </entry>
1850             </row>
1851           </thead>
1852           <tbody>
1853             <row>
1854               <entry>
1855                 <para> <literal>mgsname=<replaceable>mgsnode</replaceable>[:<replaceable>mgsnode</replaceable>]</literal></para>
1856               </entry>
1857               <entry>
1858                 <para><replaceable>mgsname</replaceable> is a colon-separated
1859                 list of <replaceable>mgsnode</replaceable> names where the MGS
1860                 service may run.  Multiple <replaceable>mgsnode</replaceable>
1861                 values can be specified if the MGS service is configured for
1862                 HA failover and may be running on any one of the nodes.
1863                 </para>
1864               </entry>
1865             </row>
1866             <row>
1867               <entry>
1868                 <para> <literal>mgsnode=<replaceable>mgsnid</replaceable>[,<replaceable>mgsnid</replaceable>]</literal></para>
1869               </entry>
1870               <entry>
1871                 <para> Each <replaceable>mgsnode</replaceable> may specify a
1872                 comma-separated list of NIDs, if there are different LNet
1873                 interfaces for that <literal>mgsnode</literal>.
1874                 </para>
1875               </entry>
1876             </row>
1877             <row>
1878               <entry>
1879                 <para> <literal>mgssec=<replaceable>flavor</replaceable></literal></para>
1880               </entry>
1881               <entry>
1882                 <para>Specifies the encryption flavor for the initial network
1883                 RPC connection to the MGS.  Non-security flavors are:
1884                 <literal>null</literal>, <literal>plain</literal>, and
1885                 <literal>gssnull</literal>, which respectively disable, or
1886                 have no encryption or integrity features for testing purposes.
1887                 Kerberos flavors are: <literal>krb5n</literal>,
1888                 <literal>krb5a</literal>, <literal>krb5i</literal>, and
1889                 <literal>krb5p</literal>.  Shared-secret key flavors are:
1890                 <literal>skn</literal>, <literal>ska</literal>,
1891                 <literal>ski</literal>, and <literal>skpi</literal>, see the
1892                 <xref linkend="lustressk"/> for more details.  The security
1893                 flavor for client-to-server connections is specified in the
1894                 filesystem configuration that the client fetches from the MGS.
1895                 </para>
1896               </entry>
1897             </row>
1898             <row>
1899               <entry>
1900                 <para> <literal>skpath=<replaceable>file|directory</replaceable></literal></para>
1901               </entry>
1902               <entry>
1903                 <para condition='l29'>
1904                 Path to a file or directory with the keyfile(s) to load for
1905                 this mount command.  Keys are inserted into the
1906                 <literal>KEY_SPEC_SESSION_KEYRING</literal> keyring in the
1907                 kernel with a description containing
1908                 <literal>lustre:</literal> and a suffix which depends on
1909                 whether the context of the mount command is for an MGS,
1910                 MDT/OST, or client.
1911                 </para>
1912               </entry>
1913             </row>
1914             <row>
1915               <entry>
1916                 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
1917               </entry>
1918               <entry>
1919                 <para>Starts a client or MDT with a colon-separated list of
1920                 known inactive OSTs that it will not try to connect to.</para>
1921               </entry>
1922             </row>
1923           </tbody>
1924         </tgroup>
1925       </informaltable>
1926       <para>In addition to the standard mount(8) options, Lustre understands
1927       the following client-specific options:</para>
1928       <informaltable frame="all">
1929         <tgroup cols="2">
1930           <colspec colname="c1" colwidth="50*"/>
1931           <colspec colname="c2" colwidth="50*"/>
1932           <thead>
1933             <row>
1934               <entry>
1935                 <para><emphasis role="bold">Option</emphasis></para>
1936               </entry>
1937               <entry>
1938                 <para><emphasis role="bold">Description</emphasis></para>
1939               </entry>
1940             </row>
1941           </thead>
1942           <tbody>
1943             <row>
1944               <entry>
1945                 <para><literal>always_ping</literal></para>
1946               </entry>
1947               <entry>
1948                 <para condition='l29'>The client will periodically ping the server when it is
1949                 idle, even if the server <literal>ptlrpc</literal> module
1950                 is configured with the <literal>suppress_pings</literal>
1951                 option.  This allows clients to reliably use the filesystem
1952                 even if they are not part of an external client health
1953                 monitoring mechanism.
1954                 </para>
1955               </entry>
1956             </row>
1957             <row>
1958               <entry>
1959                 <para> <literal>flock</literal></para>
1960               </entry>
1961               <entry>
1962                 <para>Enables advisory file locking support between
1963                 participating applications using the <literal>flock(2)</literal>
1964                 system call.  This causes file locking to be coherent across all
1965                 client nodes also using this mount option.  This is useful if
1966                 applications need coherent userspace file locking across
1967                 multiple client nodes, but also imposes communications overhead
1968                 in order to maintain locking consistency between client nodes.
1969                 </para>
1970               </entry>
1971             </row>
1972             <row>
1973               <entry>
1974                 <para> <literal>localflock</literal></para>
1975               </entry>
1976               <entry>
1977                 <para>Enables client-local <literal>flock(2)</literal> support,
1978                 using only client-local advisory file locking.  This is faster
1979                 than using the global <literal>flock</literal> option, and can
1980                 be used for applications that depend on functioning
1981                 <literal>flock(2)</literal> but run only on a single node.
1982                 It has minimal overhead using only the Linux kernel's locks.
1983                 </para>
1984               </entry>
1985             </row>
1986             <row>
1987               <entry>
1988                 <para> <literal>noflock</literal></para>
1989               </entry>
1990               <entry>
1991                 <para>Disables <literal>flock(2)</literal> support entirely,
1992                 and is the default option. Applications calling
1993                 <literal>flock(2)</literal> get an
1994                 <literal>ENOSYS</literal> error. It is up to the administrator
1995                 to choose either the <literal>localflock</literal> or
1996                 <literal>flock</literal> mount option based on their
1997                 requirements.  It is possible to mount clients with different
1998                 options, and only those mounted with <literal>flock</literal>
1999                 will be coherent amongst each other.
2000                 </para>
2001               </entry>
2002             </row>
2003             <row>
2004               <entry>
2005                 <para> <literal>lazystatfs</literal></para>
2006               </entry>
2007               <entry>
2008                 <para>Allows <literal>statfs(2)</literal> (as used by
2009                 <literal>df(1)</literal> and <literal>lfs-df(1)</literal>) to
2010                 return even if some OST or MDT is unresponsive or has been
2011                 temporarily or permanently disabled in the configuration.
2012                 This avoids blocking until all of the targets are available.
2013                 This is the default behavior since Lustre 2.9.0.
2014                 </para>
2015               </entry>
2016             </row>
2017             <row>
2018               <entry>
2019                 <para> <literal>nolazystatfs</literal></para>
2020               </entry>
2021               <entry>
2022                 <para>Requires that <literal>statfs(2)</literal> block until all
2023                 OSTs and MDTs are available and have returned space usage.
2024                 </para>
2025               </entry>
2026             </row>
2027             <row>
2028               <entry>
2029                 <para> <literal>user_xattr</literal></para>
2030               </entry>
2031               <entry>
2032                 <para>Enables get/set of extended attributes by regular users
2033                 in the <literal>user.*</literal> namespace. See the
2034                 <literal>attr(5)</literal> manual page for more details.
2035                 </para>
2036               </entry>
2037             </row>
2038             <row>
2039               <entry>
2040                 <para> <literal>nouser_xattr</literal></para>
2041               </entry>
2042               <entry>
2043                 <para>Disables use of extended attributes in the
2044                 <literal>user.*</literal> namespace by regular users. Root
2045                 and system processes can still use extended attributes.</para>
2046               </entry>
2047             </row>
2048             <row>
2049               <entry>
2050                 <para> <literal>verbose</literal></para>
2051               </entry>
2052               <entry>
2053                 <para> Enable extra mount/umount console messages.</para>
2054               </entry>
2055             </row>
2056             <row>
2057               <entry>
2058                 <para> <literal>noverbose</literal></para>
2059               </entry>
2060               <entry>
2061                 <para> Disable mount/umount console messages.</para>
2062               </entry>
2063             </row>
2064             <row>
2065               <entry>
2066                 <para> <literal>user_fid2path</literal></para>
2067               </entry>
2068               <entry>
2069                 <para>Enable FID-to-path translation by regular users.
2070                 </para>
2071                 <note><para>This option allows a potential security hole because
2072                   it allows regular users direct access to a file by its Lustre
2073                   File ID.  This bypasses POSIX path-based permission checks,
2074                   and could allow the user to access a file in a directory that
2075                   they do not have access to. Regular POSIX file mode and ACL
2076                   permission checks are still performed on the file itself, so
2077                   users cannot access a file to which they have no permission.
2078                 </para></note>
2079               </entry>
2080             </row>
2081             <row>
2082               <entry>
2083                 <para> <literal>nouser_fid2path</literal></para>
2084               </entry>
2085               <entry>
2086                 <para> Disable FID to path translation by
2087                 regular users. Root and processes with
2088                 <literal>CAP_DAC_READ_SEARCH</literal> can still perform FID
2089                 to path translation.
2090                 </para>
2091               </entry>
2092             </row>
2093           </tbody>
2094         </tgroup>
2095       </informaltable>
2096       <para>In addition to the standard mount options and backing disk type
2097       (e.g. ldiskfs) options, Lustre understands the following server-specific
2098       mount options:</para>
2099       <informaltable frame="all">
2100         <tgroup cols="2">
2101           <colspec colname="c1" colwidth="50*"/>
2102           <colspec colname="c2" colwidth="50*"/>
2103           <thead>
2104             <row>
2105               <entry>
2106                 <para><emphasis role="bold">Option</emphasis></para>
2107               </entry>
2108               <entry>
2109                 <para><emphasis role="bold">Description</emphasis></para>
2110               </entry>
2111             </row>
2112           </thead>
2113           <tbody>
2114             <row>
2115               <entry>
2116                 <para> <literal>nosvc</literal></para>
2117               </entry>
2118               <entry>
2119                 <para>  Starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
2120               </entry>
2121             </row>
2122             <row>
2123               <entry>
2124                 <para> <literal>nomgs</literal></para>
2125               </entry>
2126               <entry>
2127                 <para>  Starts only the MDT (with a co-located MGS), without starting the MGS.</para>
2128               </entry>
2129             </row>
2130             <row>
2131               <entry>
2132                 <para> <literal>abort_recov</literal></para>
2133               </entry>
2134               <entry>
2135                 <para>  Aborts client recovery on that server and starts the target service immediately.</para>
2136               </entry>
2137             </row>
2138             <row>
2139               <entry>
2140                 <para> <literal>max_sectors_kb=<replaceable>KB</replaceable></literal></para>
2141               </entry>
2142               <entry>
2143                 <para condition='l2A'>Sets the block device parameter
2144                 <literal>max_sectors_kb</literal> limit for the MDT or OST
2145                 target being mounted to specified maximum number of kilobytes.
2146                 When <literal>max_sectors_kb</literal> isn't specified as a
2147                 mount option, it will automatically be set to the
2148                 <literal>max_hw_sectors_kb</literal> (up to a maximum of 16MiB)
2149                 for that block device. This default behavior is suited for
2150                 most users. When <literal>max_sectors_kb=0</literal> is used,
2151                 the current value for this tunable will be kept.
2152                 </para>
2153               </entry>
2154             </row>
2155             <row>
2156               <entry>
2157                 <para> <literal>md_stripe_cache_size</literal></para>
2158               </entry>
2159               <entry>
2160                 <para>  Sets the stripe cache size for server-side disk with a striped RAID configuration.</para>
2161               </entry>
2162             </row>
2163             <row>
2164               <entry>
2165                 <para> <literal>recovery_time_soft=<replaceable>timeout</replaceable></literal></para>
2166               </entry>
2167               <entry>
2168                 <para>Allows <literal>timeout</literal> seconds for clients to
2169                 reconnect for recovery after a server crash. This timeout is
2170                 incrementally extended if it is about to expire and the server
2171                 is still handling new connections from recoverable clients.
2172                 </para>
2173                 <para>The default soft recovery timeout is 3 times the value
2174                 of the Lustre timeout parameter (see
2175                 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2176                 timeout is 100 seconds, which would make the soft recovery
2177                 timeout default to 300 seconds (5 minutes). The soft recovery
2178                 timeout is set at mount time and will not change if the Lustre
2179                 timeout is changed after mount time.
2180                 </para>
2181               </entry>
2182             </row>
2183             <row>
2184               <entry>
2185                 <para> <literal>recovery_time_hard=<replaceable>timeout</replaceable></literal></para>
2186               </entry>
2187               <entry>
2188                 <para>The server is allowed to incrementally extend its timeout
2189                 up to a hard maximum of <replaceable>timeout</replaceable>
2190                 seconds.
2191                 </para>
2192                 <para>The default hard recovery timeout is 9 times the value
2193                 of the Lustre timeout parameter (see
2194                 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2195                 timeout is 100 seconds, which would make the hard recovery
2196                 timeout default to 900 seconds (15 minutes). The hard recovery
2197                 timeout is set at mount time and will not change if the Lustre
2198                 timeout is changed after mount time.
2199                 </para>
2200               </entry>
2201             </row>
2202             <row>
2203               <entry>
2204                 <para> <literal>noscrub</literal></para>
2205               </entry>
2206               <entry>
2207                 <para>Typically the MDT will detect restoration from a
2208                 file-level backup during mount. This mount option prevents
2209                 the OI Scrub from starting automatically when the MDT is
2210                 mounted. Manually starting LFSCK after mounting provides finer
2211                 control over the starting conditions. This mount option also
2212                 prevents OI scrub from occurring automatically when OI
2213                 inconsistency is detected (see
2214                 <xref linkend="dbdoclet.lfsck_auto_scrub"/>).
2215                 </para>
2216               </entry>
2217             </row>
2218           </tbody>
2219         </tgroup>
2220       </informaltable>
2221     </section>
2222     <section remap="h5">
2223       <title>Examples</title>
2224       <para>Starts a client for the Lustre file system
2225       <replaceable>chipfs</replaceable> at mount point
2226       <replaceable>/mnt/chip</replaceable>. The Management Service is running on
2227       a node reachable from this client via the cfs21@tcp0 NID.</para>
2228       <screen>mount -t lustre cfs21@tcp0:/chipfs /mnt/chip</screen>
2229       <para condition='l29'>Similar to the above example, but mounting a
2230       subdirectory under <replaceable>chipfs</replaceable> as a fileset.
2231       <screen>mount -t lustre cfs21@tcp0:/chipfs/v1_0 /mnt/chipv1_0</screen>
2232       </para>
2233       <para>Starts the Lustre metadata target service from /dev/sda1 on mount point /mnt/test/mdt.</para>
2234       <screen>mount -t lustre /dev/sda1 /mnt/test/mdt</screen>
2235       <para>Starts the testfs-MDT0000 service (using the disk label), but aborts the recovery process.</para>
2236       <screen>mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt</screen>
2237     </section>
2238     <section remap="h5">
2239       <title>See Also</title>
2240       <itemizedlist>
2241         <listitem>
2242           <para>  <xref linkend="dbdoclet.50438219_75432"/></para>
2243         </listitem>
2244         <listitem>
2245           <para>  <xref linkend="dbdoclet.50438219_39574"/></para>
2246         </listitem>
2247         <listitem>
2248           <para>  <xref linkend="dbdoclet.50438219_38274"/></para>
2249         </listitem>
2250         <listitem>
2251           <para>  <xref linkend="dbdoclet.50438206_94597"/></para>
2252         </listitem>
2253       </itemizedlist>
2254     </section>
2255   </section>
2256   <section xml:id="dbdoclet.50438219_82679">
2257     <title><indexterm><primary>plot-llstat</primary></indexterm>
2258 plot-llstat</title>
2259     <para>The plot-llstat utility plots Lustre statistics.</para>
2260     <section remap="h5">
2261       <title>Synopsis</title>
2262       <screen>plot-llstat results_filename [parameter_index]
2263 </screen>
2264     </section>
2265     <section remap="h5">
2266       <title>Description</title>
2267       <para>The plot-llstat utility generates a CSV file and instruction files for gnuplot from the output of llstat. Since llstat is generic in nature, plot-llstat is also a generic script. The value of parameter_index can be 1 for count per interval, 2 for count per second (default setting) or 3 for total count.</para>
2268       <para>The plot-llstat utility creates a .dat (CSV) file using the number of operations specified by the user. The number of operations equals the number of columns in the CSV file. The values in those columns are equal to the corresponding value of parameter_index in the output file.</para>
2269       <para>The plot-llstat utility also creates a .scr file that contains instructions for gnuplot to plot the graph. After generating the .dat and .scr files, the plot-llstat tool invokes gnuplot to display the graph.</para>
2270     </section>
2271     <section remap="h5">
2272       <title>Options</title>
2273       <informaltable frame="all">
2274         <tgroup cols="2">
2275           <colspec colname="c1" colwidth="50*"/>
2276           <colspec colname="c2" colwidth="50*"/>
2277           <thead>
2278             <row>
2279               <entry>
2280                 <para><emphasis role="bold">Option</emphasis></para>
2281               </entry>
2282               <entry>
2283                 <para><emphasis role="bold">Description</emphasis></para>
2284               </entry>
2285             </row>
2286           </thead>
2287           <tbody>
2288             <row>
2289               <entry>
2290                 <para> <literal>results_filename</literal></para>
2291               </entry>
2292               <entry>
2293                 <para> Output generated by plot-llstat</para>
2294               </entry>
2295             </row>
2296             <row>
2297               <entry>
2298                 <para> <literal>parameter_index</literal></para>
2299                 <para>&#160;</para>
2300               </entry>
2301               <entry>
2302                 <para> Value of parameter_index can be:</para>
2303                 <para> 1 - count per interval</para>
2304                 <para> 2 - count per second (default setting)</para>
2305                 <para> 3 - total count</para>
2306               </entry>
2307             </row>
2308           </tbody>
2309         </tgroup>
2310       </informaltable>
2311     </section>
2312     <section remap="h5">
2313       <title>Example</title>
2314       <screen>llstat -i2 -g -c lustre-OST0000 &gt; log
2315 plot-llstat log 3</screen>
2316     </section>
2317   </section>
2318   <section xml:id="dbdoclet.50438219_51496">
2319     <title><indexterm><primary>routerstat</primary></indexterm>
2320 routerstat</title>
2321     <para>The routerstat utility prints Lustre router statistics.</para>
2322     <section remap="h5">
2323       <title>Synopsis</title>
2324       <screen>routerstat [<replaceable>interval</replaceable>]</screen>
2325     </section>
2326     <section remap="h5">
2327       <title>Description</title>
2328       <para>The routerstat utility displays LNet router statistics. If no <literal><replaceable>interval</replaceable></literal> is specified, then statistics are sampled and printed only one time. Otherwise, statistics are sampled and printed at the specified <literal><replaceable>interval</replaceable></literal> (in seconds).</para>
2329     </section>
2330     <section remap="h5">
2331       <title>Output</title>
2332       <para>The routerstat output includes the following fields:</para>
2333       <informaltable frame="all">
2334         <tgroup cols="2">
2335           <colspec colname="c1" colwidth="50*"/>
2336           <colspec colname="c2" colwidth="50*"/>
2337           <thead>
2338             <row>
2339               <entry>
2340                 <para><emphasis role="bold">Output</emphasis></para>
2341               </entry>
2342               <entry>
2343                 <para><emphasis role="bold">Description</emphasis></para>
2344               </entry>
2345             </row>
2346           </thead>
2347           <tbody>
2348             <row>
2349               <entry>
2350                 <para> <literal>M</literal></para>
2351               </entry>
2352               <entry>
2353                 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2354               </entry>
2355             </row>
2356             <row>
2357               <entry>
2358                 <para> <literal>E</literal></para>
2359               </entry>
2360               <entry>
2361                 <para> Number of LNet errors</para>
2362               </entry>
2363             </row>
2364             <row>
2365               <entry>
2366                 <para> <literal>S</literal></para>
2367               </entry>
2368               <entry>
2369                 <para> Total size (length) of messages sent in bytes/ Number of messages sent</para>
2370               </entry>
2371             </row>
2372             <row>
2373               <entry>
2374                 <para> <literal>R</literal></para>
2375               </entry>
2376               <entry>
2377                 <para> Total size (length) of messages received in bytes/ Number of messages received</para>
2378               </entry>
2379             </row>
2380             <row>
2381               <entry>
2382                 <para> <literal>F</literal></para>
2383               </entry>
2384               <entry>
2385                 <para> Total size (length) of messages routed in bytes/ Number of messages routed</para>
2386               </entry>
2387             </row>
2388             <row>
2389               <entry>
2390                 <para> <literal>D</literal></para>
2391               </entry>
2392               <entry>
2393                 <para> Total size (length) of messages dropped in bytes/ Number of messages dropped</para>
2394               </entry>
2395             </row>
2396           </tbody>
2397         </tgroup>
2398       </informaltable>
2399       <para>When an <literal><replaceable>interval</replaceable></literal> is specified, additional lines of statistics are printed including the following fields:</para>
2400       <informaltable frame="all">
2401         <tgroup cols="2">
2402           <colspec colname="c1" colwidth="50*"/>
2403           <colspec colname="c2" colwidth="50*"/>
2404           <thead>
2405             <row>
2406               <entry>
2407                 <para><emphasis role="bold">Output</emphasis></para>
2408               </entry>
2409               <entry>
2410                 <para><emphasis role="bold">Description</emphasis></para>
2411               </entry>
2412             </row>
2413           </thead>
2414           <tbody>
2415             <row>
2416               <entry>
2417                 <para> <literal>M</literal></para>
2418               </entry>
2419               <entry>
2420                 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2421               </entry>
2422             </row>
2423             <row>
2424               <entry>
2425                 <para> <literal>E</literal></para>
2426               </entry>
2427               <entry>
2428                 <para> Number of LNet errors per second</para>
2429               </entry>
2430             </row>
2431             <row>
2432               <entry>
2433                 <para> <literal>S</literal></para>
2434               </entry>
2435               <entry>
2436                 <para> Rate of data sent in Mbytes per second/ Count of messages sent per second</para>
2437               </entry>
2438             </row>
2439             <row>
2440               <entry>
2441                 <para> <literal>R</literal></para>
2442               </entry>
2443               <entry>
2444                 <para> Rate of data received in Mbytes per second/ Count of messages received per second</para>
2445               </entry>
2446             </row>
2447             <row>
2448               <entry>
2449                 <para> <literal>F</literal></para>
2450               </entry>
2451               <entry>
2452                 <para> Rate of data routed in Mbytes per second/ Count of messages routed per second</para>
2453               </entry>
2454             </row>
2455             <row>
2456               <entry>
2457                 <para> <literal>D</literal></para>
2458               </entry>
2459               <entry>
2460                 <para> Rate of data dropped in Mbytes per second/ Count of messages dropped per second</para>
2461               </entry>
2462             </row>
2463           </tbody>
2464         </tgroup>
2465       </informaltable>
2466     </section>
2467     <section remap="h5">
2468       <title>Example</title>
2469       <screen># routerstat 1
2470 M 0(13) E 0 S 117379184/4250 R 878480/4356 F 0/0 D 0/0
2471 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2472 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2473 M   0( 13) E 0 S    8.00/     8 R    0.00/    16 F    0.00/     0 D 0.00/0
2474 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2475 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2476 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2477 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2478 M   0( 13) E 0 S    8.00/     8 R    0.00/    16 F    0.00/     0 D 0.00/0
2479 M   0( 13) E 0 S    7.00/     7 R    0.00/    14 F    0.00/     0 D 0.00/0
2480 ...</screen>
2481     </section>
2482     <section remap="h5">
2483       <title>Files</title>
2484       <para>The routerstat utility extracts statistics data from:</para>
2485       <screen>/proc/sys/lnet/stats</screen>
2486     </section>
2487   </section>
2488   <section xml:id="dbdoclet.50438219_39574">
2489     <title><indexterm><primary>tunefs.lustre</primary></indexterm>
2490 tunefs.lustre</title>
2491     <para>The tunefs.lustre utility modifies configuration information on a Lustre target disk.</para>
2492     <section remap="h5">
2493       <title>Synopsis</title>
2494       <screen>tunefs.lustre [options] <replaceable>/dev/device</replaceable></screen>
2495     </section>
2496     <section remap="h5">
2497       <title>Description</title>
2498       <para>tunefs.lustre is used to modify configuration information on a Lustre target disk. This does not reformat the disk or erase the target information, but modifying the configuration information can result in an unusable file system.</para>
2499       <caution>
2500         <para>Changes made here affect a file system only when the target is mounted the next time.</para>
2501       </caution>
2502       <para>With tunefs.lustre, parameters are &quot;additive&quot; -- new parameters are specified in addition to old parameters, they do not replace them. To erase all old tunefs.lustre parameters and just use newly-specified parameters, run:</para>
2503       <screen>$ tunefs.lustre --erase-params --param=<replaceable>new_parameters</replaceable> </screen>
2504       <para>The tunefs.lustre command can be used to set any parameter settable in a /proc/fs/lustre file and that has its own OBD device, so it can be specified as <replaceable>{obd|fsname}.obdtype.proc_file_name=value</replaceable>. For example:</para>
2505       <screen>$ tunefs.lustre --param mdt.identity_upcall=NONE /dev/sda1</screen>
2506     </section>
2507     <section remap="h5">
2508       <title>Options</title>
2509       <para>The tunefs.lustre options are listed and explained below.</para>
2510       <informaltable frame="all">
2511         <tgroup cols="2">
2512           <colspec colname="c1" colwidth="50*"/>
2513           <colspec colname="c2" colwidth="50*"/>
2514           <thead>
2515             <row>
2516               <entry>
2517                 <para><emphasis role="bold">Option</emphasis></para>
2518               </entry>
2519               <entry>
2520                 <para><emphasis role="bold">Description</emphasis></para>
2521               </entry>
2522             </row>
2523           </thead>
2524           <tbody>
2525             <row>
2526               <entry>
2527                 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
2528               </entry>
2529               <entry>
2530                 <para> Sets a user comment about this disk, ignored by Lustre.</para>
2531               </entry>
2532             </row>
2533             <row>
2534               <entry>
2535                 <para> <literal>--dryrun</literal></para>
2536               </entry>
2537               <entry>
2538                 <para> Only prints what would be done; does not affect the disk.</para>
2539               </entry>
2540             </row>
2541             <row>
2542               <entry>
2543                 <para> <literal>--erase-params</literal></para>
2544               </entry>
2545               <entry>
2546                 <para> Removes all previous parameter information.</para>
2547               </entry>
2548             </row>
2549             <row>
2550               <entry>
2551                 <literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
2552               <entry>Sets the NID(s) of all service nodes, including primary and failover partner
2553                 service nodes. The <literal>--servicenode</literal> option cannot be used with
2554                   <literal>--failnode</literal> option. See <xref
2555                   xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
2556                 more details.</entry>
2557             </row>
2558             <row>
2559               <entry>
2560                 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
2561               </entry>
2562               <entry>
2563                 <para>Sets the NID(s) of a failover service node for a primary server for a target.
2564                   The <literal>--failnode</literal> option cannot be used with
2565                     <literal>--servicenode</literal> option. See <xref
2566                     xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
2567                   for more details.<note>
2568                     <para>When the <literal>--failnode</literal> option is used, certain
2569                       restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
2570                         linkend="dbdoclet.50438188_92688"/>).</para>
2571                   </note></para>
2572               </entry>
2573             </row>
2574             <row>
2575               <entry>
2576                 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
2577               </entry>
2578               <entry>
2579                 <para> The Lustre file system of which this service will be a part. The default file
2580                   system name is <literal>lustre</literal>.</para>
2581               </entry>
2582             </row>
2583             <row>
2584               <entry>
2585                 <para> <literal>--index=<replaceable>index</replaceable></literal></para>
2586               </entry>
2587               <entry>
2588                 <para> Forces a particular OST or MDT index.</para>
2589               </entry>
2590             </row>
2591             <row>
2592               <entry>
2593                 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
2594               </entry>
2595               <entry>
2596                 <para> Sets the mount options used when the backing file system is mounted.</para>
2597                 <warning><para> Unlike earlier versions of tunefs.lustre, this version completely replaces the existing mount options with those specified on the command line, and issues a warning on stderr if any default mount options are omitted.</para></warning>
2598                 <para>The defaults for ldiskfs are:</para>
2599                 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
2600                 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
2601                 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
2602                 <para>Do not alter the default mount options unless you know what you are doing.</para>
2603               </entry>
2604             </row>
2605             <row>
2606               <entry>
2607                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
2608               </entry>
2609               <entry>
2610                 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
2611               </entry>
2612             </row>
2613             <row>
2614               <entry>
2615                 <para> <literal>--mgs</literal></para>
2616               </entry>
2617               <entry>
2618                 <para> Adds a configuration management service to this target.</para>
2619               </entry>
2620             </row>
2621             <row>
2622               <entry>
2623                 <para> <literal>--msgnode=<replaceable>nid,...</replaceable></literal></para>
2624               </entry>
2625               <entry>
2626                 <para> Sets the NID(s) of the MGS node; required for all targets other than the MGS.</para>
2627               </entry>
2628             </row>
2629             <row>
2630               <entry>
2631                 <para> <literal>--nomgs</literal></para>
2632               </entry>
2633               <entry>
2634                 <para> Removes a configuration management service to this target.</para>
2635               </entry>
2636             </row>
2637             <row>
2638               <entry>
2639                 <para> <literal>--quiet</literal></para>
2640               </entry>
2641               <entry>
2642                 <para> Prints less information.</para>
2643               </entry>
2644             </row>
2645             <row>
2646               <entry>
2647                 <para> <literal>--verbose</literal></para>
2648               </entry>
2649               <entry>
2650                 <para> Prints more information.</para>
2651               </entry>
2652             </row>
2653             <row>
2654               <entry>
2655                 <para> <literal>--writeconf</literal></para>
2656               </entry>
2657               <entry>
2658                 <para> Erases all configuration logs for the file system to which this MDT belongs,
2659                   and regenerates them. This is dangerous operation. All clients must be unmounted
2660                   and servers for this file system should be stopped. All targets (OSTs/MDTs) must
2661                   then be restarted to regenerate the logs. No clients should be started until all
2662                   targets have restarted.</para>
2663                 <para>The correct order of operations is:</para>
2664                 <orderedlist>
2665                   <listitem>
2666                     <para>Unmount all clients on the file system</para>
2667                   </listitem>
2668                   <listitem>
2669                     <para>Unmount the MDT and all OSTs on the file system</para>
2670                   </listitem>
2671                   <listitem>
2672                     <para>Run <literal>tunefs.lustre --writeconf
2673                         <replaceable>device</replaceable></literal> on every server</para>
2674                   </listitem>
2675                   <listitem>
2676                     <para>Mount the MDT and OSTs</para>
2677                   </listitem>
2678                   <listitem>
2679                     <para>Mount the clients</para>
2680                   </listitem>
2681                 </orderedlist>
2682               </entry>
2683             </row>
2684           </tbody>
2685         </tgroup>
2686       </informaltable>
2687     </section>
2688     <section remap="h5">
2689       <title>Examples</title>
2690       <para>Change the MGS&apos;s NID address. (This should be done on each target disk, since they should all contact the same MGS.)</para>
2691       <screen>tunefs.lustre --erase-param --mgsnode=<replaceable>new_nid</replaceable> --writeconf /dev/sda</screen>
2692       <para>Add a failover NID location for this target.</para>
2693       <screen>tunefs.lustre --param=&quot;failover.node=192.168.0.13@tcp0&quot; /dev/sda </screen>
2694     </section>
2695     <section remap="h5">
2696       <title>See Also</title>
2697       <itemizedlist>
2698         <listitem>
2699           <para><xref linkend="dbdoclet.50438219_75432"/></para>
2700         </listitem>
2701         <listitem>
2702           <para><xref linkend="dbdoclet.50438219_12635"/></para>
2703         </listitem>
2704         <listitem>
2705           <para><xref linkend="dbdoclet.50438219_38274"/></para>
2706         </listitem>
2707         <listitem>
2708           <para><xref linkend="dbdoclet.50438206_94597"/></para>
2709         </listitem>
2710       </itemizedlist>
2711     </section>
2712   </section>
2713   <section xml:id="dbdoclet.50438219_99928">
2714       <title><indexterm><primary>utilities</primary><secondary>system config</secondary></indexterm>
2715 Additional System Configuration Utilities</title>
2716     <para>This section describes additional system configuration utilities for Lustre.</para>
2717     <section remap="h3">
2718       <title><indexterm><primary>utilities</primary><secondary>application profiling</secondary></indexterm>
2719 Application Profiling Utilities</title>
2720       <para>The following utilities are located in /usr/bin.</para>
2721       <para><literal>lustre_req_history.sh</literal></para>
2722       <para>The lustre_req_history.sh utility (run from a client), assembles as much Lustre RPC request history as possible from the local node and from the servers that were contacted, providing a better picture of the coordinated network activity.</para>
2723     </section>
2724     <section remap="h3">
2725       <title>More /proc Statistics for Application Profiling</title>
2726       <para>The following utilities provide additional statistics.</para>
2727       <para><literal>vfs_ops_stats</literal></para>
2728       <para>The client vfs_ops_stats utility tracks Linux VFS operation calls into Lustre for a single PID, PPID, GID or everything.</para>
2729       <screen>/proc/fs/lustre/llite/*/vfs_ops_stats
2730 /proc/fs/lustre/llite/*/vfs_track_[pid|ppid|gid]
2731 </screen>
2732       <para><literal>extents_stats</literal></para>
2733       <para>The client extents_stats utility shows the size distribution of I/O calls from the client (cumulative and by process).</para>
2734       <screen>/proc/fs/lustre/llite/*/extents_stats, extents_stats_per_process
2735 </screen>
2736       <para><literal>offset_stats</literal></para>
2737       <para>The client offset_stats utility shows the read/write seek activity of a client by offsets and ranges.</para>
2738       <screen>/proc/fs/lustre/llite/*/offset_stats
2739 </screen>
2740       <para>Lustre includes per-client and improved MDT statistics:</para>
2741       <itemizedlist>
2742         <listitem>
2743           <para> Per-client statistics tracked on the servers</para>
2744         </listitem>
2745       </itemizedlist>
2746       <para>Each MDS and OSS now tracks LDLM and operations statistics for
2747       every connected client, for comparisons and simpler collection of
2748       distributed job statistics.</para>
2749       <screen>/proc/fs/lustre/mds|obdfilter/*/exports/
2750 </screen>
2751       <itemizedlist>
2752         <listitem>
2753           <para> Improved MDT statistics</para>
2754         </listitem>
2755       </itemizedlist>
2756       <para>More detailed MDT operations statistics are collected for better
2757       profiling.</para>
2758       <screen>/proc/fs/lustre/mdt/*/md_stats
2759 </screen>
2760     </section>
2761     <section remap="h3">
2762       <title><indexterm><primary>utilities</primary><secondary>debugging</secondary></indexterm><indexterm><primary>debug</primary><secondary>utilities</secondary></indexterm>
2763
2764 Testing / Debugging Utilities</title>
2765       <para>Lustre offers the following test and debugging utilities.</para>
2766       <section remap="h5">
2767         <title><indexterm><primary>lr_reader</primary></indexterm>
2768 lr_reader</title>
2769         <para>The lr_reader utility translates the content of the <literal>last_rcvd</literal> and <literal>reply_data</literal> files into human-readable form.</para>
2770         <para>The following utilities are part of the Lustre I/O kit. For more information, see <xref linkend="benchmarkingtests"/>.</para>
2771       </section>
2772       <section remap="h5">
2773         <title><indexterm>
2774             <primary>sgpdd-survey</primary>
2775           </indexterm> sgpdd-survey</title>
2776         <para>The <literal>sgpdd-survey</literal> utility tests &apos;bare metal&apos; performance,
2777           bypassing as much of the kernel as possible. The <literal>sgpdd-survey</literal> tool does
2778           not require Lustre, but it does require the sgp_dd package.</para>
2779         <caution>
2780           <para>The <literal>sgpdd-survey</literal> utility erases all data on the device.</para>
2781         </caution>
2782       </section>
2783       <section remap="h5">
2784         <title><indexterm>
2785             <primary>obdfilter-survey</primary>
2786           </indexterm>obdfilter-survey</title>
2787         <para>The <literal>obdfilter-survey</literal> utility is a shell script that tests
2788           performance of isolated OSTS, the network via echo clients, and an end-to-end test.</para>
2789       </section>
2790       <section remap="h5">
2791         <title><indexterm><primary>ior-survey</primary></indexterm>ior-survey</title>
2792         <para>The ior-survey utility is a script used to run the IOR benchmark. Lustre includes IOR version 2.8.6.</para>
2793       </section>
2794       <section remap="h5">
2795         <title><indexterm>
2796             <primary>ost-survey</primary>
2797           </indexterm>ost-survey</title>
2798         <para>The <literal>ost-survey</literal> utility is an OST performance survey that tests
2799           client-to-disk performance of the individual OSTs in a Lustre file system.</para>
2800       </section>
2801       <section remap="h5">
2802         <title><indexterm><primary>stats-collect</primary></indexterm>stats-collect</title>
2803         <para>The stats-collect utility contains scripts used to collect application profiling information from Lustre clients and servers.</para>
2804       </section>
2805     </section>
2806     <section remap="h3" condition='l29' xml:id="SystemConfigurationUtilities.fileset">
2807       <title><indexterm><primary>fileset</primary></indexterm>Fileset Feature</title>
2808       <para> With the fileset feature, Lustre now provides subdirectory mount
2809       support.  Subdirectory mounts, also referred to as filesets, allow a
2810       client to mount a child directory of a parent filesystem, thereby limiting
2811       the filesystem namespace visibility on a specific client.  A common use
2812       case is for a client to use a subdirectory mount when there is a desire to
2813       limit the visibility of the entire filesystem namesapce to aid in the
2814       prevention of accidental file deletions outside of the subdirectory
2815       mount.</para>
2816       <para>It is important to note that invocation of the subdirectory mount is
2817       voluntary by the client and not does prevent access to files that are
2818       visible in multiple subdirectory mounts via hard links.  Furthermore, it
2819       does not prevent the client from subsequently mounting the whole file
2820       system without a subdirectory being specified.</para>
2821       <figure xml:id="understandinglustre.fig.fileset">
2822         <title>
2823         <indexterm>
2824           <primary>Lustre</primary>
2825           <secondary>fileset</secondary>
2826         </indexterm>Lustre fileset</title>
2827         <mediaobject>
2828           <imageobject>
2829             <imagedata scalefit="1" width="100%"
2830             fileref="./figures/fileset.png" />
2831           </imageobject>
2832           <textobject>
2833             <phrase>Lustre file system fileset feature</phrase>
2834           </textobject>
2835         </mediaobject>
2836       </figure>
2837       <section remap="h4">
2838         <title>Examples</title>
2839         <para>The following example will mount the
2840         <literal>chipfs</literal> filesystem on client1 and create a
2841         subdirectory <literal>v1_1</literal> within that filesystem.  Client2
2842         will then mount only the <literal>v1_1</literal> subdirectory as a
2843         fileset, thereby limiting access to anything else in the
2844         <literal>chipfs</literal> filesystem from client2.</para>
2845         <screen>client1# mount -t lustre mgs@tcp:/chipfs /mnt/chip
2846 client1# mkdir /mnt/chip/v1_1</screen>
2847         <screen>client2# mount -t lustre mgs@tcp:/chipfs/v1_1 /mnt/chipv1_1</screen>
2848     <para>You can check the created mounts in /etc/mtab. It should look like
2849     the following:</para>
2850     <screen><replaceable>client1</replaceable>
2851 mds@tcp0:/chipfs/ /mnt/chip lustre rw         0       0
2852 </screen><screen>
2853 <replaceable>client2</replaceable>
2854 mds@tcp0:/chipfs/v1_1 /mnt/chipv1_1 lustre rw         0       0</screen>
2855         <para>Create a directory under the /mnt/chip mount, and get its FID</para>
2856     <screen>client1# mkdir /mnt/chip/v1_2
2857 client1# lfs path2fid /mnt/chip/v1_2
2858 [0x200000400:0x2:0x0]
2859 </screen>
2860         <para>If you try resolve the FID of the <literal>/mnt/chip/v1_2</literal>
2861     path (as created in the example above) on client2, an error will be returned
2862     as the FID can not be resolved on client2 since it is not part of the
2863     mounted fileset on that client.  Recall that the fileset on client2 mounted
2864     the <literal>v1_1</literal> subdirectory beneath the top level
2865     <literal>chipfs</literal> filesystem.
2866     </para>
2867     <screen>client2# lfs fid2path /mnt/chip/v1_2 [0x200000400:0x2:0x0]
2868 fid2path: error on FID [0x200000400:0x2:0x0]: No such file or directory</screen>
2869     <para>Subdirectory mounts do not have the <literal>.lustre</literal>
2870     pseudo directory, which prevents clients from opening or accessing files
2871     only by FID.</para>
2872     <screen>client1# ls /mnt/chipfs/.lustre
2873         fid  lost+found</screen>
2874     <screen>client2# ls /mnt/chipv1_1/.lustre
2875         ls: cannot access /mnt/chipv1_1/.lustre: No such file or directory
2876     </screen>
2877       </section>
2878     </section>
2879   </section>
2880 </chapter>