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