Whamcloud - gitweb
LUDOC-27 mkfs.lustre: Updated descriptions for filesystem and index options.
[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. Changelog entries are not purged beyond a registered user&apos;s set point (see <literal>lfs changelog_clear</literal>).</para>
605               </entry>
606             </row>
607             <row>
608               <entry>
609                 <para>changelog_deregister <replaceable>id</replaceable></para>
610               </entry>
611               <entry>
612                 <para> Unregisters an existing changelog user. If the user&apos;s &quot;clear&quot; record number is the minimum for the device, changelog records are purged until the next minimum.</para>
613               </entry>
614             </row>
615           </tbody>
616         </tgroup>
617       </informaltable>
618       <para><emphasis role="bold">Debug</emphasis></para>
619       <informaltable frame="all">
620         <tgroup cols="2">
621           <colspec colname="c1" colwidth="50*"/>
622           <colspec colname="c2" colwidth="50*"/>
623           <thead>
624             <row>
625               <entry>
626                 <para><emphasis role="bold">Option</emphasis></para>
627               </entry>
628               <entry>
629                 <para><emphasis role="bold">Description</emphasis></para>
630               </entry>
631             </row>
632           </thead>
633           <tbody>
634             <row>
635               <entry>
636                 <para> <literal>debug_daemon</literal></para>
637               </entry>
638               <entry>
639                 <para> Starts and stops the debug daemon, and controls the output filename and size.</para>
640               </entry>
641             </row>
642             <row>
643               <entry>
644                 <para> <literal>debug_kernel <replaceable>[file]</replaceable> [raw]</literal></para>
645               </entry>
646               <entry>
647                 <para> Dumps the kernel debug buffer to stdout or a file.</para>
648               </entry>
649             </row>
650             <row>
651               <entry>
652                 <para><literal>debug_file <replaceable>input_file</replaceable> <replaceable>[output_file]</replaceable></literal></para>
653               </entry>
654               <entry>
655                 <para> Converts the kernel-dumped debug log from binary to plain text format.</para>
656               </entry>
657             </row>
658             <row>
659               <entry>
660                 <para> <literal>clear</literal></para>
661               </entry>
662               <entry>
663                 <para> Clears the kernel debug buffer.</para>
664               </entry>
665             </row>
666             <row>
667               <entry>
668                 <para> <literal>mark <replaceable>text</replaceable></literal></para>
669               </entry>
670               <entry>
671                 <para> Inserts marker text in the kernel debug buffer.</para>
672               </entry>
673             </row>
674             <row>
675               <entry>
676                 <para> <literal>filter <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
677               </entry>
678               <entry>
679                 <para> Filters kernel debug messages by subsystem or mask.</para>
680               </entry>
681             </row>
682             <row>
683               <entry>
684                 <para> <literal>show <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
685               </entry>
686               <entry>
687                 <para> Shows specific types of messages.</para>
688               </entry>
689             </row>
690             <row>
691               <entry>
692                 <para> <literal>debug_list <replaceable>subsystems|types</replaceable></literal></para>
693               </entry>
694               <entry>
695                 <para> Lists all subsystem and debug types.</para>
696               </entry>
697             </row>
698             <row>
699               <entry>
700                 <para> <literal>modules <replaceable>path</replaceable></literal></para>
701               </entry>
702               <entry>
703                 <para> Provides GDB-friendly module information.</para>
704               </entry>
705             </row>
706           </tbody>
707         </tgroup>
708       </informaltable>
709     </section>
710     <section remap="h5">
711       <title>Options</title>
712       <para>Use the following options to invoke lctl.</para>
713       <informaltable frame="all">
714         <tgroup cols="2">
715           <colspec colname="c1" colwidth="50*"/>
716           <colspec colname="c2" colwidth="50*"/>
717           <thead>
718             <row>
719               <entry>
720                 <para><emphasis role="bold">Option</emphasis></para>
721               </entry>
722               <entry>
723                 <para><emphasis role="bold">Description</emphasis></para>
724               </entry>
725             </row>
726           </thead>
727           <tbody>
728             <row>
729               <entry>
730                 <para> <literal>--device</literal></para>
731               </entry>
732               <entry>
733                 <para> Device to be used for the operation (specified by name or number). See device_list.</para>
734               </entry>
735             </row>
736             <row>
737               <entry>
738                 <para> <literal>--ignore_errors | ignore_errors</literal></para>
739               </entry>
740               <entry>
741                 <para> Ignores errors during script processing.</para>
742               </entry>
743             </row>
744           </tbody>
745         </tgroup>
746       </informaltable>
747     </section>
748     <section remap="h5">
749       <title>Examples</title>
750       <para><literal>lctl</literal></para>
751       <screen>$ lctl
752 lctl &gt; dl 
753    0 UP mgc MGC192.168.0.20@tcp btbb24e3-7deb-2ffa-eab0-44dffe00f692 5 
754    1 UP ost OSS OSS_uuid 3 
755    2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3 
756 lctl &gt; dk /tmp/log Debug log: 87 lines, 87 kept, 0 dropped. 
757 lctl &gt; quit</screen>
758     </section>
759     <section remap="h5">
760       <title>See Also</title>
761       <itemizedlist>
762         <listitem>
763           <para> <xref linkend="dbdoclet.50438219_75432"/> </para>
764         </listitem>
765         <listitem>
766           <para> <xref linkend="dbdoclet.50438219_12635"/> </para>
767         </listitem>
768         <listitem>
769           <para> <xref linkend="dbdoclet.50438219_38274"/> </para>
770         </listitem>
771         <listitem>
772           <para> <xref linkend="dbdoclet.50438206_94597"/> </para>
773         </listitem>
774       </itemizedlist>
775     </section>
776   </section>
777   <section xml:id="dbdoclet.50438219_58217">
778     <title><indexterm><primary>ll_decode_filter_fid</primary></indexterm>
779 ll_decode_filter_fid</title>
780     <para>The ll_decode_filter_fid utility displays the Lustre object ID and MDT parent FID.</para>
781     <section remap="h5">
782       <title>Synopsis</title>
783       <screen>ll_decode_filter_fid object_file [object_file ...]</screen>
784     </section>
785     <section remap="h5">
786       <title>Description</title>
787       <para>The ll_decode_filter_fid utility decodes and prints the Lustre OST object ID, MDT FID, stripe index for the specified OST object(s), which is stored in the &quot;trusted.fid&quot; attribute on each OST object. This is accessible to ll_decode_filter_fid when the OST filesystem is mounted locally as type ldiskfs for maintenance.</para>
788       <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>
789       <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>
790     </section>
791     <section remap="h5">
792       <title>Examples</title>
793       <screen>root@oss1# cd /mnt/ost/lost+found
794 root@oss1# ll_decode_filter_fid #12345[4,5,8]
795 #123454: objid=690670 seq=0 parent=[0x751c5:0xfce6e605:0x0]
796 #123455: objid=614725 seq=0 parent=[0x18d11:0xebba84eb:0x1]
797 #123458: objid=533088 seq=0 parent=[0x21417:0x19734d61:0x0]</screen>
798       <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>
799       <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>
800       <para>The idx field shows the stripe number of this OST object in the Lustre RAID-0 striped file.</para>
801     </section>
802     <section remap="h5">
803       <title>See Also</title>
804       <para><xref linkend="dbdoclet.50438219_44971"/></para>
805     </section>
806   </section>
807   <section xml:id="dbdoclet.50438219_44971">
808     <title><indexterm><primary>ll_recover_lost_found_objs</primary></indexterm>
809 ll_recover_lost_found_objs</title>
810     <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>
811     <note>
812       <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>
813     </note>
814     <section remap="h5">
815       <title>Synopsis</title>
816       <screen>$ ll_recover_lost_found_objs [-hv] -d directory</screen>
817     </section>
818     <section remap="h5">
819       <title>Description</title>
820       <para>The first time Lustre writes to 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>
821       <para>To use ll_recover_lost_found_objs, mount the file system locally (using the -t ldiskfs 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>
822     </section>
823     <section remap="h5">
824       <title>Options</title>
825       <informaltable frame="all">
826         <tgroup cols="2">
827           <colspec colname="c1" colwidth="50*"/>
828           <colspec colname="c2" colwidth="50*"/>
829           <thead>
830             <row>
831               <entry>
832                 <para><emphasis role="bold">Option</emphasis></para>
833               </entry>
834               <entry>
835                 <para><emphasis role="bold">Description</emphasis></para>
836               </entry>
837             </row>
838           </thead>
839           <tbody>
840             <row>
841               <entry>
842                 <para> <literal>-h</literal></para>
843               </entry>
844               <entry>
845                 <para> Prints a help message</para>
846               </entry>
847             </row>
848             <row>
849               <entry>
850                 <para> <literal>-v</literal></para>
851               </entry>
852               <entry>
853                 <para> Increases verbosity</para>
854               </entry>
855             </row>
856             <row>
857               <entry>
858                 <para> <literal>-d <replaceable>directory</replaceable></literal></para>
859               </entry>
860               <entry>
861                 <para> Sets the lost and found directory path</para>
862               </entry>
863             </row>
864           </tbody>
865         </tgroup>
866       </informaltable>
867     </section>
868     <section remap="h5">
869       <title>Example</title>
870       <screen>ll_recover_lost_found_objs -d /mnt/ost/lost+found </screen>
871     </section>
872   </section>
873   <section xml:id="dbdoclet.50438219_84890">
874     <title><indexterm><primary>llodbstat</primary></indexterm>
875 llobdstat</title>
876     <para>The llobdstat utility displays OST statistics.</para>
877     <section remap="h5">
878       <title>Synopsis</title>
879       <screen>llobdstat ost_name [interval]</screen>
880     </section>
881     <section remap="h5">
882       <title>Description</title>
883       <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>
884     </section>
885     <section remap="h5">
886       <title>Example</title>
887       <screen># llobdstat liane-OST0002 1
888 /usr/bin/llobdstat on /proc/fs/lustre/obdfilter/liane-OST0002/stats
889 Processor counters run at 2800.189 MHz
890 Read: 1.21431e+07, Write: 9.93363e+08, create/destroy: 24/1499, stat: 34, p\
891 unch: 18
892 [NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]
893 Timestamp Read-delta ReadRate Write-delta WriteRate
894 --------------------------------------------------------
895 1217026053 0.00MB 0.00MB/s 0.00MB 0.00MB/s
896 1217026054 0.00MB 0.00MB/s 0.00MB 0.00MB/s
897 1217026055 0.00MB 0.00MB/s 0.00MB 0.00MB/s
898 1217026056 0.00MB 0.00MB/s 0.00MB 0.00MB/s
899 1217026057 0.00MB 0.00MB/s 0.00MB 0.00MB/s
900 1217026058 0.00MB 0.00MB/s 0.00MB 0.00MB/s
901 1217026059 0.00MB 0.00MB/s 0.00MB 0.00MB/s st:1</screen>
902     </section>
903     <section remap="h5">
904       <title>Files</title>
905       <screen>/proc/fs/lustre/obdfilter/<replaceable>ostname</replaceable>/stats</screen>
906     </section>
907   </section>
908   <section xml:id="dbdoclet.50438219_90386">
909     <title><indexterm><primary>llog_reader</primary></indexterm>
910 llog_reader</title>
911     <para>The llog_reader utility parses Lustre&apos;s on-disk configuration logs.</para>
912     <section remap="h5">
913       <title>Synopsis</title>
914       <screen>llog_reader filename</screen>
915     </section>
916     <section remap="h5">
917       <title>Description</title>
918       <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>
919       <para>To examine a log file on a stopped Lustre server, mount its backing file system as ldiskfs, then use llog_reader to dump the log file&apos;s contents, for example:</para>
920       <screen>mount -t ldiskfs /dev/sda /mnt/mgs 
921 llog_reader /mnt/mgs/CONFIGS/tfs-client</screen>
922       <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>
923       <screen>debugfs -c -R &apos;dump CONFIGS/tfs-client /tmp/tfs-client&apos; /dev/sda 
924 llog_reader /tmp/tfs-client</screen>
925       <caution>
926         <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>
927       </caution>
928     </section>
929     <section remap="h5">
930       <title>See Also</title>
931       <para><xref linkend="dbdoclet.50438219_39574"/></para>
932     </section>
933   </section>
934   <section xml:id="dbdoclet.50438219_23232">
935     <title><indexterm><primary>llstat</primary></indexterm>
936 llstat</title>
937     <para>The llstat utility displays Lustre statistics.</para>
938     <section remap="h5">
939       <title>Synopsis</title>
940       <screen>llstat [-c] [-g] [-i <replaceable>interval</replaceable>] <replaceable>stats_file
941 </replaceable></screen>
942     </section>
943     <section remap="h5">
944       <title>Description</title>
945       <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>
946     </section>
947     <section remap="h5">
948       <title>Options</title>
949       <informaltable frame="all">
950         <tgroup cols="2">
951           <colspec colname="c1" colwidth="50*"/>
952           <colspec colname="c2" colwidth="50*"/>
953           <thead>
954             <row>
955               <entry>
956                 <para><emphasis role="bold">Option</emphasis></para>
957               </entry>
958               <entry>
959                 <para><emphasis role="bold">Description</emphasis></para>
960               </entry>
961             </row>
962           </thead>
963           <tbody>
964             <row>
965               <entry>
966                 <para> <literal>-c</literal></para>
967               </entry>
968               <entry>
969                 <para> Clears the statistics file.</para>
970               </entry>
971             </row>
972             <row>
973               <entry>
974                 <para> <literal>-i</literal></para>
975               </entry>
976               <entry>
977                 <para> Specifies the polling period (in seconds).</para>
978               </entry>
979             </row>
980             <row>
981               <entry>
982                 <para> <literal>-g</literal></para>
983               </entry>
984               <entry>
985                 <para> Specifies graphable output format.</para>
986               </entry>
987             </row>
988             <row>
989               <entry>
990                 <para> <literal>-h</literal></para>
991               </entry>
992               <entry>
993                 <para> Displays help information.</para>
994               </entry>
995             </row>
996             <row>
997               <entry>
998                 <para> <literal>stats_file</literal></para>
999               </entry>
1000               <entry>
1001                 <para> Specifies either the full path to a statistics file or the shorthand reference, <literal>mds</literal> or <literal>ost</literal></para>
1002               </entry>
1003             </row>
1004           </tbody>
1005         </tgroup>
1006       </informaltable>
1007     </section>
1008     <section remap="h5">
1009       <title>Example</title>
1010       <para>To monitor /proc/fs/lustre/ost/OSS/ost/stats at 1 second intervals, run;</para>
1011       <screen>llstat -i 1 ost</screen>
1012     </section>
1013     <section remap="h5">
1014       <title>Files</title>
1015       <para>The llstat files are located at:</para>
1016       <screen>/proc/fs/lustre/mdt/MDS/*/stats
1017 /proc/fs/lustre/mds/*/exports/*/stats
1018 /proc/fs/lustre/mdc/*/stats
1019 /proc/fs/lustre/ldlm/services/*/stats
1020 /proc/fs/lustre/ldlm/namespaces/*/pool/stats
1021 /proc/fs/lustre/mgs/MGS/exports/*/stats
1022 /proc/fs/lustre/ost/OSS/*/stats
1023 /proc/fs/lustre/osc/*/stats
1024 /proc/fs/lustre/obdfilter/*/exports/*/stats
1025 /proc/fs/lustre/obdfilter/*/stats
1026 /proc/fs/lustre/llite/*/stats
1027 </screen>
1028     </section>
1029   </section>
1030   <section xml:id="dbdoclet.50438219_23648">
1031     <title><indexterm><primary>llverdev</primary></indexterm>
1032 llverdev</title>
1033     <para>The llverdev verifies a block device is functioning properly over its full size.</para>
1034     <section remap="h5">
1035       <title>Synopsis</title>
1036       <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>
1037     </section>
1038     <section remap="h5">
1039       <title>Description</title>
1040       <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>
1041       <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>
1042       <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>
1043       <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>
1044     </section>
1045     <section remap="h5">
1046       <title>Options</title>
1047       <informaltable frame="all">
1048         <tgroup cols="3">
1049           <colspec colname="c1" colwidth="33*"/>
1050           <colspec colname="c2" colwidth="33*"/>
1051           <colspec colname="c3" colwidth="33*"/>
1052           <thead>
1053             <row>
1054               <entry>
1055                 <para><emphasis role="bold">Option</emphasis></para>
1056               </entry>
1057               <entry>
1058                 <para><emphasis role="bold">&#160;</emphasis></para>
1059               </entry>
1060               <entry>
1061                 <para><emphasis role="bold">Description</emphasis></para>
1062               </entry>
1063             </row>
1064           </thead>
1065           <tbody>
1066             <row>
1067               <entry nameend="c2" namest="c1">
1068                 <para> <literal>-c|--chunksize</literal></para>
1069               </entry>
1070               <entry>
1071                 <para> I/O chunk size in bytes (default value is 1048576).</para>
1072               </entry>
1073             </row>
1074             <row>
1075               <entry nameend="c2" namest="c1">
1076                 <para> <literal>>-f|--force</literal>></para>
1077               </entry>
1078               <entry>
1079                 <para> Forces the test to run without a confirmation that the device will be overwritten and all data will be permanently destroyed.</para>
1080               </entry>
1081             </row>
1082             <row>
1083               <entry nameend="c2" namest="c1">
1084                 <para> <literal>-h|--help</literal></para>
1085               </entry>
1086               <entry>
1087                 <para> Displays a brief help message.</para>
1088               </entry>
1089             </row>
1090             <row>
1091               <entry nameend="c2" namest="c1">
1092                 <para> <literal>-o <replaceable>>offset</replaceable></literal></para>
1093               </entry>
1094               <entry>
1095                 <para> Offset (in kilobytes) of the start of the test (default value is 0).</para>
1096               </entry>
1097             </row>
1098             <row>
1099               <entry nameend="c2" namest="c1">
1100                 <para> <literal>-l|--long</literal></para>
1101               </entry>
1102               <entry>
1103                 <para> Runs a full check, writing and then reading and verifying every block on the disk.</para>
1104               </entry>
1105             </row>
1106             <row>
1107               <entry nameend="c2" namest="c1">
1108                 <para> <literal>-p|--partial</literal></para>
1109               </entry>
1110               <entry>
1111                 <para> Runs a partial check, only doing periodic checks across the device (1 GB steps).</para>
1112               </entry>
1113             </row>
1114             <row>
1115               <entry nameend="c2" namest="c1">
1116                 <para> <literal>-r|--read</literal></para>
1117               </entry>
1118               <entry>
1119                 <para> Runs the test in read (verify) mode only, after having previously run the test in <literal>-w</literal> mode.</para>
1120               </entry>
1121             </row>
1122             <row>
1123               <entry nameend="c2" namest="c1">
1124                 <para> <literal>-t <replaceable>timestamp</replaceable></literal></para>
1125               </entry>
1126               <entry>
1127                 <para> Sets the test start time as printed at the start of a previously-interrupted test to ensure that validation data is the same across the entire filesystem (default value is the current time()).</para>
1128               </entry>
1129             </row>
1130             <row>
1131               <entry nameend="c2" namest="c1">
1132                 <para> <literal>-v|--verbose</literal></para>
1133               </entry>
1134               <entry>
1135                 <para> Runs the test in verbose mode, listing each read and write operation.</para>
1136               </entry>
1137             </row>
1138             <row>
1139               <entry nameend="c2" namest="c1">
1140                 <para> <literal>-w|--write</literal></para>
1141               </entry>
1142               <entry>
1143                 <para> Runs the test in write (test-pattern) mode (default runs both read and write).</para>
1144               </entry>
1145             </row>
1146           </tbody>
1147         </tgroup>
1148       </informaltable>
1149     </section>
1150     <section remap="h5">
1151       <title>Examples</title>
1152       <para>Runs a partial device verification on /dev/sda:</para>
1153       <screen>llverdev -v -p /dev/sda 
1154 llverdev: permanently overwrite all data on /dev/sda (yes/no)? y 
1155 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size 
1156 Timestamp: 1009839028 
1157 Current write offset: 4096 kB</screen>
1158       <para>Continues an interrupted verification at offset 4096kB from the start of the device, using the same timestamp as the previous run:</para>
1159       <screen>llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda 
1160 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size 
1161 Timestamp: 1009839028 
1162 write complete 
1163 read complete </screen>
1164     </section>
1165   </section>
1166   <section xml:id="dbdoclet.50438219_64286">
1167     <title><indexterm><primary>lshowmount</primary></indexterm>
1168 lshowmount</title>
1169     <para>The lshowmount utility shows Lustre exports.</para>
1170     <section remap="h5">
1171       <title>Synopsis</title>
1172       <screen>lshowmount [-ehlv]</screen>
1173     </section>
1174     <section remap="h5">
1175       <title>Description</title>
1176       <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>
1177     </section>
1178     <section remap="h5">
1179       <title>Options</title>
1180       <informaltable frame="all">
1181         <tgroup cols="2">
1182           <colspec colname="c1" colwidth="50*"/>
1183           <colspec colname="c2" colwidth="50*"/>
1184           <thead>
1185             <row>
1186               <entry>
1187                 <para><emphasis role="bold">Option</emphasis></para>
1188               </entry>
1189               <entry>
1190                 <para><emphasis role="bold">Description</emphasis></para>
1191               </entry>
1192             </row>
1193           </thead>
1194           <tbody>
1195             <row>
1196               <entry>
1197                 <para> <literal>-e|--enumerate</literal></para>
1198               </entry>
1199               <entry>
1200                 <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>
1201               </entry>
1202             </row>
1203             <row>
1204               <entry>
1205                 <para> <literal>-h|--help</literal></para>
1206               </entry>
1207               <entry>
1208                 <para> Causes lshowmount to print out a usage message.</para>
1209               </entry>
1210             </row>
1211             <row>
1212               <entry>
1213                 <para> <literal>-l|--lookup</literal></para>
1214               </entry>
1215               <entry>
1216                 <para> Causes lshowmount to try to look up the hostname for NIDs that look like IP addresses.</para>
1217               </entry>
1218             </row>
1219             <row>
1220               <entry>
1221                 <para> <literal>-v|--verbose</literal></para>
1222               </entry>
1223               <entry>
1224                 <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>
1225               </entry>
1226             </row>
1227           </tbody>
1228         </tgroup>
1229       </informaltable>
1230     </section>
1231     <section remap="h5">
1232       <title>Files</title>
1233       <screen>/proc/fs/lustre/mgs/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1234 /proc/fs/lustre/mds/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1235 /proc/fs/lustre/obdfilter/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid</screen>
1236     </section>
1237   </section>
1238   <section xml:id="dbdoclet.50438219_90218">
1239     <title><indexterm><primary>lst</primary></indexterm>
1240 lst</title>
1241     <para>The lst utility starts LNET self-test.</para>
1242     <section remap="h5">
1243       <title>Synopsis</title>
1244       <screen>lst</screen>
1245     </section>
1246     <section remap="h5">
1247       <title>Description</title>
1248       <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>
1249       <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>
1250       <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>
1251       <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>
1252     </section>
1253     <section remap="h5">
1254       <title>Modules</title>
1255       <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>
1256       <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>
1257       <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>
1258     </section>
1259     <section remap="h5">
1260       <title>Utilities</title>
1261       <para>LNET self-test includes two user utilities, lst and lstclient.</para>
1262       <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>
1263       <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>
1264       <screen>lstclient -sesid CONSOLE_NID group NAME</screen>
1265     </section>
1266     <section remap="h5">
1267       <title>Example Script</title>
1268       <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>
1269       <screen>#!/bin/bash
1270 export LST_SESSION=$$
1271 lst new_session read/write
1272 lst add_group servers 192.168.10.[8,10,12-16]@tcp
1273 lst add_group readers 192.168.1.[1-253/2]@o2ib
1274 lst add_group writers 192.168.1.[2-254/2]@o2ib
1275 lst add_batch bulk_rw
1276 lst add_test --batch bulk_rw --from readers --to servers     brw read check\
1277 =simple size=1M
1278 lst add_test --batch bulk_rw --from writers --to servers     brw write chec\
1279 k=full size=4K
1280 # start running
1281 lst run bulk_rw
1282 # display server stats for 30 seconds
1283 lst stat servers &amp; sleep 30; kill $!
1284 # tear down
1285 lst end_session </screen>
1286     </section>
1287   </section>
1288   <section xml:id="dbdoclet.50438219_54734">
1289     <title><indexterm><primary>lustre_rmmod.sh</primary></indexterm>
1290 lustre_rmmod.sh</title>
1291     <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>
1292     <note>
1293       <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>
1294     </note>
1295   </section>
1296   <section xml:id="dbdoclet.50438219_63667">
1297     <title><indexterm><primary>lustre_rsync</primary></indexterm>
1298 lustre_rsync</title>
1299     <para>The lustre_rsync utility synchronizes (replicates) a Lustre file system to a target file system.</para>
1300     <section remap="h5">
1301       <title>Synopsis</title>
1302       <screen>lustre_rsync --source|-s <replaceable>src</replaceable> --target|-t <replaceable>tgt</replaceable> 
1303    --mdt|-m <replaceable>mdt</replaceable> [--user|-u <replaceable>userid</replaceable>]
1304    [--xattr|-x <replaceable>yes|no</replaceable>] [--verbose|-v]
1305    [--statuslog|-l <replaceable>log</replaceable>] [--dry-run] [--abort-on-err] 
1306  
1307 lustre_rsync --statuslog|-l <replaceable>log</replaceable>
1308  
1309 lustre_rsync --statuslog|-l <replaceable>log</replaceable> --source|-s <replaceable>source</replaceable>
1310    --target|-t <replaceable>tgt</replaceable> --mdt|-m <replaceable>mdt</replaceable></screen>
1311     </section>
1312     <section remap="h5">
1313       <title>Description</title>
1314       <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>
1315       <para>Before using lustre_rsync:</para>
1316       <itemizedlist>
1317         <listitem>
1318           <para>A changelog user must be registered (see lctl (8) changelog_register)</para>
1319         </listitem>
1320       </itemizedlist>
1321       <para>- AND -</para>
1322       <itemizedlist>
1323         <listitem>
1324           <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>
1325         </listitem>
1326       </itemizedlist>
1327     </section>
1328     <section remap="h5">
1329       <title>Options</title>
1330       <informaltable frame="all">
1331         <tgroup cols="2">
1332           <colspec colname="c1" colwidth="50*"/>
1333           <colspec colname="c2" colwidth="50*"/>
1334           <thead>
1335             <row>
1336               <entry>
1337                 <para><emphasis role="bold">Option</emphasis></para>
1338               </entry>
1339               <entry>
1340                 <para><emphasis role="bold">Description</emphasis></para>
1341               </entry>
1342             </row>
1343           </thead>
1344           <tbody>
1345             <row>
1346               <entry>
1347                 <para> <literal>--source=<replaceable>src</replaceable></literal></para>
1348               </entry>
1349               <entry>
1350                 <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>
1351               </entry>
1352             </row>
1353             <row>
1354               <entry>
1355                 <para> <literal>--target=<replaceable>tgt</replaceable></literal></para>
1356               </entry>
1357               <entry>
1358                 <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>
1359               </entry>
1360             </row>
1361             <row>
1362               <entry>
1363                 <para> <literal>--mdt=<replaceable>mdt</replaceable></literal></para>
1364               </entry>
1365               <entry>
1366                 <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>
1367               </entry>
1368             </row>
1369             <row>
1370               <entry>
1371                 <para> <literal>--user=<replaceable>userid</replaceable></literal></para>
1372               </entry>
1373               <entry>
1374                 <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>
1375               </entry>
1376             </row>
1377             <row>
1378               <entry>
1379                 <para> <literal>--statuslog=<replaceable>log</replaceable></literal></para>
1380               </entry>
1381               <entry>
1382                 <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>
1383               </entry>
1384             </row>
1385             <row>
1386               <entry>
1387                 <para> <literal>--xattr<replaceable>yes|no</replaceable></literal></para>
1388               </entry>
1389               <entry>
1390                 <para> Specifies whether extended attributes (xattrs) are synchronized or not. The default is to synchronize extended attributes.</para>
1391                 <para>NOTE: Disabling xattrs causes Lustre striping information not to be synchronized.</para>
1392               </entry>
1393             </row>
1394             <row>
1395               <entry>
1396                 <para> <literal>--verbose</literal></para>
1397               </entry>
1398               <entry>
1399                 <para> Produces a verbose output.</para>
1400               </entry>
1401             </row>
1402             <row>
1403               <entry>
1404                 <para> <literal>--dry-run</literal></para>
1405               </entry>
1406               <entry>
1407                 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1408               </entry>
1409             </row>
1410             <row>
1411               <entry>
1412                 <para> <literal>--abort-on-err</literal></para>
1413               </entry>
1414               <entry>
1415                 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1416               </entry>
1417             </row>
1418           </tbody>
1419         </tgroup>
1420       </informaltable>
1421     </section>
1422     <section remap="h5">
1423       <title>Examples</title>
1424       <para>Register a changelog user for an MDT (e.g., MDT lustre-MDT0000).</para>
1425       <screen>$ ssh 
1426 $ MDS lctl changelog_register \
1427            --device lustre-MDT0000 -n 
1428 cl1</screen>
1429       <para>Synchronize/replicate a Lustre file system (/mnt/lustre) to a target file system (/mnt/target).</para>
1430       <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \ 
1431            --mdt=lustre-MDT0000 --user=cl1 \ 
1432            --statuslog replicate.log  --verbose 
1433 Lustre filesystem: lustre 
1434 MDT device: lustre-MDT0000 
1435 Source: /mnt/lustre 
1436 Target: /mnt/target 
1437 Statuslog: sync.log 
1438 Changelog registration: cl1 
1439 Starting changelog record: 0 
1440 Errors: 0 
1441 lustre_rsync took 1 seconds 
1442 Changelog records consumed: 22
1443 </screen>
1444       <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>
1445       <screen>$ lustre_rsync --statuslog replicate.log --verbose 
1446 Replicating Lustre filesystem: lustre 
1447 MDT device: lustre-MDT0000 
1448 Source: /mnt/lustre 
1449 Target: /mnt/target 
1450 Statuslog: replicate.log 
1451 Changelog registration: cl1 
1452 Starting changelog record: 22 
1453 Errors: 0 
1454 lustre_rsync took 2 seconds 
1455 Changelog records consumed: 42</screen>
1456       <para>Synchronize a Lustre file system (/mnt/lustre) to two target file systems (/mnt/target1 and /mnt/target2).</para>
1457       <screen>$ lustre_rsync --source=/mnt/lustre \ 
1458    --target=/mnt/target1 --target=/mnt/target2 \ 
1459    --mdt=lustre-MDT0000 --user=cl1 
1460    --statuslog replicate.log</screen>
1461     </section>
1462     <section remap="h5">
1463       <title>See Also</title>
1464       <para><xref linkend="dbdoclet.50438206_94597"/></para>
1465     </section>
1466   </section>
1467   <section xml:id="dbdoclet.50438219_75432">
1468     <title><indexterm><primary>mkfs.lustre</primary></indexterm>
1469 mkfs.lustre</title>
1470     <para>The mkfs.lustre utility formats a disk for a Lustre service.</para>
1471     <section remap="h5">
1472       <title>Synopsis</title>
1473       <screen>mkfs.lustre <replaceable>target_type</replaceable> [options] <replaceable>device</replaceable></screen>
1474       <para>where <replaceable>target_type</replaceable> is one of the following:</para>
1475       <informaltable frame="all">
1476         <tgroup cols="2">
1477           <colspec colname="c1" colwidth="50*"/>
1478           <colspec colname="c2" colwidth="50*"/>
1479           <thead>
1480             <row>
1481               <entry>
1482                 <para><emphasis role="bold">Option</emphasis></para>
1483               </entry>
1484               <entry>
1485                 <para><emphasis role="bold">Description</emphasis></para>
1486               </entry>
1487             </row>
1488           </thead>
1489           <tbody>
1490             <row>
1491               <entry>
1492                 <para> <literal>--ost</literal></para>
1493               </entry>
1494               <entry>
1495                 <para> Object Storage Target (OST)</para>
1496               </entry>
1497             </row>
1498             <row>
1499               <entry>
1500                 <para> <literal>--mdt</literal></para>
1501               </entry>
1502               <entry>
1503                 <para> Metadata Storage Target (MDT)</para>
1504               </entry>
1505             </row>
1506             <row>
1507               <entry>
1508                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1509               </entry>
1510               <entry>
1511                 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1512               </entry>
1513             </row>
1514             <row>
1515               <entry>
1516                 <para> <literal>--mgs</literal></para>
1517               </entry>
1518               <entry>
1519                 <para> Configuration Management Service (MGS), one per site. This service can be combined with one <literal>--mdt</literal> service by specifying both types.</para>
1520               </entry>
1521             </row>
1522           </tbody>
1523         </tgroup>
1524       </informaltable>
1525     </section>
1526     <section remap="h5">
1527       <title>Description</title>
1528       <para>mkfs.lustre is used to format a disk device for use as part of a Lustre file system. After formatting, a disk can be mounted to start the Lustre service defined by this command.</para>
1529       <para>When the file system is created, parameters can simply be added as a --param option to the mkfs.lustre command. See <xref linkend="dbdoclet.50438194_17237"/>.</para>
1530       <informaltable frame="all">
1531         <tgroup cols="3">
1532           <colspec colname="c1" colwidth="33*"/>
1533           <colspec colname="c2" colwidth="33*"/>
1534           <colspec colname="c3" colwidth="33*"/>
1535           <thead>
1536             <row>
1537               <entry nameend="c2" namest="c1">
1538                 <para><emphasis role="bold">Option</emphasis></para>
1539               </entry>
1540               <entry>
1541                 <para><emphasis role="bold">Description</emphasis></para>
1542               </entry>
1543             </row>
1544           </thead>
1545           <tbody>
1546             <row>
1547               <entry nameend="c2" namest="c1">
1548                 <para> <literal>--backfstype=<replaceable>fstype</replaceable></literal></para>
1549               </entry>
1550               <entry>
1551                 <para> Forces a particular format for the backing file system (such as ext3, ldiskfs).</para>
1552               </entry>
1553             </row>
1554             <row>
1555               <entry nameend="c2" namest="c1">
1556                 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
1557               </entry>
1558               <entry>
1559                 <para> Sets a user comment about this disk, ignored by Lustre.</para>
1560               </entry>
1561             </row>
1562             <row>
1563               <entry nameend="c2" namest="c1">
1564                 <para> <literal>--device-size=<replaceable>#</replaceable>>KB</literal></para>
1565               </entry>
1566               <entry>
1567                 <para> Sets the device size for loop devices.</para>
1568               </entry>
1569             </row>
1570             <row>
1571               <entry nameend="c2" namest="c1">
1572                 <para> <literal>--dryrun</literal></para>
1573               </entry>
1574               <entry>
1575                 <para> Only prints what would be done; it does not affect the disk.</para>
1576               </entry>
1577             </row>
1578             <row>
1579               <entry nameend="c2" namest="c1">
1580                 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
1581               </entry>
1582               <entry>
1583                 <para> Sets the NID(s) of a failover partner. This option can be repeated as needed.</para>
1584                 <warning><para>This cannot be used with <literal>--servicenode</literal>.</para></warning>
1585               </entry>
1586             </row>
1587             <row>
1588               <entry nameend="c2" namest="c1">
1589                 <para> <literal>--servicenode=<replaceable>nid,...</replaceable></literal></para>
1590               </entry>
1591               <entry>
1592                 <para>Sets the NID(s) of all service node, including failover partner as well as
1593                   primary node service nids. This option can be repeated as needed.</para>
1594                 <warning><para>This cannot be used with <literal>--failnode</literal>.</para></warning>
1595               </entry>
1596             </row>
1597             <row>
1598               <entry nameend="c2" namest="c1">
1599                 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
1600               </entry>
1601               <entry>
1602                 <para>The name of the Lustre file system to which this node belongs. The file system
1603                   name is limited to 8 characters. The default file system name is
1604                     <literal>lustre</literal>.</para>
1605               </entry>
1606             </row>
1607             <row>
1608               <entry nameend="c2" namest="c1">
1609                 <para>
1610                   <literal>--index=<replaceable>index_number</replaceable></literal></para>
1611               </entry>
1612               <entry>
1613                 <para>Specifies the OST or MDT number (0...N). This allows mapping between the OSS
1614                   and MDS node and the device on which the OST or MDT is located.</para>
1615               </entry>
1616             </row>
1617             <row>
1618               <entry nameend="c2" namest="c1">
1619                 <para> <literal>--mkfsoptions=<replaceable>opts</replaceable></literal></para>
1620               </entry>
1621               <entry>
1622                 <para>  Formats options for the backing file system. For example, ext3 options could be set here.</para>
1623               </entry>
1624             </row>
1625             <row>
1626               <entry nameend="c2" namest="c1">
1627                 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
1628               </entry>
1629               <entry>
1630                 <para>  Sets the mount options used when the backing file system is mounted.</para>
1631                 <warning><para>Unlike earlier versions of mkfs.lustre, this version completely replaces the default mount options with those specified on the command line, and issues a warning on stderr if any default mount options are omitted.</para></warning>
1632                 <para>The defaults for ldiskfs are:</para>
1633                 <para>OST: <literal>errors=remount-ro</literal>;</para>
1634                 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
1635                 <para>Do not alter the default mount options unless you know what you are doing.</para>
1636               </entry>
1637             </row>
1638             <row>
1639               <entry nameend="c2" namest="c1">
1640                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1641                 <para>&#160;</para>
1642               </entry>
1643               <entry>
1644                 <para>  Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1645               </entry>
1646             </row>
1647             <row>
1648               <entry nameend="c2" namest="c1">
1649                 <para> <literal>--mgsnode=<replaceable>nid,...</replaceable></literal></para>
1650               </entry>
1651               <entry>
1652                 <para> Sets the NIDs of the MGS node, required for all targets other than the MGS.</para>
1653               </entry>
1654             </row>
1655             <row>
1656               <entry nameend="c2" namest="c1">
1657                 <para> <literal>--param <replaceable>key</replaceable>=<replaceable>value</replaceable></literal></para>
1658               </entry>
1659               <entry>
1660                 <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>
1661               </entry>
1662             </row>
1663             <row>
1664               <entry>
1665                 <para> &#160;</para>
1666               </entry>
1667               <entry>
1668                 <para> <literal>--param sys.timeout=40</literal>></para>
1669               </entry>
1670               <entry>
1671                 <para> System obd timeout.</para>
1672               </entry>
1673             </row>
1674             <row>
1675               <entry>
1676                 <para> &#160;</para>
1677               </entry>
1678               <entry>
1679                 <para> <literal>--param lov.stripesize=2M</literal></para>
1680               </entry>
1681               <entry>
1682                 <para> Default stripe size.</para>
1683               </entry>
1684             </row>
1685             <row>
1686               <entry>
1687                 <para> &#160;</para>
1688               </entry>
1689               <entry>
1690                 <para> <literal>param lov.stripecount=2</literal></para>
1691               </entry>
1692               <entry>
1693                 <para> Default stripe count.</para>
1694               </entry>
1695             </row>
1696             <row>
1697               <entry>
1698                 <para> &#160;</para>
1699               </entry>
1700               <entry>
1701                 <para> <literal>--param failover.mode=failout</literal></para>
1702               </entry>
1703               <entry>
1704                 <para> Returns errors instead of waiting for recovery.</para>
1705               </entry>
1706             </row>
1707             <row>
1708               <entry nameend="c2" namest="c1">
1709                 <para> <literal>--quiet</literal></para>
1710               </entry>
1711               <entry>
1712                 <para> Prints less information.</para>
1713               </entry>
1714             </row>
1715             <row>
1716               <entry nameend="c2" namest="c1">
1717                 <para> <literal>--reformat</literal></para>
1718               </entry>
1719               <entry>
1720                 <para> Reformats an existing Lustre disk.</para>
1721               </entry>
1722             </row>
1723             <row>
1724               <entry nameend="c2" namest="c1">
1725                 <para> <literal>--stripe-count-hint=stripes</literal></para>
1726               </entry>
1727               <entry>
1728                 <para> Used to optimize the MDT&apos;s inode size.</para>
1729               </entry>
1730             </row>
1731             <row>
1732               <entry nameend="c2" namest="c1">
1733                 <para> <literal>--verbose</literal></para>
1734               </entry>
1735               <entry>
1736                 <para> Prints more information.</para>
1737               </entry>
1738             </row>
1739           </tbody>
1740         </tgroup>
1741       </informaltable>
1742     </section>
1743     <section remap="h5">
1744       <title>Examples</title>
1745       <para>Creates a combined MGS and MDT for file system <literal>testfs</literal> on, e.g., node <literal>cfs21</literal>:</para>
1746       <screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
1747       <para>Creates an OST for file system <literal>testfs</literal> on any node (using the above MGS):</para>
1748       <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
1749       <para>Creates a standalone MGS on, e.g., node <literal>cfs22</literal>:</para>
1750       <screen>mkfs.lustre --mgs /dev/sda1</screen>
1751       <para>Creates an MDT for file system <literal>myfs1</literal> on any node (using the above MGS):</para>
1752       <screen>mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2</screen>
1753     </section>
1754     <section remap="h5">
1755       <title>See Also</title>
1756       <itemizedlist>
1757         <listitem>
1758           <para><xref linkend="dbdoclet.50438219_75432"/>mkfs.lustre, </para>
1759         </listitem>
1760         <listitem>
1761           <para><xref linkend="dbdoclet.50438219_12635"/>mount.lustre, </para>
1762         </listitem>
1763         <listitem>
1764           <para><xref linkend="dbdoclet.50438206_94597"/>lfs</para>
1765         </listitem>
1766       </itemizedlist>
1767     </section>
1768   </section>
1769   <section xml:id="dbdoclet.50438219_12635">
1770     <title><indexterm><primary>mount.lustre</primary></indexterm>
1771 mount.lustre</title>
1772     <para>The mount.lustre utility starts a Lustre client or target service.</para>
1773     <section remap="h5">
1774       <title>Synopsis</title>
1775       <screen>mount -t lustre [-o options] directory
1776 </screen>
1777     </section>
1778     <section remap="h5">
1779       <title>Description</title>
1780       <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>
1781       <para>There are two forms for the device option, depending on whether a client or a target service is started:</para>
1782       <informaltable frame="all">
1783         <tgroup cols="2">
1784           <colspec colname="c1" colwidth="50*"/>
1785           <colspec colname="c2" colwidth="50*"/>
1786           <thead>
1787             <row>
1788               <entry>
1789                 <para><emphasis role="bold">Option</emphasis></para>
1790               </entry>
1791               <entry>
1792                 <para><emphasis role="bold">Description</emphasis></para>
1793               </entry>
1794             </row>
1795           </thead>
1796           <tbody>
1797             <row>
1798               <entry>
1799                 <para> <literal><replaceable>mgs_nid</replaceable>:/<replaceable>fsname</replaceable></literal></para>
1800                 <para>&#160;</para>
1801               </entry>
1802               <entry>
1803                 <para> Mounts the Lustre file system named <literal>fsname</literal> on the client
1804                   by contacting the Management Service at <literal>mgsspec</literal> on the pathname
1805                   given by <literal>directory</literal>. The format for <literal>mgsspec</literal>
1806                   is defined below. A mounted client file system appears in fstab(5) and is usable,
1807                   like any local file system, and provides a full POSIX standard-compliant
1808                   interface.</para>
1809               </entry>
1810             </row>
1811             <row>
1812               <entry>
1813                 <para> <replaceable>block_device</replaceable></para>
1814               </entry>
1815               <entry>
1816                 <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>
1817               </entry>
1818             </row>
1819           </tbody>
1820         </tgroup>
1821       </informaltable>
1822     </section>
1823     <section remap="h5">
1824       <title>Options</title>
1825       <informaltable frame="all">
1826         <tgroup cols="2">
1827           <colspec colname="c1" colwidth="50*"/>
1828           <colspec colname="c2" colwidth="50*"/>
1829           <thead>
1830             <row>
1831               <entry>
1832                 <para><emphasis role="bold">Option</emphasis></para>
1833               </entry>
1834               <entry>
1835                 <para><emphasis role="bold">Description</emphasis></para>
1836               </entry>
1837             </row>
1838           </thead>
1839           <tbody>
1840             <row>
1841               <entry>
1842                 <para> <literal>mgsspec:=<replaceable>mgsnode</replaceable>[:<replaceable>mgsnode</replaceable>]</literal></para>
1843                 <para>&#160;</para>
1844               </entry>
1845               <entry>
1846                 <para> The MGS specification may be a colon-separated list of nodes.</para>
1847               </entry>
1848             </row>
1849             <row>
1850               <entry>
1851                 <para> <literal>mgsnode:=<replaceable>mgsnid</replaceable>[,<replaceable>mgsnid</replaceable>]</literal></para>
1852               </entry>
1853               <entry>
1854                 <para> Each node may be specified by a comma-separated list of NIDs.</para>
1855               </entry>
1856             </row>
1857           </tbody>
1858         </tgroup>
1859       </informaltable>
1860       <para>In addition to the standard mount options, Lustre understands the following client-specific options:</para>
1861       <informaltable frame="all">
1862         <tgroup cols="2">
1863           <colspec colname="c1" colwidth="50*"/>
1864           <colspec colname="c2" colwidth="50*"/>
1865           <thead>
1866             <row>
1867               <entry>
1868                 <para><emphasis role="bold">Option</emphasis></para>
1869               </entry>
1870               <entry>
1871                 <para><emphasis role="bold">Description</emphasis></para>
1872               </entry>
1873             </row>
1874           </thead>
1875           <tbody>
1876             <row>
1877               <entry>
1878                 <para> <literal>flock</literal></para>
1879               </entry>
1880               <entry>
1881                 <para> Enables full flock support, coherent across all client nodes.</para>
1882               </entry>
1883             </row>
1884             <row>
1885               <entry>
1886                 <para> <literal>localflock</literal></para>
1887               </entry>
1888               <entry>
1889                 <para> Enables local flock support, using only client-local flock (faster, for applications that require flock, but do not run on multiple nodes).</para>
1890               </entry>
1891             </row>
1892             <row>
1893               <entry>
1894                 <para> <literal>noflock</literal></para>
1895               </entry>
1896               <entry>
1897                 <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>
1898               </entry>
1899             </row>
1900             <row>
1901               <entry>
1902                 <para> <literal>user_xattr</literal></para>
1903               </entry>
1904               <entry>
1905                 <para> Enables get/set of extended attributes by regular users. See the attr(5) manual page.</para>
1906               </entry>
1907             </row>
1908             <row>
1909               <entry>
1910                 <para> <literal>nouser_xattr</literal></para>
1911               </entry>
1912               <entry>
1913                 <para> Disables use of extended attributes by regular users. Root and system processes can still use extended attributes.</para>
1914               </entry>
1915             </row>
1916             <row>
1917               <entry>
1918                 <para> <literal>acl</literal></para>
1919               </entry>
1920               <entry>
1921                 <para> Enables POSIX Access Control List support. See the acl(5) manual page.</para>
1922               </entry>
1923             </row>
1924             <row>
1925               <entry>
1926                 <para> <literal>noacl</literal></para>
1927               </entry>
1928               <entry>
1929                 <para> Disables Access Control List support.</para>
1930               </entry>
1931             </row>
1932           </tbody>
1933         </tgroup>
1934       </informaltable>
1935       <para>In addition to the standard mount options and backing disk type (e.g. ext3) options, Lustre understands the following server-specific options:</para>
1936       <informaltable frame="all">
1937         <tgroup cols="2">
1938           <colspec colname="c1" colwidth="50*"/>
1939           <colspec colname="c2" colwidth="50*"/>
1940           <thead>
1941             <row>
1942               <entry>
1943                 <para><emphasis role="bold">Option</emphasis></para>
1944               </entry>
1945               <entry>
1946                 <para><emphasis role="bold">Description</emphasis></para>
1947               </entry>
1948             </row>
1949           </thead>
1950           <tbody>
1951             <row>
1952               <entry>
1953                 <para> <literal>nosvc</literal></para>
1954               </entry>
1955               <entry>
1956                 <para>  Starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
1957               </entry>
1958             </row>
1959             <row>
1960               <entry>
1961                 <para> <literal>nomsgs</literal></para>
1962               </entry>
1963               <entry>
1964                 <para>  Starts only the MDT (with a co-located MGS), without starting the MGS.</para>
1965               </entry>
1966             </row>
1967             <row>
1968               <entry>
1969                 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
1970               </entry>
1971               <entry>
1972                 <para>  Starts a client or MDT with a colon-separated list of known inactive OSTs.</para>
1973               </entry>
1974             </row>
1975             <row>
1976               <entry>
1977                 <para> <literal>nosvc</literal></para>
1978               </entry>
1979               <entry>
1980                 <para>  Only starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
1981               </entry>
1982             </row>
1983             <row>
1984               <entry>
1985                 <para> <literal>nomsgs</literal></para>
1986               </entry>
1987               <entry>
1988                 <para>  Starts a MDT with a co-located MGS, without starting the MGS.</para>
1989               </entry>
1990             </row>
1991             <row>
1992               <entry>
1993                 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
1994               </entry>
1995               <entry>
1996                 <para>  Starts a client or MDT with a (colon-separated) list of known inactive OSTs.</para>
1997               </entry>
1998             </row>
1999             <row>
2000               <entry>
2001                 <para> <literal>abort_recov</literal></para>
2002               </entry>
2003               <entry>
2004                 <para>  Aborts client recovery and starts the target service immediately.</para>
2005               </entry>
2006             </row>
2007             <row>
2008               <entry>
2009                 <para> <literal>md_stripe_cache_size</literal></para>
2010               </entry>
2011               <entry>
2012                 <para>  Sets the stripe cache size for server-side disk with a striped RAID configuration.</para>
2013               </entry>
2014             </row>
2015             <row>
2016               <entry>
2017                 <para> <literal>recovery_time_soft=<replaceable>timeout</replaceable></literal></para>
2018               </entry>
2019               <entry>
2020                 <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. The default soft recovery timeout is 300 seconds (5 minutes).</para>
2021               </entry>
2022             </row>
2023             <row>
2024               <entry>
2025                 <para> <literal>recovery_time_hard=<replaceable>timeout</replaceable></literal></para>
2026               </entry>
2027               <entry>
2028                 <para>  The server is allowed to incrementally extend its timeout up to a hard maximum of <literal>timeout</literal> seconds. The default hard recovery timeout is set to 900 seconds (15 minutes).</para>
2029               </entry>
2030             </row>
2031           </tbody>
2032         </tgroup>
2033       </informaltable>
2034     </section>
2035     <section remap="h5">
2036       <title>Examples</title>
2037       <para>Starts a client for the Lustre file system testfs at mount point /mnt/myfilesystem. The Management Service is running on a node reachable from this client via the cfs21@tcp0 NID.</para>
2038       <screen>mount -t lustre cfs21@tcp0:/testfs /mnt/myfilesystem</screen>
2039       <para>Starts the Lustre metadata target service from /dev/sda1 on mount point /mnt/test/mdt.</para>
2040       <screen>mount -t lustre /dev/sda1 /mnt/test/mdt</screen>
2041       <para>Starts the testfs-MDT0000 service (using the disk label), but aborts the recovery process.</para>
2042       <screen>mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt</screen>
2043     </section>
2044     <section remap="h5">
2045       <title>See Also</title>
2046       <itemizedlist>
2047         <listitem>
2048           <para>  <xref linkend="dbdoclet.50438219_75432"/></para>
2049         </listitem>
2050         <listitem>
2051           <para>  <xref linkend="dbdoclet.50438219_39574"/></para>
2052         </listitem>
2053         <listitem>
2054           <para>  <xref linkend="dbdoclet.50438219_38274"/></para>
2055         </listitem>
2056         <listitem>
2057           <para>  <xref linkend="dbdoclet.50438206_94597"/></para>
2058         </listitem>
2059       </itemizedlist>
2060     </section>
2061   </section>
2062   <section xml:id="dbdoclet.50438219_82679">
2063     <title><indexterm><primary>plot-llstat</primary></indexterm>
2064 plot-llstat</title>
2065     <para>The plot-llstat utility plots Lustre statistics.</para>
2066     <section remap="h5">
2067       <title>Synopsis</title>
2068       <screen>plot-llstat results_filename [parameter_index]
2069 </screen>
2070     </section>
2071     <section remap="h5">
2072       <title>Description</title>
2073       <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>
2074       <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>
2075       <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>
2076     </section>
2077     <section remap="h5">
2078       <title>Options</title>
2079       <informaltable frame="all">
2080         <tgroup cols="2">
2081           <colspec colname="c1" colwidth="50*"/>
2082           <colspec colname="c2" colwidth="50*"/>
2083           <thead>
2084             <row>
2085               <entry>
2086                 <para><emphasis role="bold">Option</emphasis></para>
2087               </entry>
2088               <entry>
2089                 <para><emphasis role="bold">Description</emphasis></para>
2090               </entry>
2091             </row>
2092           </thead>
2093           <tbody>
2094             <row>
2095               <entry>
2096                 <para> <literal>results_filename</literal></para>
2097               </entry>
2098               <entry>
2099                 <para> Output generated by plot-llstat</para>
2100               </entry>
2101             </row>
2102             <row>
2103               <entry>
2104                 <para> <literal>parameter_index</literal></para>
2105                 <para>&#160;</para>
2106               </entry>
2107               <entry>
2108                 <para> Value of parameter_index can be:</para>
2109                 <para> 1 - count per interval</para>
2110                 <para> 2 - count per second (default setting)</para>
2111                 <para> 3 - total count</para>
2112               </entry>
2113             </row>
2114           </tbody>
2115         </tgroup>
2116       </informaltable>
2117     </section>
2118     <section remap="h5">
2119       <title>Example</title>
2120       <screen>llstat -i2 -g -c lustre-OST0000 &gt; log
2121 plot-llstat log 3</screen>
2122     </section>
2123   </section>
2124   <section xml:id="dbdoclet.50438219_51496">
2125     <title><indexterm><primary>routerstat</primary></indexterm>
2126 routerstat</title>
2127     <para>The routerstat utility prints Lustre router statistics.</para>
2128     <section remap="h5">
2129       <title>Synopsis</title>
2130       <screen>routerstat [<replaceable>interval</replaceable>]</screen>
2131     </section>
2132     <section remap="h5">
2133       <title>Description</title>
2134       <para>The routerstat utility watches 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>
2135     </section>
2136     <section remap="h5">
2137       <title>Options</title>
2138       <para>The routerstat output includes the following fields:</para>
2139       <informaltable frame="all">
2140         <tgroup cols="2">
2141           <colspec colname="c1" colwidth="50*"/>
2142           <colspec colname="c2" colwidth="50*"/>
2143           <thead>
2144             <row>
2145               <entry>
2146                 <para><emphasis role="bold">Option</emphasis></para>
2147               </entry>
2148               <entry>
2149                 <para><emphasis role="bold">Description</emphasis></para>
2150               </entry>
2151             </row>
2152           </thead>
2153           <tbody>
2154             <row>
2155               <entry>
2156                 <para> <literal>M</literal></para>
2157               </entry>
2158               <entry>
2159                 <para> msgs_alloc(msgs_max)</para>
2160               </entry>
2161             </row>
2162             <row>
2163               <entry>
2164                 <para> <literal>E</literal></para>
2165               </entry>
2166               <entry>
2167                 <para> errors</para>
2168               </entry>
2169             </row>
2170             <row>
2171               <entry>
2172                 <para> <literal>S</literal></para>
2173               </entry>
2174               <entry>
2175                 <para> send_count/send_length</para>
2176               </entry>
2177             </row>
2178             <row>
2179               <entry>
2180                 <para> <literal>R</literal></para>
2181               </entry>
2182               <entry>
2183                 <para> recv_count/recv_length</para>
2184               </entry>
2185             </row>
2186             <row>
2187               <entry>
2188                 <para> <literal>F</literal></para>
2189               </entry>
2190               <entry>
2191                 <para> route_count/route_length</para>
2192               </entry>
2193             </row>
2194             <row>
2195               <entry>
2196                 <para> <literal>D</literal></para>
2197               </entry>
2198               <entry>
2199                 <para> drop_count/drop_length</para>
2200               </entry>
2201             </row>
2202           </tbody>
2203         </tgroup>
2204       </informaltable>
2205     </section>
2206     <section remap="h5">
2207       <title>Files</title>
2208       <para>The routerstat utility extracts statistics data from:</para>
2209       <screen>/proc/sys/lnet/stats</screen>
2210     </section>
2211   </section>
2212   <section xml:id="dbdoclet.50438219_39574">
2213     <title><indexterm><primary>tunefs.lustre</primary></indexterm>
2214 tunefs.lustre</title>
2215     <para>The tunefs.lustre utility modifies configuration information on a Lustre target disk.</para>
2216     <section remap="h5">
2217       <title>Synopsis</title>
2218       <screen>tunefs.lustre [options] <replaceable>/dev/device</replaceable></screen>
2219     </section>
2220     <section remap="h5">
2221       <title>Description</title>
2222       <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>
2223       <caution>
2224         <para>Changes made here affect a file system only when the target is mounted the next time.</para>
2225       </caution>
2226       <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>
2227       <screen>$ tunefs.lustre --erase-params --param=<replaceable>new_parameters</replaceable> </screen>
2228       <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>
2229       <screen>$ tunefs.lustre --param mdt.identity_upcall=NONE /dev/sda1</screen>
2230     </section>
2231     <section remap="h5">
2232       <title>Options</title>
2233       <para>The tunefs.lustre options are listed and explained below.</para>
2234       <informaltable frame="all">
2235         <tgroup cols="2">
2236           <colspec colname="c1" colwidth="50*"/>
2237           <colspec colname="c2" colwidth="50*"/>
2238           <thead>
2239             <row>
2240               <entry>
2241                 <para><emphasis role="bold">Option</emphasis></para>
2242               </entry>
2243               <entry>
2244                 <para><emphasis role="bold">Description</emphasis></para>
2245               </entry>
2246             </row>
2247           </thead>
2248           <tbody>
2249             <row>
2250               <entry>
2251                 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
2252               </entry>
2253               <entry>
2254                 <para> Sets a user comment about this disk, ignored by Lustre.</para>
2255               </entry>
2256             </row>
2257             <row>
2258               <entry>
2259                 <para> <literal>--dryrun</literal></para>
2260               </entry>
2261               <entry>
2262                 <para> Only prints what would be done; does not affect the disk.</para>
2263               </entry>
2264             </row>
2265             <row>
2266               <entry>
2267                 <para> <literal>--erase-params</literal></para>
2268               </entry>
2269               <entry>
2270                 <para> Removes all previous parameter information.</para>
2271               </entry>
2272             </row>
2273             <row>
2274               <entry>
2275                 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
2276               </entry>
2277               <entry>
2278                 <para> Sets the NID(s) of a failover partner. This option can be repeated as needed.</para>
2279                 <warning><para>Cannot be used with <literal>--servicenode</literal>.</para></warning>
2280               </entry>
2281             </row>
2282             <row>
2283               <entry>
2284                 <para> <literal>--servicenode=<replaceable>nid,...</replaceable></literal></para>
2285               </entry>
2286               <entry>
2287                 <para> Sets the NID(s) of all service node, including failover partner as well as local service nids. This option can be repeated as needed.</para>
2288                 <warning><para>: Cannot be used with <literal>--failnode</literal>.</para></warning>
2289               </entry>
2290             </row>
2291             <row>
2292               <entry>
2293                 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
2294               </entry>
2295               <entry>
2296                 <para> The Lustre file system of which this service will be a part. The default file
2297                   system name is <literal>lustre</literal>.</para>
2298               </entry>
2299             </row>
2300             <row>
2301               <entry>
2302                 <para> <literal>--index=<replaceable>index</replaceable></literal></para>
2303               </entry>
2304               <entry>
2305                 <para> Forces a particular OST or MDT index.</para>
2306               </entry>
2307             </row>
2308             <row>
2309               <entry>
2310                 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
2311               </entry>
2312               <entry>
2313                 <para> Sets the mount options used when the backing file system is mounted.</para>
2314                 <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>
2315                 <para>The defaults for ldiskfs are:</para>
2316                 <para>OST: <literal>errors=remount-ro,mballoc,extents</literal>;</para>
2317                 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
2318                 <para>Do not alter the default mount options unless you know what you are doing.</para>
2319               </entry>
2320             </row>
2321             <row>
2322               <entry>
2323                 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
2324               </entry>
2325               <entry>
2326                 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
2327               </entry>
2328             </row>
2329             <row>
2330               <entry>
2331                 <para> <literal>--mgs</literal></para>
2332               </entry>
2333               <entry>
2334                 <para> Adds a configuration management service to this target.</para>
2335               </entry>
2336             </row>
2337             <row>
2338               <entry>
2339                 <para> <literal>--msgnode=<replaceable>nid,...</replaceable></literal></para>
2340               </entry>
2341               <entry>
2342                 <para> Sets the NID(s) of the MGS node; required for all targets other than the MGS.</para>
2343               </entry>
2344             </row>
2345             <row>
2346               <entry>
2347                 <para> <literal>--nomgs</literal></para>
2348               </entry>
2349               <entry>
2350                 <para> Removes a configuration management service to this target.</para>
2351               </entry>
2352             </row>
2353             <row>
2354               <entry>
2355                 <para> <literal>--quiet</literal></para>
2356               </entry>
2357               <entry>
2358                 <para> Prints less information.</para>
2359               </entry>
2360             </row>
2361             <row>
2362               <entry>
2363                 <para> <literal>--verbose</literal></para>
2364               </entry>
2365               <entry>
2366                 <para> Prints more information.</para>
2367               </entry>
2368             </row>
2369             <row>
2370               <entry>
2371                 <para> <literal>--writeconf</literal></para>
2372               </entry>
2373               <entry>
2374                 <para> Erases all configuration logs for the file system to which this MDT belongs,
2375                   and regenerates them. This is dangerous operation. All clients must be unmounted
2376                   and servers for this file system should be stopped. All targets (OSTs/MDTs) must
2377                   then be restarted to regenerate the logs. No clients should be started until all
2378                   targets have restarted.</para>
2379                 <para>The correct order of operations is:</para>
2380                 <orderedlist>
2381                   <listitem>
2382                     <para>Unmount all clients on the file system</para>
2383                   </listitem>
2384                   <listitem>
2385                     <para>Unmount the MDT and all OSTs on the file system</para>
2386                   </listitem>
2387                   <listitem>
2388                     <para>Run <literal>tunefs.lustre --writeconf
2389                         <replaceable>device</replaceable></literal> on every server</para>
2390                   </listitem>
2391                   <listitem>
2392                     <para>Mount the MDT and OSTs</para>
2393                   </listitem>
2394                   <listitem>
2395                     <para>Mount the clients</para>
2396                   </listitem>
2397                 </orderedlist>
2398               </entry>
2399             </row>
2400           </tbody>
2401         </tgroup>
2402       </informaltable>
2403     </section>
2404     <section remap="h5">
2405       <title>Examples</title>
2406       <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>
2407       <screen>tunefs.lustre --erase-param --mgsnode=<replaceable>new_nid</replaceable> --writeconf /dev/sda</screen>
2408       <para>Add a failover NID location for this target.</para>
2409       <screen>tunefs.lustre --param=&quot;failover.node=192.168.0.13@tcp0&quot; /dev/sda </screen>
2410     </section>
2411     <section remap="h5">
2412       <title>See Also</title>
2413       <itemizedlist>
2414         <listitem>
2415           <para><xref linkend="dbdoclet.50438219_75432"/></para>
2416         </listitem>
2417         <listitem>
2418           <para><xref linkend="dbdoclet.50438219_12635"/></para>
2419         </listitem>
2420         <listitem>
2421           <para><xref linkend="dbdoclet.50438219_38274"/></para>
2422         </listitem>
2423         <listitem>
2424           <para><xref linkend="dbdoclet.50438206_94597"/></para>
2425         </listitem>
2426       </itemizedlist>
2427     </section>
2428   </section>
2429   <section xml:id="dbdoclet.50438219_99928">
2430       <title><indexterm><primary>utilities</primary><secondary>system config</secondary></indexterm>
2431 Additional System Configuration Utilities</title>
2432     <para>This section describes additional system configuration utilities for Lustre.</para>
2433     <section remap="h3">
2434       <title><indexterm><primary>utilities</primary><secondary>application profiling</secondary></indexterm>
2435 Application Profiling Utilities</title>
2436       <para>The following utilities are located in /usr/bin.</para>
2437       <para><literal>lustre_req_history.sh</literal></para>
2438       <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>
2439       <para><literal>llstat.sh</literal></para>
2440       <para>The llstat.sh utility handles a wider range of statistics files, and has command line switches to produce more graphable output.</para>
2441       <para><literal>plot-llstat.sh</literal></para>
2442       <para>The plot-llstat.sh utility plots the output from llstat.sh using gnuplot.</para>
2443     </section>
2444     <section remap="h3">
2445       <title>More /proc Statistics for Application Profiling</title>
2446       <para>The following utilities provide additional statistics.</para>
2447       <para><literal>vfs_ops_stats</literal></para>
2448       <para>The client vfs_ops_stats utility tracks Linux VFS operation calls into Lustre for a single PID, PPID, GID or everything.</para>
2449       <screen>/proc/fs/lustre/llite/*/vfs_ops_stats
2450 /proc/fs/lustre/llite/*/vfs_track_[pid|ppid|gid]
2451 </screen>
2452       <para><literal>extents_stats</literal></para>
2453       <para>The client extents_stats utility shows the size distribution of I/O calls from the client (cumulative and by process).</para>
2454       <screen>/proc/fs/lustre/llite/*/extents_stats, extents_stats_per_process
2455 </screen>
2456       <para><literal>offset_stats</literal></para>
2457       <para>The client offset_stats utility shows the read/write seek activity of a client by offsets and ranges.</para>
2458       <screen>/proc/fs/lustre/llite/*/offset_stats
2459 </screen>
2460       <para>Lustre includes per-client and improved MDT statistics:</para>
2461       <itemizedlist>
2462         <listitem>
2463           <para> Per-client statistics tracked on the servers</para>
2464         </listitem>
2465       </itemizedlist>
2466       <para>Each MDT and OST now tracks LDLM and operations statistics for every connected client, for comparisons and simpler collection of distributed job statistics.</para>
2467       <screen>/proc/fs/lustre/mds|obdfilter/*/exports/
2468 </screen>
2469       <itemizedlist>
2470         <listitem>
2471           <para> Improved MDT statistics</para>
2472         </listitem>
2473       </itemizedlist>
2474       <para>More detailed MDT operations statistics are collected for better profiling.</para>
2475       <screen>/proc/fs/lustre/mds/*/stats
2476 </screen>
2477     </section>
2478     <section remap="h3">
2479       <title><indexterm><primary>utilities</primary><secondary>debugging</secondary></indexterm><indexterm><primary>debug</primary><secondary>utilities</secondary></indexterm>
2480
2481 Testing / Debugging Utilities</title>
2482       <para>Lustre offers the following test and debugging utilities.</para>
2483       <section remap="h5">
2484         <title><indexterm><primary>loadgen</primary></indexterm>
2485 loadgen</title>
2486         <para>The Load Generator (loadgen) is a test program designed to simulate large numbers of Lustre clients connecting and writing to an OST. The loadgen utility is located at lustre/utils/loadgen (in a build directory) or at /usr/sbin/loadgen (from an RPM).</para>
2487         <para>Loadgen offers the ability to run this test:</para>
2488         <orderedlist>
2489           <listitem>
2490             <para>Start an arbitrary number of (echo) clients.</para>
2491           </listitem>
2492           <listitem>
2493             <para>Start and connect to an echo server, instead of a real OST.</para>
2494           </listitem>
2495           <listitem>
2496             <para>Create/bulk_write/delete objects on any number of echo clients simultaneously.</para>
2497           </listitem>
2498         </orderedlist>
2499         <para>Currently, the maximum number of clients is limited by MAX_OBD_DEVICES and the amount of memory available.</para>
2500       </section>
2501       <section remap="h5">
2502         <title>Usage</title>
2503         <para>The loadgen utility can be run locally on the OST server machine or remotely from any LNET host. The device command can take an optional NID as a parameter; if unspecified, the first local NID found is used.</para>
2504         <para>The obdecho module must be loaded by hand before running loadgen.</para>
2505         <screen># cd lustre/utils/ 
2506 # insmod ../obdecho/obdecho.ko 
2507 # ./loadgen 
2508 loadgen&gt; h 
2509 This is a test program used to simulate large numbers of clients. The echo \
2510 obds are used, so the obdecho module must be loaded. 
2511  
2512 Typical usage would be: 
2513 loadgen&gt; dev lustre-OST0000       set the target device 
2514 loadgen&gt; start 20                 start 20 echo clients 
2515 loadgen&gt; wr 10 5                  have 10 clients do simultaneous brw_write \
2516 tests 5 times each 
2517  
2518 Available commands are: 
2519    device 
2520    dl 
2521    echosrv 
2522    start 
2523    verbose 
2524    wait 
2525    write 
2526    help 
2527    exit 
2528    quit 
2529  
2530 For more help type: help command-name 
2531 loadgen&gt; 
2532 loadgen&gt; device lustre-OST0000 192.168.0.21@tcp 
2533 Added uuid OSS_UUID: 192.168.0.21@tcp 
2534 Target OST name is &apos;lustre-OST0000&apos; 
2535 loadgen&gt; 
2536 loadgen&gt; st 4 
2537 start 0 to 4 
2538 ./loadgen: running thread #1 
2539 ./loadgen: running thread #2 
2540 ./loadgen: running thread #3 
2541 ./loadgen: running thread #4 
2542 loadgen&gt; wr 4 5 
2543 Estimate 76 clients before we run out of grant space (155872K / 2097152) 
2544 1: i0 
2545 2: i0 
2546 4: i0 
2547 3: i0 
2548 1: done (0) 
2549 2: done (0) 
2550 4: done (0) 
2551 3: done (0) 
2552 wrote 25MB in 1.419s (17.623 MB/s) 
2553 loadgen&gt; 
2554 </screen>
2555         <para>The loadgen utility prints periodic status messages; message output can be controlled with the verbose command.</para>
2556         <para>To insure that a file can be written to (a requirement of write cache), OSTs reserve (&quot;grants&quot;), chunks of space for each newly-created file. A grant may cause an OST to report that it is out of space, even though there is plenty of space on the disk, because the space is &quot;reserved&quot; by other files. The loadgen utility estimates the number of simultaneous open files as the disk size divided by the grant size and reports that number when the write tests are first started.</para>
2557         <para>Echo Server</para>
2558         <para>The loadgen utility can start an echo server. On another node, loadgen can specify the echo server as the device, thus creating a network-only test environment.</para>
2559         <screen>loadgen&gt; echosrv 
2560 loadgen&gt; dl 
2561    0 UP obdecho echosrv echosrv 3 
2562    1 UP ost OSS OSS 3 
2563 </screen>
2564         <para>On another node:</para>
2565         <screen>loadgen&gt; device echosrv cfs21@tcp 
2566 Added uuid OSS_UUID: 192.168.0.21@tcp 
2567 Target OST name is &apos;echosrv&apos; 
2568 loadgen&gt; st 1 
2569 start 0 to 1 
2570 ./loadgen: running thread #1 
2571 loadgen&gt; wr 1 
2572 start a test_brw write test on X clients for Y iterations 
2573 usage: write &lt;num_clients&gt; &lt;num_iter&gt; [&lt;delay&gt;] 
2574 loadgen&gt; wr 1 1 
2575 loadgen&gt; 
2576 1: i0 
2577 1: done (0) 
2578 wrote 1MB in 0.029s (34.023 MB/s)
2579 </screen>
2580         <para>Scripting</para>
2581         <para>The threads all perform their actions in non-blocking mode; use the wait command to block for the idle state. For example:</para>
2582         <screen>#!/bin/bash 
2583 ./loadgen &lt;&lt; EOF 
2584 device lustre-OST0000 
2585 st 1 
2586 wr 1 10 
2587 wait 
2588 quit 
2589 EOF 
2590 </screen>
2591         <para>Feature Requests</para>
2592         <para>The loadgen utility is intended to grow into a more comprehensive test tool; feature requests are encouraged. The current feature requests include:</para>
2593         <itemizedlist>
2594           <listitem>
2595             <para> Locking simulation</para>
2596           </listitem>
2597           <listitem>
2598             <itemizedlist>
2599               <listitem>
2600                 <para> Many (echo) clients cache locks for the specified resource at the same time.</para>
2601               </listitem>
2602               <listitem>
2603                 <para> Many (echo) clients enqueue locks for the specified resource simultaneously.</para>
2604               </listitem>
2605             </itemizedlist>
2606           </listitem>
2607           <listitem>
2608             <para> obdsurvey functionality</para>
2609           </listitem>
2610           <listitem>
2611             <itemizedlist>
2612               <listitem>
2613                 <para> Fold the Lustre I/O kit&apos;s obdsurvey script functionality into loadgen</para>
2614               </listitem>
2615             </itemizedlist>
2616           </listitem>
2617         </itemizedlist>
2618       </section>
2619       <section remap="h5">
2620         <title><indexterm><primary>llog_reader</primary></indexterm>
2621 llog_reader</title>
2622         <para>The llog_reader utility translates a Lustre configuration log into human-readable form.</para>
2623       </section>
2624       <section remap="h5">
2625         <title>Synopsis</title>
2626         <screen>llog_reader filename
2627 </screen>
2628       </section>
2629       <section remap="h5">
2630         <title>Description</title>
2631         <para>llog_reader parses the binary format of Lustre&apos;s on-disk configuration logs. It can only read the logs. Use tunefs.lustre to write to them.</para>
2632         <para>To examine a log file on a stopped Lustre server, mount its backing file system as ldiskfs, then use llog_reader to dump the log file&apos;s contents. For example:</para>
2633         <screen>mount -t ldiskfs /dev/sda /mnt/mgs 
2634 llog_reader /mnt/mgs/CONFIGS/tfs-client
2635 </screen>
2636         <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>
2637         <screen>debugfs -c -R &apos;dump CONFIGS/tfs-client /tmp/tfs-client&apos; /dev/sda 
2638 llog_reader /tmp/tfs-client
2639 </screen>
2640         <caution>
2641           <para>Although they are stored in the CONFIGS directory, mountdata files do not use the config log format and will confuse llog_reader.</para>
2642         </caution>
2643         <para>See Also <xref linkend="dbdoclet.50438219_39574"/></para>
2644       </section>
2645       <section remap="h5">
2646         <title><indexterm><primary>lr_reader</primary></indexterm>
2647 lr_reader</title>
2648         <para>The lr_reader utility translates a last received (last_rcvd) file into human-readable form.</para>
2649         <para>The following utilities are part of the Lustre I/O kit. For more information, see <xref linkend="benchmarkingtests"/>.</para>
2650       </section>
2651       <section remap="h5">
2652         <title><indexterm>
2653             <primary>sgpdd-survey</primary>
2654           </indexterm> sgpdd-survey</title>
2655         <para>The <literal>sgpdd-survey</literal> utility tests &apos;bare metal&apos; performance,
2656           bypassing as much of the kernel as possible. The <literal>sgpdd-survey</literal> tool does
2657           not require Lustre, but it does require the sgp_dd package.</para>
2658         <caution>
2659           <para>The <literal>sgpdd-survey</literal> utility erases all data on the device.</para>
2660         </caution>
2661       </section>
2662       <section remap="h5">
2663         <title><indexterm>
2664             <primary>obdfilter-survey</primary>
2665           </indexterm>obdfilter-survey</title>
2666         <para>The <literal>obdfilter-survey</literal> utility is a shell script that tests
2667           performance of isolated OSTS, the network via echo clients, and an end-to-end test.</para>
2668       </section>
2669       <section remap="h5">
2670         <title><indexterm><primary>ior-survey</primary></indexterm>ior-survey</title>
2671         <para>The ior-survey utility is a script used to run the IOR benchmark. Lustre includes IOR version 2.8.6.</para>
2672       </section>
2673       <section remap="h5">
2674         <title><indexterm>
2675             <primary>ost-survey</primary>
2676           </indexterm>ost-survey</title>
2677         <para>The <literal>ost-survey</literal> utility is an OST performance survey that tests
2678           client-to-disk performance of the individual OSTs in a Lustre file system.</para>
2679       </section>
2680       <section remap="h5">
2681         <title><indexterm><primary>stats-collect</primary></indexterm>stats-collect</title>
2682         <para>The stats-collect utility contains scripts used to collect application profiling information from Lustre clients and servers.</para>
2683       </section>
2684     </section>
2685     <section remap="h3">
2686       <title><indexterm><primary>flock</primary></indexterm>Flock Feature</title>
2687       <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>
2688       <para>By default, the flock utility is disabled on Lustre. Two modes are available.</para>
2689       <informaltable frame="none">
2690         <tgroup cols="2">
2691           <colspec colname="c1" colwidth="50*"/>
2692           <colspec colname="c2" colwidth="50*"/>
2693           <tbody>
2694             <row>
2695               <entry>
2696                 <para> <literal>local mode</literal></para>
2697               </entry>
2698               <entry>
2699                 <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>
2700                 <note>
2701                   <para>This mode does not impact performance and is appropriate for single-node databases.</para>
2702                 </note>
2703               </entry>
2704             </row>
2705             <row>
2706               <entry>
2707                 <para> <literal>consistent mode</literal></para>
2708               </entry>
2709               <entry>
2710                 <para> In this mode, locks are coherent across all clients.</para>
2711                 <para> To enable it, use the -o flock. This is a client-mount option.</para>
2712                 <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>
2713               </entry>
2714             </row>
2715           </tbody>
2716         </tgroup>
2717       </informaltable>
2718       <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>
2719       <section remap="h4">
2720         <title>Example</title>
2721         <screen>$ mount -t lustre -o flock mds@tcp0:/lustre /mnt/client</screen>
2722         <para>You can check it in /etc/mtab. It should look like,</para>
2723         <screen>mds@tcp0:/lustre /mnt/client lustre rw,flock         0       0</screen>
2724       </section>
2725     </section>
2726   </section>
2727 </chapter>