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