1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="systemconfigurationutilities">
3 <title xml:id="systemconfigurationutilities.title">System Configuration Utilities</title>
4 <para>This chapter includes system configuration utilities and includes the following sections:</para>
7 <para><xref linkend="dbdoclet.50438219_55923"/></para>
10 <para><xref linkend="dbdoclet.50438219_76969"/></para>
13 <para><xref linkend="dbdoclet.50438219_38274"/></para>
16 <para><xref linkend="dbdoclet.50438219_58217"/></para>
19 <para><xref linkend="dbdoclet.50438219_44971"/></para>
22 <para><xref linkend="dbdoclet.50438219_84890"/></para>
25 <para><xref linkend="dbdoclet.50438219_90386"/></para>
28 <para><xref linkend="dbdoclet.50438219_23232"/></para>
31 <para><xref linkend="dbdoclet.50438219_23648"/></para>
34 <para><xref linkend="dbdoclet.50438219_64286"/></para>
37 <para><xref linkend="dbdoclet.50438219_90218"/></para>
40 <para><xref linkend="dbdoclet.50438219_54734"/></para>
43 <para><xref linkend="dbdoclet.50438219_63667"/></para>
46 <para><xref linkend="dbdoclet.50438219_75432"/></para>
49 <para><xref linkend="dbdoclet.50438219_12635"/></para>
52 <para><xref linkend="dbdoclet.50438219_82679"/></para>
55 <para><xref linkend="dbdoclet.50438219_51496"/></para>
58 <para><xref linkend="dbdoclet.50438219_39574"/></para>
61 <para><xref linkend="dbdoclet.50438219_99928"/></para>
64 <section xml:id="dbdoclet.50438219_55923">
65 <title><indexterm><primary>e2scan</primary></indexterm>
67 <para>The e2scan utility is an ext2 file system-modified inode scan program. The e2scan program uses libext2fs to find inodes with ctime or mtime newer than a given time and prints out their pathname. Use e2scan to efficiently generate lists of files that have been modified. The e2scan tool is included in the e2fsprogs package, located at:</para>
68 <para><link xl:href="http://downloads.hpdd.intel.com/public/e2fsprogs/latest/">http://downloads.hpdd.intel.com/public/e2fsprogs/latest/</link></para>
70 <title>Synopsis</title>
71 <screen>e2scan [options] [-f file] block_device</screen>
74 <title>Description</title>
75 <para>When invoked, the e2scan utility iterates all inodes on the block device, finds modified inodes, and prints their inode numbers. A similar iterator, using libext2fs(5), builds a table (called parent database) which lists the parent node for each inode. With a lookup function, you can reconstruct modified pathnames from root.</para>
78 <title>Options</title>
79 <informaltable frame="all">
81 <colspec colname="c1" colwidth="50*"/>
82 <colspec colname="c2" colwidth="50*"/>
86 <para><emphasis role="bold">Option</emphasis></para>
89 <para><emphasis role="bold">Description</emphasis></para>
96 <para> <literal>-b <replaceable>inode buffer blocks</replaceable></literal></para>
99 <para> Sets the readahead inode blocks to get excellent performance when scanning the block device.</para>
105 <para> <literal>-o <replaceable>output file</replaceable></literal></para>
108 <para> If an output file is specified, modified pathnames are written to this file. Otherwise, modified parameters are written to stdout.</para>
113 <para> <literal>-t <replaceable>inode</replaceable>| <replaceable>pathname</replaceable></literal></para>
116 <para> Sets the e2scan type if type is inode. The e2scan utility prints modified inode numbers to stdout. By default, the type is set as pathname.</para>
117 <para>The e2scan utility lists modified pathnames based on modified inode numbers.</para>
122 <para> <literal>-u</literal></para>
125 <para> Rebuilds the parent database from scratch. Otherwise, the current parent database is used.</para>
133 <section xml:id="dbdoclet.50438219_76969">
134 <title><indexterm><primary>l_getidentity</primary></indexterm>
135 l_getidentity</title>
136 <para>The l_getidentity utility handles Lustre user / group cache upcall.</para>
138 <title>Synopsis</title>
139 <screen>l_getidentity ${FSNAME}-MDT{xxxx} {uid}</screen>
142 <title>Description</title>
143 <para>The group upcall file contains the path to an executable file that is invoked to resolve
144 a numeric UID to a group membership list. This utility opens
145 <literal>/proc/fs/lustre/mdt/${FSNAME}-MDT{xxxx}/identity_info</literal> and writes the
146 related <literal>identity_downcall_data</literal> structure (see <xref
147 linkend="dbdoclet.50438291_33759"/>.) The data is persisted with <literal>lctl set_param
148 mdt.${FSNAME}-MDT{xxxx}.identity_info</literal>.</para>
149 <para>The l_getidentity utility is the reference implementation of the user or group cache upcall.</para>
152 <title>Options</title>
153 <informaltable frame="all">
155 <colspec colname="c1" colwidth="50*"/>
156 <colspec colname="c2" colwidth="50*"/>
160 <para><emphasis role="bold">Option</emphasis></para>
163 <para><emphasis role="bold">Description</emphasis></para>
171 <literal>${FSNAME}-MDT{xxxx}</literal></para>
174 <para> Metadata server target name</para>
179 <para> <literal>uid</literal></para>
182 <para> User identifier</para>
191 <para>The l_getidentity files are located at:</para>
192 <screen>/proc/fs/lustre/mdt/${FSNAME}-MDT{xxxx}/identity_upcall</screen>
195 <section xml:id="dbdoclet.50438219_38274">
196 <title><indexterm><primary>lctl</primary></indexterm>
198 <para>The lctl utility is used for root control and configuration. With lctl you can directly control Lustre via an ioctl interface, allowing various configuration, maintenance and debugging features to be accessed.</para>
200 <title>Synopsis</title>
201 <screen>lctl [--device <replaceable>devno</replaceable>] <replaceable>command [args]</replaceable></screen>
204 <title>Description</title>
205 <para>The lctl utility can be invoked in interactive mode by issuing the lctl command. After that, commands are issued as shown below. The most common lctl commands are:</para>
209 network <replaceable>up|down</replaceable>
211 ping <replaceable>nid</replaceable>help
213 <para>For a complete list of available commands, type <literal>help</literal> at the <literal>lctl</literal> prompt. To get basic help on command meaning and syntax, type <literal>help <replaceable>command</replaceable></literal>. Command completion is activated with the TAB key (depending on compile options), and command history is available via the up- and down-arrow keys.</para>
214 <para>For non-interactive use, use the second invocation, which runs the command after connecting to the device.</para>
217 <title>Setting Parameters with lctl</title>
218 <para>Lustre parameters are not always accessible using the procfs interface, as it is platform-specific. As a solution, lctl {get,set}_param has been introduced as a platform-independent interface to the Lustre tunables. Avoid direct references to /proc/{fs,sys}/{lustre,lnet}. For future portability, use lctl {get,set}_param .</para>
219 <para>When the file system is running, use the <literal>lctl set_param</literal> command on the affected node(s) to <emphasis>temporarily</emphasis> set parameters (mapping to items in /proc/{fs,sys}/{lnet,lustre}). The <literal>lctl set_param</literal> command uses this syntax:</para>
220 <screen>lctl set_param [-n] [-P] [-d] <replaceable>obdtype.obdname.property</replaceable>=<replaceable>value</replaceable></screen>
221 <para>For example:</para>
222 <screen>mds# lctl set_param mdt.testfs-MDT0000.identity_upcall=NONE</screen>
223 <para condition='l25'>Use <literal>-P</literal> option to set parameters permanently. Option <literal>-d </literal>deletes permanent parameters. For example:
224 <screen>mgs# lctl set_param -P mdt.testfs-MDT0000.identity_upcall=NONE
225 mgs# lctl set_param -P -d mdt.testfs-MDT0000.identity_upcall</screen></para>
226 <para>Many permanent parameters can be set with <literal>lctl conf_param</literal>. In general, <literal>lctl conf_param</literal> can be used to specify any OBD device parameter settable in a /proc/fs/lustre file. The <literal>lctl conf_param</literal> command must be run on the MGS node, and uses this syntax:</para>
227 <screen><replaceable>obd|fsname</replaceable>.obdtype.property=<replaceable>value</replaceable>) </screen>
228 <para>For example:</para>
229 <screen>mgs# lctl conf_param testfs-MDT0000.mdt.identity_upcall=NONE
230 $ lctl conf_param testfs.llite.max_read_ahead_mb=16 </screen>
232 <para>The <literal>lctl conf_param</literal> command <emphasis>permanently</emphasis> sets parameters in the file system configuration for all nodes of the specified type.</para>
234 <para>To get current Lustre parameter settings, use the <literal>lctl get_param</literal> command on the desired node with the same parameter name as <literal>lctl set_param</literal>:</para>
235 <screen>lctl get_param [-n] <replaceable>obdtype.obdname.parameter</replaceable></screen>
236 <para>For example:</para>
237 <screen>mds# lctl get_param mdt.testfs-MDT0000.identity_upcall</screen>
238 <para>To list Lustre parameters that are available to set, use the <literal>lctl list_param</literal> command, with this syntax:</para>
239 <screen>lctl list_param [-R] [-F] <replaceable>obdtype.obdname.*</replaceable></screen>
240 <para>For example, to list all of the parameters on the MDT:</para>
241 <screen>oss# lctl list_param -RF mdt</screen>
242 <para>For more information on using lctl to set temporary and permanent parameters, see <xref linkend="dbdoclet.50438194_51490"/>.</para>
243 <para><emphasis role="bold">Network Configuration</emphasis></para>
244 <informaltable frame="all">
246 <colspec colname="c1" colwidth="50*"/>
247 <colspec colname="c2" colwidth="50*"/>
251 <para><emphasis role="bold">Option</emphasis></para>
254 <para><emphasis role="bold">Description</emphasis></para>
261 <para> <literal>network up|down|tcp|elan|myrinet</literal></para>
264 <para> Starts or stops LNET, or selects a network type for other <literal>lctl</literal> LNET commands.</para>
269 <para> <literal>list_nids</literal></para>
272 <para> Prints all NIDs on the local node. LNET must be running.</para>
277 <para> <literal>which_nid <replaceable>nidlist</replaceable></literal></para>
280 <para> From a list of NIDs for a remote node, identifies the NID on which interface communication will occur.</para>
285 <para> <literal>ping <replaceable>nid</replaceable></literal></para>
288 <para> Checks LNET connectivity via an LNET ping. This uses the fabric appropriate to the specified NID.</para>
293 <para> <literal>interface_list</literal></para>
296 <para> Prints the network interface information for a given <emphasis>network</emphasis> type.</para>
301 <para> <literal>peer_list</literal></para>
304 <para> Prints the known peers for a given <emphasis>network</emphasis> type.</para>
309 <para> <literal>conn_list</literal></para>
312 <para> Prints all the connected remote NIDs for a given <emphasis>network</emphasis> type.</para>
317 <para> <literal>active_tx</literal></para>
320 <para> This command prints active transmits. It is only used for the Elan <emphasis>network</emphasis> type.</para>
325 <para> <literal>route_list</literal></para>
328 <para> Prints the complete routing table.</para>
334 <para><emphasis role="bold">Device Selection</emphasis></para>
335 <informaltable frame="all">
337 <colspec colname="c1" colwidth="33*"/>
338 <colspec colname="c2" colwidth="33*"/>
339 <colspec colname="c3" colwidth="33*"/>
343 <para><emphasis role="bold">Option</emphasis></para>
346 <para><emphasis role="bold"> </emphasis></para>
349 <para><emphasis role="bold">Description</emphasis></para>
356 <para> <literal>device <replaceable>devname</replaceable></literal></para>
362 <para> This selects the specified OBD device. All other commands depend on the device being set.</para>
367 <para> <literal>device_list</literal></para>
373 <para> Shows the local Lustre OBDs, a/k/a <literal>dl</literal>.</para>
379 <para><emphasis role="bold">Device Operations</emphasis></para>
380 <informaltable frame="all">
382 <colspec colname="c1" colwidth="33*"/>
383 <colspec colname="c2" colwidth="33*"/>
384 <colspec colname="c3" colwidth="33*"/>
387 <entry nameend="c2" namest="c1">
388 <para><emphasis role="bold">Option</emphasis></para>
391 <para><emphasis role="bold">Description</emphasis></para>
397 <entry nameend="c2" namest="c1">
398 <para> <literal>list_param [-F|-R] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
401 <para> Lists the Lustre or LNET parameter name.</para>
410 <para> <literal>-F</literal></para>
413 <para> Adds '/', '@' or '=' for directories, symlinks and writeable files, respectively.</para>
421 <para> <literal>-R</literal></para>
424 <para> Recursively lists all parameters under the specified path. If <literal>param_path</literal> is unspecified, all parameters are shown.</para>
428 <entry nameend="c2" namest="c1">
429 <para> <literal>get_param [-n|-N|-F] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
432 <para> Gets the value of a Lustre or LNET parameter from the specified path.</para>
440 <para> <literal>-n</literal></para>
443 <para> Prints only the parameter value and not the parameter name.</para>
451 <para> <literal>-N</literal></para>
454 <para> Prints only matched parameter names and not the values; especially useful when using patterns.</para>
462 <para> <literal>-F</literal></para>
465 <para> When <literal>-N</literal> is specified, adds '/', '@' or '=' for directories, symlinks and writeable files, respectively.</para>
469 <entry nameend="c2" namest="c1">
470 <para> <literal>set_param [-n] <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
473 <para> Sets the value of a Lustre or LNET parameter from the specified path.</para>
481 <para> <literal>-n</literal></para>
484 <para> Disables printing of the key name when printing values.</para>
488 <entry nameend="c2" namest="c1">
489 <para><literal>conf_param [-d] <replaceable>device|fsname</replaceable> <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
492 <para> Sets a permanent configuration parameter for any device via the MGS. This command must be run on the MGS node.</para>
493 <para>All writeable parameters under <literal>lctl list_param</literal> (e.g. <literal>lctl list_param -F osc.*.* | grep</literal> =) can be permanently set using <literal>lctl conf_param</literal>, but the format is slightly different. For <literal>conf_param</literal>, the device is specified first, then the obdtype. Wildcards are not supported. Additionally, failover nodes may be added (or removed), and some system-wide parameters may be set as well (sys.at_max, sys.at_min, sys.at_extra, sys.at_early_margin, sys.at_history, sys.timeout, sys.ldlm_timeout). For system-wide parameters, <replaceable>device</replaceable> is ignored.</para>
494 <para>For more information on setting permanent parameters and <literal>lctl conf_param</literal> command examples, see <xref linkend="dbdoclet.50438194_64195"/> (Setting Permanent Parameters).</para>
502 <para><literal>-d <replaceable>device|fsname</replaceable>.<replaceable>parameter</replaceable></literal></para>
506 <para> Deletes a parameter setting (use the default value at the next restart). A null value for <replaceable>value</replaceable> also deletes the parameter setting.</para>
510 <entry nameend="c2" namest="c1">
511 <para> <literal>activate</literal></para>
514 <para> Re-activates an import after the deactivate operation. This setting is only effective until the next restart (see <literal>conf_param</literal>).</para>
518 <entry nameend="c2" namest="c1">
519 <para> <literal>deactivate</literal></para>
522 <para> Deactivates an import, in particular meaning do not assign new file stripes to an OSC. Running lctl deactivate on the MDS stops new objects from being allocated on the OST. Running lctl deactivate on Lustre clients causes them to return -EIO when accessing objects on the OST instead of waiting for recovery.</para>
526 <entry nameend="c2" namest="c1">
527 <para> <literal>abort_recovery</literal></para>
530 <para> Aborts the recovery process on a re-starting MDT or OST.</para>
537 <para>Lustre tunables are not always accessible using the procfs interface, as it is platform-specific. As a solution, <literal>lctl {get,set,list}_param</literal> has been introduced as a platform-independent interface to the Lustre tunables. Avoid direct references to <literal>/proc/{fs,sys}/{lustre,lnet}</literal>. For future portability, use <literal>lctl {get,set,list}_param</literal> instead.</para>
539 <para><emphasis role="bold">Virtual Block Device Operations</emphasis></para>
540 <para>Lustre can emulate a virtual block device upon a regular file. This emulation is needed when you are trying to set up a swap space via the file.</para>
541 <informaltable frame="all">
543 <colspec colname="c1" colwidth="50*"/>
544 <colspec colname="c2" colwidth="50*"/>
548 <para><emphasis role="bold">Option</emphasis></para>
551 <para><emphasis role="bold">Description</emphasis></para>
558 <para><literal>blockdev_attach <replaceable>filename</replaceable> <replaceable>/dev/lloop_device</replaceable></literal></para>
561 <para> Attaches a regular Lustre file to a block device. If the device node does not exist, <literal>lctl</literal> creates it. It is recommend that a device node is created by <literal>lctl</literal> since the emulator uses a dynamical major number.</para>
566 <para><literal>blockdev_detach <replaceable>/dev/lloop_device</replaceable></literal></para>
569 <para> Detaches the virtual block device.</para>
574 <para><literal>blockdev_info <replaceable>/dev/lloop_device</replaceable></literal></para>
577 <para> Provides information about the Lustre file attached to the device node.</para>
583 <para><emphasis role="bold">Changelogs</emphasis></para>
584 <informaltable frame="all">
586 <colspec colname="c1" colwidth="50*"/>
587 <colspec colname="c2" colwidth="50*"/>
591 <para><emphasis role="bold">Option</emphasis></para>
594 <para><emphasis role="bold">Description</emphasis></para>
601 <para> <literal>changelog_register</literal></para>
604 <para> Registers a new changelog user for a particular device. Changelog entries are not purged beyond a registered user's set point (see <literal>lfs changelog_clear</literal>).</para>
609 <para>changelog_deregister <replaceable>id</replaceable></para>
612 <para> Unregisters an existing changelog user. If the user's "clear" record number is the minimum for the device, changelog records are purged until the next minimum.</para>
618 <para><emphasis role="bold">Debug</emphasis></para>
619 <informaltable frame="all">
621 <colspec colname="c1" colwidth="50*"/>
622 <colspec colname="c2" colwidth="50*"/>
626 <para><emphasis role="bold">Option</emphasis></para>
629 <para><emphasis role="bold">Description</emphasis></para>
636 <para> <literal>debug_daemon</literal></para>
639 <para> Starts and stops the debug daemon, and controls the output filename and size.</para>
644 <para> <literal>debug_kernel <replaceable>[file]</replaceable> [raw]</literal></para>
647 <para> Dumps the kernel debug buffer to stdout or a file.</para>
652 <para><literal>debug_file <replaceable>input_file</replaceable> <replaceable>[output_file]</replaceable></literal></para>
655 <para> Converts the kernel-dumped debug log from binary to plain text format.</para>
660 <para> <literal>clear</literal></para>
663 <para> Clears the kernel debug buffer.</para>
668 <para> <literal>mark <replaceable>text</replaceable></literal></para>
671 <para> Inserts marker text in the kernel debug buffer.</para>
676 <para> <literal>filter <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
679 <para> Filters kernel debug messages by subsystem or mask.</para>
684 <para> <literal>show <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
687 <para> Shows specific types of messages.</para>
692 <para> <literal>debug_list <replaceable>subsystems|types</replaceable></literal></para>
695 <para> Lists all subsystem and debug types.</para>
700 <para> <literal>modules <replaceable>path</replaceable></literal></para>
703 <para> Provides GDB-friendly module information.</para>
711 <title>Options</title>
712 <para>Use the following options to invoke lctl.</para>
713 <informaltable frame="all">
715 <colspec colname="c1" colwidth="50*"/>
716 <colspec colname="c2" colwidth="50*"/>
720 <para><emphasis role="bold">Option</emphasis></para>
723 <para><emphasis role="bold">Description</emphasis></para>
730 <para> <literal>--device</literal></para>
733 <para> Device to be used for the operation (specified by name or number). See device_list.</para>
738 <para> <literal>--ignore_errors | ignore_errors</literal></para>
741 <para> Ignores errors during script processing.</para>
749 <title>Examples</title>
750 <para><literal>lctl</literal></para>
753 0 UP mgc MGC192.168.0.20@tcp btbb24e3-7deb-2ffa-eab0-44dffe00f692 5
754 1 UP ost OSS OSS_uuid 3
755 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
756 lctl > dk /tmp/log Debug log: 87 lines, 87 kept, 0 dropped.
757 lctl > quit</screen>
760 <title>See Also</title>
763 <para> <xref linkend="dbdoclet.50438219_75432"/> </para>
766 <para> <xref linkend="dbdoclet.50438219_12635"/> </para>
769 <para> <xref linkend="dbdoclet.50438219_38274"/> </para>
772 <para> <xref linkend="dbdoclet.50438206_94597"/> </para>
777 <section xml:id="dbdoclet.50438219_58217">
778 <title><indexterm><primary>ll_decode_filter_fid</primary></indexterm>
779 ll_decode_filter_fid</title>
780 <para>The ll_decode_filter_fid utility displays the Lustre object ID and MDT parent FID.</para>
782 <title>Synopsis</title>
783 <screen>ll_decode_filter_fid object_file [object_file ...]</screen>
786 <title>Description</title>
787 <para>The ll_decode_filter_fid utility decodes and prints the Lustre OST object ID, MDT FID,
788 stripe index for the specified OST object(s), which is stored in the "trusted.fid"
789 attribute on each OST object. This is accessible to <literal>ll_decode_filter_fid</literal>
790 when the OST file system is mounted locally as type ldiskfs for maintenance.</para>
791 <para>The "trusted.fid" 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>
792 <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>
795 <title>Examples</title>
796 <screen>root@oss1# cd /mnt/ost/lost+found
797 root@oss1# ll_decode_filter_fid #12345[4,5,8]
798 #123454: objid=690670 seq=0 parent=[0x751c5:0xfce6e605:0x0]
799 #123455: objid=614725 seq=0 parent=[0x18d11:0xebba84eb:0x1]
800 #123458: objid=533088 seq=0 parent=[0x21417:0x19734d61:0x0]</screen>
801 <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>
802 <para>The MDT parent inode FIDs are hexadecimal numbers of the form sequence:oid:idx. Since the sequence number is below 0x100000000 in all these cases, the FIDs are in the legacy Inode and Generation In FID (IGIF) namespace and are mapped directly to the MDT inode = seq and generation = oid values; the MDT inodes are 0x751c5, 0x18d11, and 0x21417 respectively. For objects with MDT parent sequence numbers above 0x200000000, this indicates that the FID needs to be mapped via the MDT Object Index (OI) file on the MDT to determine the internal inode number.</para>
803 <para>The idx field shows the stripe number of this OST object in the Lustre RAID-0 striped file.</para>
806 <title>See Also</title>
807 <para><xref linkend="dbdoclet.50438219_44971"/></para>
810 <section xml:id="dbdoclet.50438219_44971">
811 <title><indexterm><primary>ll_recover_lost_found_objs</primary></indexterm>
812 ll_recover_lost_found_objs</title>
813 <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>
815 <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>
818 <title>Synopsis</title>
819 <screen>$ ll_recover_lost_found_objs [-hv] -d directory</screen>
822 <title>Description</title>
823 <para>The first time Lustre modifies an object, it saves the MDS inode number and the objid as an extended attribute on the object, so in case of directory corruption of the OST, it is possible to recover the objects. Running e2fsck fixes the corrupted OST directory, but it puts all of the objects into a lost and found directory, where they are inaccessible to Lustre. Use the ll_recover_lost_found_objs utility to recover all (or at least most) objects from a lost and found directory and return them to the O/0/d* directories.</para>
824 <para>To use ll_recover_lost_found_objs, mount the file system locally (using the <literal>-t ldiskfs</literal>, or <literal>-t zfs</literal> command), run the utility and then unmount it again. The OST must not be mounted by Lustre when ll_recover_lost_found_objs is run.</para>
825 <para condition="l26">This utility is not needed for 2.6 and later,
826 since the <literal>LFSCK</literal> online scanning will move objects
827 from <literal>lost+found</literal> to the proper place in the OST.</para>
830 <title>Options</title>
831 <informaltable frame="all">
833 <colspec colname="c1" colwidth="50*"/>
834 <colspec colname="c2" colwidth="50*"/>
838 <para><emphasis role="bold">Option</emphasis></para>
841 <para><emphasis role="bold">Description</emphasis></para>
848 <para> <literal>-h</literal></para>
851 <para> Prints a help message</para>
856 <para> <literal>-v</literal></para>
859 <para> Increases verbosity</para>
864 <para> <literal>-d <replaceable>directory</replaceable></literal></para>
867 <para> Sets the lost and found directory path</para>
875 <title>Example</title>
876 <screen>ll_recover_lost_found_objs -d /mnt/ost/lost+found </screen>
879 <section xml:id="dbdoclet.50438219_84890">
880 <title><indexterm><primary>llodbstat</primary></indexterm>
882 <para>The llobdstat utility displays OST statistics.</para>
884 <title>Synopsis</title>
885 <screen>llobdstat ost_name [interval]</screen>
888 <title>Description</title>
889 <para>The llobdstat utility displays a line of OST statistics for the given ost_name every interval seconds. It should be run directly on an OSS node. Type <literal>CTRL-C</literal> to stop statistics printing.</para>
892 <title>Example</title>
893 <screen># llobdstat liane-OST0002 1
894 /usr/bin/llobdstat on /proc/fs/lustre/obdfilter/liane-OST0002/stats
895 Processor counters run at 2800.189 MHz
896 Read: 1.21431e+07, Write: 9.93363e+08, create/destroy: 24/1499, stat: 34, p\
898 [NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]
899 Timestamp Read-delta ReadRate Write-delta WriteRate
900 --------------------------------------------------------
901 1217026053 0.00MB 0.00MB/s 0.00MB 0.00MB/s
902 1217026054 0.00MB 0.00MB/s 0.00MB 0.00MB/s
903 1217026055 0.00MB 0.00MB/s 0.00MB 0.00MB/s
904 1217026056 0.00MB 0.00MB/s 0.00MB 0.00MB/s
905 1217026057 0.00MB 0.00MB/s 0.00MB 0.00MB/s
906 1217026058 0.00MB 0.00MB/s 0.00MB 0.00MB/s
907 1217026059 0.00MB 0.00MB/s 0.00MB 0.00MB/s st:1</screen>
911 <screen>/proc/fs/lustre/obdfilter/<replaceable>ostname</replaceable>/stats</screen>
914 <section xml:id="dbdoclet.50438219_90386">
915 <title><indexterm><primary>llog_reader</primary></indexterm>
917 <para>The llog_reader utility translates a Lustre configuration log into human-readable form.</para>
919 <title>Synopsis</title>
920 <screen>llog_reader filename</screen>
923 <title>Description</title>
924 <para>The llog_reader utility parses the binary format of Lustre's on-disk configuration logs. Llog_reader can only read logs; use tunefs.lustre to write to them.</para>
925 <para>To examine a log file on a stopped Lustre server, mount its backing file system as ldiskfs or zfs, then use llog_reader to dump the log file's contents, for example:</para>
926 <screen>mount -t ldiskfs /dev/sda /mnt/mgs
927 llog_reader /mnt/mgs/CONFIGS/tfs-client</screen>
928 <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>
929 <screen>debugfs -c -R 'dump CONFIGS/tfs-client /tmp/tfs-client' /dev/sda
930 llog_reader /tmp/tfs-client</screen>
932 <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>
936 <title>See Also</title>
937 <para><xref linkend="dbdoclet.50438219_39574"/></para>
940 <section xml:id="dbdoclet.50438219_23232">
941 <title><indexterm><primary>llstat</primary></indexterm>
943 <para>The llstat utility displays Lustre statistics.</para>
945 <title>Synopsis</title>
946 <screen>llstat [-c] [-g] [-i <replaceable>interval</replaceable>] <replaceable>stats_file
947 </replaceable></screen>
950 <title>Description</title>
951 <para>The llstat utility displays statistics from any of the Lustre statistics files that share a common format and are updated at <literal>interval</literal> seconds. To stop statistics printing, use <literal>ctrl</literal>-<literal>c.</literal></para>
954 <title>Options</title>
955 <informaltable frame="all">
957 <colspec colname="c1" colwidth="50*"/>
958 <colspec colname="c2" colwidth="50*"/>
962 <para><emphasis role="bold">Option</emphasis></para>
965 <para><emphasis role="bold">Description</emphasis></para>
972 <para> <literal>-c</literal></para>
975 <para> Clears the statistics file.</para>
980 <para> <literal>-i</literal></para>
983 <para> Specifies the polling period (in seconds).</para>
988 <para> <literal>-g</literal></para>
991 <para> Specifies graphable output format.</para>
996 <para> <literal>-h</literal></para>
999 <para> Displays help information.</para>
1004 <para> <literal>stats_file</literal></para>
1007 <para> Specifies either the full path to a statistics file or the shorthand reference, <literal>mds</literal> or <literal>ost</literal></para>
1014 <section remap="h5">
1015 <title>Example</title>
1016 <para>To monitor /proc/fs/lustre/ost/OSS/ost/stats at 1 second intervals, run;</para>
1017 <screen>llstat -i 1 ost</screen>
1019 <section remap="h5">
1020 <title>Files</title>
1021 <para>The llstat files are located at:</para>
1022 <screen>/proc/fs/lustre/mdt/MDS/*/stats
1023 /proc/fs/lustre/mds/*/exports/*/stats
1024 /proc/fs/lustre/mdc/*/stats
1025 /proc/fs/lustre/ldlm/services/*/stats
1026 /proc/fs/lustre/ldlm/namespaces/*/pool/stats
1027 /proc/fs/lustre/mgs/MGS/exports/*/stats
1028 /proc/fs/lustre/ost/OSS/*/stats
1029 /proc/fs/lustre/osc/*/stats
1030 /proc/fs/lustre/obdfilter/*/exports/*/stats
1031 /proc/fs/lustre/obdfilter/*/stats
1032 /proc/fs/lustre/llite/*/stats
1036 <section xml:id="dbdoclet.50438219_23648">
1037 <title><indexterm><primary>llverdev</primary></indexterm>
1039 <para>The llverdev verifies a block device is functioning properly over its full size.</para>
1040 <section remap="h5">
1041 <title>Synopsis</title>
1042 <screen>llverdev [-c <replaceable>chunksize</replaceable>] [-f] [-h] [-o <replaceable>offset</replaceable>] [-l] [-p] [-r] [-t <replaceable>timestamp</replaceable>] [-v] [-w] <replaceable>device</replaceable></screen>
1044 <section remap="h5">
1045 <title>Description</title>
1046 <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>
1047 <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>
1048 <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>
1049 <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>
1051 <section remap="h5">
1052 <title>Options</title>
1053 <informaltable frame="all">
1055 <colspec colname="c1" colwidth="33*"/>
1056 <colspec colname="c2" colwidth="33*"/>
1057 <colspec colname="c3" colwidth="33*"/>
1061 <para><emphasis role="bold">Option</emphasis></para>
1064 <para><emphasis role="bold"> </emphasis></para>
1067 <para><emphasis role="bold">Description</emphasis></para>
1073 <entry nameend="c2" namest="c1">
1074 <para> <literal>-c|--chunksize</literal></para>
1077 <para> I/O chunk size in bytes (default value is 1048576).</para>
1081 <entry nameend="c2" namest="c1">
1082 <para> <literal>>-f|--force</literal>></para>
1085 <para> Forces the test to run without a confirmation that the device will be overwritten and all data will be permanently destroyed.</para>
1089 <entry nameend="c2" namest="c1">
1090 <para> <literal>-h|--help</literal></para>
1093 <para> Displays a brief help message.</para>
1097 <entry nameend="c2" namest="c1">
1098 <para> <literal>-o <replaceable>>offset</replaceable></literal></para>
1101 <para> Offset (in kilobytes) of the start of the test (default value is 0).</para>
1105 <entry nameend="c2" namest="c1">
1106 <para> <literal>-l|--long</literal></para>
1109 <para> Runs a full check, writing and then reading and verifying every block on the disk.</para>
1113 <entry nameend="c2" namest="c1">
1114 <para> <literal>-p|--partial</literal></para>
1117 <para> Runs a partial check, only doing periodic checks across the device (1 GB steps).</para>
1121 <entry nameend="c2" namest="c1">
1122 <para> <literal>-r|--read</literal></para>
1125 <para> Runs the test in read (verify) mode only, after having previously run the test in <literal>-w</literal> mode.</para>
1129 <entry nameend="c2" namest="c1">
1130 <para> <literal>-t <replaceable>timestamp</replaceable></literal></para>
1133 <para> Sets the test start time as printed at the start of a previously-interrupted
1134 test to ensure that validation data is the same across the entire file system
1135 (default value is the current time()).</para>
1139 <entry nameend="c2" namest="c1">
1140 <para> <literal>-v|--verbose</literal></para>
1143 <para> Runs the test in verbose mode, listing each read and write operation.</para>
1147 <entry nameend="c2" namest="c1">
1148 <para> <literal>-w|--write</literal></para>
1151 <para> Runs the test in write (test-pattern) mode (default runs both read and write).</para>
1158 <section remap="h5">
1159 <title>Examples</title>
1160 <para>Runs a partial device verification on /dev/sda:</para>
1161 <screen>llverdev -v -p /dev/sda
1162 llverdev: permanently overwrite all data on /dev/sda (yes/no)? y
1163 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1164 Timestamp: 1009839028
1165 Current write offset: 4096 kB</screen>
1166 <para>Continues an interrupted verification at offset 4096kB from the start of the device, using the same timestamp as the previous run:</para>
1167 <screen>llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda
1168 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1169 Timestamp: 1009839028
1171 read complete </screen>
1174 <section xml:id="dbdoclet.50438219_64286">
1175 <title><indexterm><primary>lshowmount</primary></indexterm>
1177 <para>The lshowmount utility shows Lustre exports.</para>
1178 <section remap="h5">
1179 <title>Synopsis</title>
1180 <screen>lshowmount [-ehlv]</screen>
1182 <section remap="h5">
1183 <title>Description</title>
1184 <para>The lshowmount utility shows the hosts that have Lustre mounted to a server. This utility looks for exports from the MGS, MDS, and obdfilter.</para>
1186 <section remap="h5">
1187 <title>Options</title>
1188 <informaltable frame="all">
1190 <colspec colname="c1" colwidth="50*"/>
1191 <colspec colname="c2" colwidth="50*"/>
1195 <para><emphasis role="bold">Option</emphasis></para>
1198 <para><emphasis role="bold">Description</emphasis></para>
1205 <para> <literal>-e|--enumerate</literal></para>
1208 <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>
1213 <para> <literal>-h|--help</literal></para>
1216 <para> Causes lshowmount to print out a usage message.</para>
1221 <para> <literal>-l|--lookup</literal></para>
1224 <para> Causes lshowmount to try to look up the hostname for NIDs that look like IP addresses.</para>
1229 <para> <literal>-v|--verbose</literal></para>
1232 <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>
1239 <section remap="h5">
1240 <title>Files</title>
1241 <screen>/proc/fs/lustre/mgs/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1242 /proc/fs/lustre/mds/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1243 /proc/fs/lustre/obdfilter/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid</screen>
1246 <section xml:id="dbdoclet.50438219_90218">
1247 <title><indexterm><primary>lst</primary></indexterm>
1249 <para>The lst utility starts LNET self-test.</para>
1250 <section remap="h5">
1251 <title>Synopsis</title>
1252 <screen>lst</screen>
1254 <section remap="h5">
1255 <title>Description</title>
1256 <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>
1257 <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>
1258 <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>
1259 <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>
1261 <section remap="h5">
1262 <title>Modules</title>
1263 <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>
1264 <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>
1265 <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>
1267 <section remap="h5">
1268 <title>Utilities</title>
1269 <para>LNET self-test includes two user utilities, lst and lstclient.</para>
1270 <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>
1271 <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>
1272 <screen>lstclient -sesid CONSOLE_NID group NAME</screen>
1274 <section remap="h5">
1275 <title>Example Script</title>
1276 <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>
1278 export LST_SESSION=$$
1279 lst new_session read/write
1280 lst add_group servers 192.168.10.[8,10,12-16]@tcp
1281 lst add_group readers 192.168.1.[1-253/2]@o2ib
1282 lst add_group writers 192.168.1.[2-254/2]@o2ib
1283 lst add_batch bulk_rw
1284 lst add_test --batch bulk_rw --from readers --to servers brw read check\
1286 lst add_test --batch bulk_rw --from writers --to servers brw write chec\
1290 # display server stats for 30 seconds
1291 lst stat servers & sleep 30; kill $!
1293 lst end_session </screen>
1296 <section xml:id="dbdoclet.50438219_54734">
1297 <title><indexterm><primary>lustre_rmmod.sh</primary></indexterm>
1298 lustre_rmmod.sh</title>
1299 <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>
1301 <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>
1304 <section xml:id="dbdoclet.50438219_63667">
1305 <title><indexterm><primary>lustre_rsync</primary></indexterm>
1306 lustre_rsync</title>
1307 <para>The lustre_rsync utility synchronizes (replicates) a Lustre file system to a target file system.</para>
1308 <section remap="h5">
1309 <title>Synopsis</title>
1310 <screen>lustre_rsync --source|-s <replaceable>src</replaceable> --target|-t <replaceable>tgt</replaceable>
1311 --mdt|-m <replaceable>mdt</replaceable> [--user|-u <replaceable>userid</replaceable>]
1312 [--xattr|-x <replaceable>yes|no</replaceable>] [--verbose|-v]
1313 [--statuslog|-l <replaceable>log</replaceable>] [--dry-run] [--abort-on-err]
1315 lustre_rsync --statuslog|-l <replaceable>log</replaceable>
1317 lustre_rsync --statuslog|-l <replaceable>log</replaceable> --source|-s <replaceable>source</replaceable>
1318 --target|-t <replaceable>tgt</replaceable> --mdt|-m <replaceable>mdt</replaceable></screen>
1320 <section remap="h5">
1321 <title>Description</title>
1322 <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>
1323 <para>Before using lustre_rsync:</para>
1326 <para>A changelog user must be registered (see lctl (8) changelog_register)</para>
1329 <para>- AND -</para>
1332 <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>
1336 <section remap="h5">
1337 <title>Options</title>
1338 <informaltable frame="all">
1340 <colspec colname="c1" colwidth="50*"/>
1341 <colspec colname="c2" colwidth="50*"/>
1345 <para><emphasis role="bold">Option</emphasis></para>
1348 <para><emphasis role="bold">Description</emphasis></para>
1355 <para> <literal>--source=<replaceable>src</replaceable></literal></para>
1358 <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>
1363 <para> <literal>--target=<replaceable>tgt</replaceable></literal></para>
1366 <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>
1371 <para> <literal>--mdt=<replaceable>mdt</replaceable></literal></para>
1374 <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>
1379 <para> <literal>--user=<replaceable>userid</replaceable></literal></para>
1382 <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>
1387 <para> <literal>--statuslog=<replaceable>log</replaceable></literal></para>
1390 <para> A log file to which synchronization status is saved. When lustre_rsync starts, the state of a previous replication is read from here. If the status log from a previous synchronization operation is specified, otherwise mandatory options like --source, --target and --mdt options may be skipped. By specifying options like --source, --target and/or --mdt in addition to the --statuslog option, parameters in the status log can be overridden. Command line options take precedence over options in the status log.</para>
1395 <para> <literal>--xattr<replaceable>yes|no</replaceable></literal></para>
1398 <para> Specifies whether extended attributes (xattrs) are synchronized or not. The default is to synchronize extended attributes.</para>
1399 <para>NOTE: Disabling xattrs causes Lustre striping information not to be synchronized.</para>
1404 <para> <literal>--verbose</literal></para>
1407 <para> Produces a verbose output.</para>
1412 <para> <literal>--dry-run</literal></para>
1415 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1420 <para> <literal>--abort-on-err</literal></para>
1423 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1430 <section remap="h5">
1431 <title>Examples</title>
1432 <para>Register a changelog user for an MDT (e.g., MDT lustre-MDT0000).</para>
1434 $ MDS lctl changelog_register \
1435 --device lustre-MDT0000 -n
1437 <para>Synchronize/replicate a Lustre file system (/mnt/lustre) to a target file system (/mnt/target).</para>
1438 <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \
1439 --mdt=lustre-MDT0000 --user=cl1 \
1440 --statuslog replicate.log --verbose
1441 Lustre filesystem: lustre
1442 MDT device: lustre-MDT0000
1446 Changelog registration: cl1
1447 Starting changelog record: 0
1449 lustre_rsync took 1 seconds
1450 Changelog records consumed: 22
1452 <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>
1453 <screen>$ lustre_rsync --statuslog replicate.log --verbose
1454 Replicating Lustre filesystem: lustre
1455 MDT device: lustre-MDT0000
1458 Statuslog: replicate.log
1459 Changelog registration: cl1
1460 Starting changelog record: 22
1462 lustre_rsync took 2 seconds
1463 Changelog records consumed: 42</screen>
1464 <para>Synchronize a Lustre file system (/mnt/lustre) to two target file systems (/mnt/target1 and /mnt/target2).</para>
1465 <screen>$ lustre_rsync --source=/mnt/lustre \
1466 --target=/mnt/target1 --target=/mnt/target2 \
1467 --mdt=lustre-MDT0000 --user=cl1
1468 --statuslog replicate.log</screen>
1470 <section remap="h5">
1471 <title>See Also</title>
1472 <para><xref linkend="dbdoclet.50438206_94597"/></para>
1475 <section xml:id="dbdoclet.50438219_75432">
1476 <title><indexterm><primary>mkfs.lustre</primary></indexterm>
1478 <para>The <literal>mkfs.lustre</literal> utility formats a disk for a Lustre service.</para>
1479 <section remap="h5">
1480 <title>Synopsis</title>
1481 <screen>mkfs.lustre <replaceable>target_type</replaceable> [options] <replaceable>device</replaceable></screen>
1482 <para>where <replaceable>target_type</replaceable> is one of the following:</para>
1483 <informaltable frame="all">
1485 <colspec colname="c1" colwidth="50*"/>
1486 <colspec colname="c2" colwidth="50*"/>
1490 <para><emphasis role="bold">Option</emphasis></para>
1493 <para><emphasis role="bold">Description</emphasis></para>
1500 <para> <literal>--ost</literal></para>
1503 <para> Object storage target (OST)</para>
1508 <para> <literal>--mdt</literal></para>
1511 <para> Metadata storage target (MDT)</para>
1516 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1519 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1524 <para> <literal>--mgs</literal></para>
1527 <para> Configuration management service (MGS), one per site. This service can be
1528 combined with one <literal>--mdt</literal> service by specifying both
1536 <section remap="h5">
1537 <title>Description</title>
1538 <para><literal>mkfs.lustre</literal> is used to format a disk device for use as part of a
1539 Lustre file system. After formatting, a disk can be mounted to start the Lustre service
1540 defined by this command.</para>
1541 <para>When the file system is created, parameters can simply be added as a
1542 <literal>--param</literal> option to the <literal>mkfs.lustre</literal> command. See <xref
1543 linkend="dbdoclet.50438194_17237"/>.</para>
1544 <informaltable frame="all">
1546 <colspec colname="c1" colwidth="1*"/>
1547 <colspec colname="c2" colwidth="1*"/>
1548 <colspec colname="c3" colwidth="3*"/>
1551 <entry nameend="c2" namest="c1">
1552 <para><emphasis role="bold">Option</emphasis></para>
1555 <para><emphasis role="bold">Description</emphasis></para>
1561 <entry nameend="c2" namest="c1">
1562 <para> <literal>--backfstype=<replaceable>fstype</replaceable></literal></para>
1565 <para> Forces a particular format for the backing file system such as ldiskfs (the default) or zfs.</para>
1569 <entry nameend="c2" namest="c1">
1570 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
1573 <para> Sets a user comment about this disk, ignored by the Lustre software.</para>
1577 <entry nameend="c2" namest="c1">
1578 <para> <literal>--device-size=<replaceable>#</replaceable>>KB</literal></para>
1581 <para>Sets the device size for loop devices.</para>
1585 <entry nameend="c2" namest="c1">
1586 <para> <literal>--dryrun</literal></para>
1589 <para>Only prints what would be done; it does not affect the disk.</para>
1593 <entry nameend="c2" namest="c1"
1594 ><literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
1595 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
1596 service nodes. The <literal>--servicenode</literal> option cannot be used with
1597 <literal>--failnode</literal> option. See <xref
1598 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
1599 more details.</entry>
1602 <entry nameend="c2" namest="c1">
1603 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
1606 <para>Sets the NID(s) of a failover service node for a primary server for a target.
1607 The <literal>--failnode</literal> option cannot be used with
1608 <literal>--servicenode</literal> option. See <xref
1609 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
1610 for more details.<note>
1611 <para>When the <literal>--failnode</literal> option is used, certain
1612 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
1613 linkend="dbdoclet.50438188_92688"/>).</para>
1618 <entry nameend="c2" namest="c1">
1619 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
1622 <para> The Lustre file system of which this service/node will be a part. The default
1623 file system name is <literal>lustre</literal>.</para>
1626 <para>The file system name is limited to 8 characters.</para>
1631 <entry nameend="c2" namest="c1">
1633 <literal>--index=<replaceable>index_number</replaceable></literal></para>
1636 <para>Specifies the OST or MDT number (0...N). This allows mapping between the OSS
1637 and MDS node and the device on which the OST or MDT is located.</para>
1641 <entry nameend="c2" namest="c1">
1642 <para> <literal>--mkfsoptions=<replaceable>opts</replaceable></literal></para>
1645 <para> Formats options for the backing file system. For example, ext3 options could be set here.</para>
1649 <entry nameend="c2" namest="c1">
1650 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
1653 <para> Sets the mount options used when the backing file system is mounted.</para>
1654 <warning><para>Unlike earlier versions of <literal>mkfs.lustre</literal>, this version completely replaces
1655 the default mount options with those specified on the command line, and issues a
1656 warning on stderr if any default mount options are omitted.</para></warning>
1657 <para>The defaults for ldiskfs are:</para>
1658 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
1659 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
1660 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
1661 <para>Use care when altering the default mount options.</para>
1665 <entry nameend="c2" namest="c1">
1666 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1670 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1674 <entry nameend="c2" namest="c1">
1675 <para> <literal>--mgsnode=<replaceable>nid,...</replaceable></literal></para>
1678 <para> Sets the NIDs of the MGS node, required for all targets other than the MGS.</para>
1682 <entry nameend="c2" namest="c1">
1683 <para> <literal>--param <replaceable>key</replaceable>=<replaceable>value</replaceable></literal></para>
1686 <para> Sets the permanent parameter <replaceable>key</replaceable> to value <replaceable>value</replaceable>. This option can be repeated as necessary. Typical options might include:</para>
1691 <para>  </para>
1694 <para> <literal>--param sys.timeout=40</literal>></para>
1697 <para> System obd timeout.</para>
1702 <para>  </para>
1705 <para> <literal>--param lov.stripesize=2M</literal></para>
1708 <para> Default stripe size.</para>
1713 <para>  </para>
1716 <para> <literal>param lov.stripecount=2</literal></para>
1719 <para> Default stripe count.</para>
1724 <para>  </para>
1727 <para> <literal>--param failover.mode=failout</literal></para>
1730 <para> Returns errors instead of waiting for recovery.</para>
1734 <entry nameend="c2" namest="c1">
1735 <para> <literal>--quiet</literal></para>
1738 <para> Prints less information.</para>
1742 <entry nameend="c2" namest="c1">
1743 <para> <literal>--reformat</literal></para>
1746 <para> Reformats an existing Lustre disk.</para>
1750 <entry nameend="c2" namest="c1">
1751 <para> <literal>--stripe-count-hint=stripes</literal></para>
1754 <para> Used to optimize the MDT's inode size.</para>
1758 <entry nameend="c2" namest="c1">
1759 <para> <literal>--verbose</literal></para>
1762 <para> Prints more information.</para>
1769 <section remap="h5">
1770 <title>Examples</title>
1771 <para>Creates a combined MGS and MDT for file system <literal>testfs</literal> on, e.g., node <literal>cfs21</literal>:</para>
1772 <screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
1773 <para>Creates an OST for file system <literal>testfs</literal> on any node (using the above
1775 <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
1776 <para>Creates a standalone MGS on, e.g., node <literal>cfs22</literal>:</para>
1777 <screen>mkfs.lustre --mgs /dev/sda1</screen>
1778 <para>Creates an MDT for file system <literal>myfs1</literal> on any node (using the above MGS):</para>
1779 <screen>mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2</screen>
1781 <section remap="h5">
1782 <title>See Also</title>
1785 <para><xref linkend="dbdoclet.50438219_75432"/>mkfs.lustre, </para>
1788 <para><xref linkend="dbdoclet.50438219_12635"/>mount.lustre, </para>
1791 <para><xref linkend="dbdoclet.50438206_94597"/>lfs</para>
1796 <section xml:id="dbdoclet.50438219_12635">
1797 <title><indexterm><primary>mount.lustre</primary></indexterm>
1798 mount.lustre</title>
1799 <para>The mount.lustre utility starts a Lustre client or target service.</para>
1800 <section remap="h5">
1801 <title>Synopsis</title>
1802 <screen>mount -t lustre [-o options] directory
1805 <section remap="h5">
1806 <title>Description</title>
1807 <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>
1808 <para>There are two forms for the device option, depending on whether a client or a target service is started:</para>
1809 <informaltable frame="all">
1811 <colspec colname="c1" colwidth="50*"/>
1812 <colspec colname="c2" colwidth="50*"/>
1816 <para><emphasis role="bold">Option</emphasis></para>
1819 <para><emphasis role="bold">Description</emphasis></para>
1826 <para> <literal><replaceable>mgs_nid</replaceable>:/<replaceable>fsname</replaceable></literal></para>
1830 <para> Mounts the Lustre file system named <literal>fsname</literal> on the client
1831 by contacting the Management Service at <literal>mgsspec</literal> on the pathname
1832 given by <literal>directory</literal>. The format for <literal>mgsspec</literal>
1833 is defined below. A mounted client file system appears in fstab(5) and is usable,
1834 like any local file system, and provides a full POSIX standard-compliant
1840 <para> <replaceable>block_device</replaceable></para>
1843 <para> Starts the target service defined by the mkfs.lustre command on the physical disk <replaceable>block_device</replaceable>. A mounted target service file system is only useful for df(1) operations and appears in fstab(5) to show the device is in use.</para>
1850 <section remap="h5">
1851 <title>Options</title>
1852 <informaltable frame="all">
1854 <colspec colname="c1" colwidth="50*"/>
1855 <colspec colname="c2" colwidth="50*"/>
1859 <para><emphasis role="bold">Option</emphasis></para>
1862 <para><emphasis role="bold">Description</emphasis></para>
1869 <para> <literal>mgsspec:=<replaceable>mgsnode</replaceable>[:<replaceable>mgsnode</replaceable>]</literal></para>
1873 <para> The MGS specification may be a colon-separated list of nodes.</para>
1878 <para> <literal>mgsnode:=<replaceable>mgsnid</replaceable>[,<replaceable>mgsnid</replaceable>]</literal></para>
1881 <para> Each node may be specified by a comma-separated list of NIDs.</para>
1887 <para>In addition to the standard mount options, Lustre understands the following client-specific options:</para>
1888 <informaltable frame="all">
1890 <colspec colname="c1" colwidth="50*"/>
1891 <colspec colname="c2" colwidth="50*"/>
1895 <para><emphasis role="bold">Option</emphasis></para>
1898 <para><emphasis role="bold">Description</emphasis></para>
1905 <para> <literal>flock</literal></para>
1908 <para> Enables full flock support, coherent across all client nodes.</para>
1913 <para> <literal>localflock</literal></para>
1916 <para> Enables local flock support, using only client-local flock (faster, for applications that require flock, but do not run on multiple nodes).</para>
1921 <para> <literal>noflock</literal></para>
1924 <para> Disables flock support entirely. Applications calling flock get an error. It is up to the administrator to choose either <literal>localflock</literal> (fastest, low impact, not coherent between nodes) or <literal>flock</literal> (slower, performance impact for use, coherent between nodes).</para>
1929 <para> <literal>user_xattr</literal></para>
1932 <para> Enables get/set of extended attributes by regular users. See the attr(5) manual page.</para>
1937 <para> <literal>nouser_xattr</literal></para>
1940 <para> Disables use of extended attributes by regular users. Root and system processes can still use extended attributes.</para>
1945 <para> <literal>acl</literal></para>
1948 <para> Enables POSIX Access Control List support. See the acl(5) manual page.</para>
1953 <para> <literal>noacl</literal></para>
1956 <para> Disables Access Control List support.</para>
1961 <para> <literal>verbose</literal></para>
1964 <para> Enable mount/umount console messages.</para>
1969 <para> <literal>noverbose</literal></para>
1972 <para> Disable mount/umount console messages.</para>
1977 <para> <literal>user_fid2path</literal></para>
1980 <para condition='l23'>Enable FID to path translation by regular users. Note: This option allows a potential security hole because it allows regular users direct access to a file by its FID, bypassing POSIX path-based permission checks which could otherwise prevent the user from accessing a file in a directory that they do not have access to. Regular permission checks are still performed on the file itself, so the user cannot access a file to which they have no access rights.</para>
1985 <para> <literal>nouser_fid2path</literal></para>
1988 <para condition='l23'> Disable FID to path translation by regular users. Root and processes with CAP_DAC_READ_SEARCH can still perform FID to path translation.</para>
1994 <para>In addition to the standard mount options and backing disk type (e.g. ext3) options, Lustre understands the following server-specific options:</para>
1995 <informaltable frame="all">
1997 <colspec colname="c1" colwidth="50*"/>
1998 <colspec colname="c2" colwidth="50*"/>
2002 <para><emphasis role="bold">Option</emphasis></para>
2005 <para><emphasis role="bold">Description</emphasis></para>
2012 <para> <literal>nosvc</literal></para>
2015 <para> Starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
2020 <para> <literal>nomgs</literal></para>
2023 <para> Starts only the MDT (with a co-located MGS), without starting the MGS.</para>
2028 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
2031 <para> Starts a client or MDT with a colon-separated list of known inactive OSTs.</para>
2036 <para> <literal>abort_recov</literal></para>
2039 <para> Aborts client recovery and starts the target service immediately.</para>
2044 <para> <literal>md_stripe_cache_size</literal></para>
2047 <para> Sets the stripe cache size for server-side disk with a striped RAID configuration.</para>
2052 <para> <literal>recovery_time_soft=<replaceable>timeout</replaceable></literal></para>
2055 <para> Allows <literal>timeout</literal> seconds for clients to reconnect for recovery after a server crash. This timeout is incrementally extended if it is about to expire and the server is still handling new connections from recoverable clients.</para>
2056 <para> The default soft recovery timeout is 3 times the value of the Lustre timeout parameter (see <xref linkend="section_c24_nt5_dl"/>). The default Lustre timeout is 100 seconds, which would make the soft recovery timeout default to 300 seconds (5 minutes). The soft recovery timeout is set at mount time and will not change if the Lustre timeout is changed after mount time.</para>
2061 <para> <literal>recovery_time_hard=<replaceable>timeout</replaceable></literal></para>
2064 <para> The server is allowed to incrementally extend its timeout up to a hard maximum of <literal>timeout</literal> seconds.</para>
2065 <para> The default hard recovery timeout is 9 times the value of the Lustre timeout parameter (see <xref linkend="section_c24_nt5_dl"/>). The default Lustre timeout is 100 seconds, which would make the hard recovery timeout default to 900 seconds (15 minutes). The hard recovery timeout is set at mount time and will not change if the Lustre timeout is changed after mount time.</para>
2070 <para> <literal>noscrub</literal></para>
2073 <para>Typically the MDT will detect restoration from a file-level backup during mount. This mount option prevents the OI Scrub from starting automatically when the MDT is mounted. Manually starting LFSCK after mounting provides finer control over the starting conditions. This mount option also prevents OI scrub from occurring automatically when OI inconsistency is detected (see <xref linkend="dbdoclet.lfsck_auto_scrub"/>)</para>
2080 <section remap="h5">
2081 <title>Examples</title>
2082 <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>
2083 <screen>mount -t lustre cfs21@tcp0:/testfs /mnt/myfilesystem</screen>
2084 <para>Starts the Lustre metadata target service from /dev/sda1 on mount point /mnt/test/mdt.</para>
2085 <screen>mount -t lustre /dev/sda1 /mnt/test/mdt</screen>
2086 <para>Starts the testfs-MDT0000 service (using the disk label), but aborts the recovery process.</para>
2087 <screen>mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt</screen>
2089 <section remap="h5">
2090 <title>See Also</title>
2093 <para> <xref linkend="dbdoclet.50438219_75432"/></para>
2096 <para> <xref linkend="dbdoclet.50438219_39574"/></para>
2099 <para> <xref linkend="dbdoclet.50438219_38274"/></para>
2102 <para> <xref linkend="dbdoclet.50438206_94597"/></para>
2107 <section xml:id="dbdoclet.50438219_82679">
2108 <title><indexterm><primary>plot-llstat</primary></indexterm>
2110 <para>The plot-llstat utility plots Lustre statistics.</para>
2111 <section remap="h5">
2112 <title>Synopsis</title>
2113 <screen>plot-llstat results_filename [parameter_index]
2116 <section remap="h5">
2117 <title>Description</title>
2118 <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>
2119 <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>
2120 <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>
2122 <section remap="h5">
2123 <title>Options</title>
2124 <informaltable frame="all">
2126 <colspec colname="c1" colwidth="50*"/>
2127 <colspec colname="c2" colwidth="50*"/>
2131 <para><emphasis role="bold">Option</emphasis></para>
2134 <para><emphasis role="bold">Description</emphasis></para>
2141 <para> <literal>results_filename</literal></para>
2144 <para> Output generated by plot-llstat</para>
2149 <para> <literal>parameter_index</literal></para>
2153 <para> Value of parameter_index can be:</para>
2154 <para> 1 - count per interval</para>
2155 <para> 2 - count per second (default setting)</para>
2156 <para> 3 - total count</para>
2163 <section remap="h5">
2164 <title>Example</title>
2165 <screen>llstat -i2 -g -c lustre-OST0000 > log
2166 plot-llstat log 3</screen>
2169 <section xml:id="dbdoclet.50438219_51496">
2170 <title><indexterm><primary>routerstat</primary></indexterm>
2172 <para>The routerstat utility prints Lustre router statistics.</para>
2173 <section remap="h5">
2174 <title>Synopsis</title>
2175 <screen>routerstat [<replaceable>interval</replaceable>]</screen>
2177 <section remap="h5">
2178 <title>Description</title>
2179 <para>The routerstat utility displays LNET router statistics. If no <literal><replaceable>interval</replaceable></literal> is specified, then statistics are sampled and printed only one time. Otherwise, statistics are sampled and printed at the specified <literal><replaceable>interval</replaceable></literal> (in seconds).</para>
2181 <section remap="h5">
2182 <title>Output</title>
2183 <para>The routerstat output includes the following fields:</para>
2184 <informaltable frame="all">
2186 <colspec colname="c1" colwidth="50*"/>
2187 <colspec colname="c2" colwidth="50*"/>
2191 <para><emphasis role="bold">Output</emphasis></para>
2194 <para><emphasis role="bold">Description</emphasis></para>
2201 <para> <literal>M</literal></para>
2204 <para> Number of messages currently being processed by LNET (The maximum number of messages ever processed by LNET concurrently)</para>
2209 <para> <literal>E</literal></para>
2212 <para> Number of LNET errors</para>
2217 <para> <literal>S</literal></para>
2220 <para> Total size (length) of messages sent in bytes/ Number of messages sent</para>
2225 <para> <literal>R</literal></para>
2228 <para> Total size (length) of messages received in bytes/ Number of messages received</para>
2233 <para> <literal>F</literal></para>
2236 <para> Total size (length) of messages routed in bytes/ Number of messages routed</para>
2241 <para> <literal>D</literal></para>
2244 <para> Total size (length) of messages dropped in bytes/ Number of messages dropped</para>
2250 <para>When an <literal><replaceable>interval</replaceable></literal> is specified, additional lines of statistics are printed including the following fields:</para>
2251 <informaltable frame="all">
2253 <colspec colname="c1" colwidth="50*"/>
2254 <colspec colname="c2" colwidth="50*"/>
2258 <para><emphasis role="bold">Output</emphasis></para>
2261 <para><emphasis role="bold">Description</emphasis></para>
2268 <para> <literal>M</literal></para>
2271 <para> Number of messages currently being processed by LNET (The maximum number of messages ever processed by LNET concurrently)</para>
2276 <para> <literal>E</literal></para>
2279 <para> Number of LNET errors per second</para>
2284 <para> <literal>S</literal></para>
2287 <para> Rate of data sent in Mbytes per second/ Count of messages sent per second</para>
2292 <para> <literal>R</literal></para>
2295 <para> Rate of data received in Mbytes per second/ Count of messages received per second</para>
2300 <para> <literal>F</literal></para>
2303 <para> Rate of data routed in Mbytes per second/ Count of messages routed per second</para>
2308 <para> <literal>D</literal></para>
2311 <para> Rate of data dropped in Mbytes per second/ Count of messages dropped per second</para>
2318 <section remap="h5">
2319 <title>Example</title>
2320 <screen># routerstat 1
2321 M 0(13) E 0 S 117379184/4250 R 878480/4356 F 0/0 D 0/0
2322 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2323 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2324 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2325 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2326 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2327 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2328 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2329 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2330 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2333 <section remap="h5">
2334 <title>Files</title>
2335 <para>The routerstat utility extracts statistics data from:</para>
2336 <screen>/proc/sys/lnet/stats</screen>
2339 <section xml:id="dbdoclet.50438219_39574">
2340 <title><indexterm><primary>tunefs.lustre</primary></indexterm>
2341 tunefs.lustre</title>
2342 <para>The tunefs.lustre utility modifies configuration information on a Lustre target disk.</para>
2343 <section remap="h5">
2344 <title>Synopsis</title>
2345 <screen>tunefs.lustre [options] <replaceable>/dev/device</replaceable></screen>
2347 <section remap="h5">
2348 <title>Description</title>
2349 <para>tunefs.lustre is used to modify configuration information on a Lustre target disk. This does not reformat the disk or erase the target information, but modifying the configuration information can result in an unusable file system.</para>
2351 <para>Changes made here affect a file system only when the target is mounted the next time.</para>
2353 <para>With tunefs.lustre, parameters are "additive" -- 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>
2354 <screen>$ tunefs.lustre --erase-params --param=<replaceable>new_parameters</replaceable> </screen>
2355 <para>The tunefs.lustre command can be used to set any parameter settable in a /proc/fs/lustre file and that has its own OBD device, so it can be specified as <replaceable>{obd|fsname}.obdtype.proc_file_name=value</replaceable>. For example:</para>
2356 <screen>$ tunefs.lustre --param mdt.identity_upcall=NONE /dev/sda1</screen>
2358 <section remap="h5">
2359 <title>Options</title>
2360 <para>The tunefs.lustre options are listed and explained below.</para>
2361 <informaltable frame="all">
2363 <colspec colname="c1" colwidth="50*"/>
2364 <colspec colname="c2" colwidth="50*"/>
2368 <para><emphasis role="bold">Option</emphasis></para>
2371 <para><emphasis role="bold">Description</emphasis></para>
2378 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
2381 <para> Sets a user comment about this disk, ignored by Lustre.</para>
2386 <para> <literal>--dryrun</literal></para>
2389 <para> Only prints what would be done; does not affect the disk.</para>
2394 <para> <literal>--erase-params</literal></para>
2397 <para> Removes all previous parameter information.</para>
2402 <literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
2403 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
2404 service nodes. The <literal>--servicenode</literal> option cannot be used with
2405 <literal>--failnode</literal> option. See <xref
2406 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
2407 more details.</entry>
2411 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
2414 <para>Sets the NID(s) of a failover service node for a primary server for a target.
2415 The <literal>--failnode</literal> option cannot be used with
2416 <literal>--servicenode</literal> option. See <xref
2417 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
2418 for more details.<note>
2419 <para>When the <literal>--failnode</literal> option is used, certain
2420 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
2421 linkend="dbdoclet.50438188_92688"/>).</para>
2427 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
2430 <para> The Lustre file system of which this service will be a part. The default file
2431 system name is <literal>lustre</literal>.</para>
2436 <para> <literal>--index=<replaceable>index</replaceable></literal></para>
2439 <para> Forces a particular OST or MDT index.</para>
2444 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
2447 <para> Sets the mount options used when the backing file system is mounted.</para>
2448 <warning><para> Unlike earlier versions of tunefs.lustre, this version completely replaces the existing mount options with those specified on the command line, and issues a warning on stderr if any default mount options are omitted.</para></warning>
2449 <para>The defaults for ldiskfs are:</para>
2450 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
2451 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
2452 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
2453 <para>Do not alter the default mount options unless you know what you are doing.</para>
2458 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
2461 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
2466 <para> <literal>--mgs</literal></para>
2469 <para> Adds a configuration management service to this target.</para>
2474 <para> <literal>--msgnode=<replaceable>nid,...</replaceable></literal></para>
2477 <para> Sets the NID(s) of the MGS node; required for all targets other than the MGS.</para>
2482 <para> <literal>--nomgs</literal></para>
2485 <para> Removes a configuration management service to this target.</para>
2490 <para> <literal>--quiet</literal></para>
2493 <para> Prints less information.</para>
2498 <para> <literal>--verbose</literal></para>
2501 <para> Prints more information.</para>
2506 <para> <literal>--writeconf</literal></para>
2509 <para> Erases all configuration logs for the file system to which this MDT belongs,
2510 and regenerates them. This is dangerous operation. All clients must be unmounted
2511 and servers for this file system should be stopped. All targets (OSTs/MDTs) must
2512 then be restarted to regenerate the logs. No clients should be started until all
2513 targets have restarted.</para>
2514 <para>The correct order of operations is:</para>
2517 <para>Unmount all clients on the file system</para>
2520 <para>Unmount the MDT and all OSTs on the file system</para>
2523 <para>Run <literal>tunefs.lustre --writeconf
2524 <replaceable>device</replaceable></literal> on every server</para>
2527 <para>Mount the MDT and OSTs</para>
2530 <para>Mount the clients</para>
2539 <section remap="h5">
2540 <title>Examples</title>
2541 <para>Change the MGS's NID address. (This should be done on each target disk, since they should all contact the same MGS.)</para>
2542 <screen>tunefs.lustre --erase-param --mgsnode=<replaceable>new_nid</replaceable> --writeconf /dev/sda</screen>
2543 <para>Add a failover NID location for this target.</para>
2544 <screen>tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda </screen>
2546 <section remap="h5">
2547 <title>See Also</title>
2550 <para><xref linkend="dbdoclet.50438219_75432"/></para>
2553 <para><xref linkend="dbdoclet.50438219_12635"/></para>
2556 <para><xref linkend="dbdoclet.50438219_38274"/></para>
2559 <para><xref linkend="dbdoclet.50438206_94597"/></para>
2564 <section xml:id="dbdoclet.50438219_99928">
2565 <title><indexterm><primary>utilities</primary><secondary>system config</secondary></indexterm>
2566 Additional System Configuration Utilities</title>
2567 <para>This section describes additional system configuration utilities for Lustre.</para>
2568 <section remap="h3">
2569 <title><indexterm><primary>utilities</primary><secondary>application profiling</secondary></indexterm>
2570 Application Profiling Utilities</title>
2571 <para>The following utilities are located in /usr/bin.</para>
2572 <para><literal>lustre_req_history.sh</literal></para>
2573 <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>
2575 <section remap="h3">
2576 <title>More /proc Statistics for Application Profiling</title>
2577 <para>The following utilities provide additional statistics.</para>
2578 <para><literal>vfs_ops_stats</literal></para>
2579 <para>The client vfs_ops_stats utility tracks Linux VFS operation calls into Lustre for a single PID, PPID, GID or everything.</para>
2580 <screen>/proc/fs/lustre/llite/*/vfs_ops_stats
2581 /proc/fs/lustre/llite/*/vfs_track_[pid|ppid|gid]
2583 <para><literal>extents_stats</literal></para>
2584 <para>The client extents_stats utility shows the size distribution of I/O calls from the client (cumulative and by process).</para>
2585 <screen>/proc/fs/lustre/llite/*/extents_stats, extents_stats_per_process
2587 <para><literal>offset_stats</literal></para>
2588 <para>The client offset_stats utility shows the read/write seek activity of a client by offsets and ranges.</para>
2589 <screen>/proc/fs/lustre/llite/*/offset_stats
2591 <para>Lustre includes per-client and improved MDT statistics:</para>
2594 <para> Per-client statistics tracked on the servers</para>
2597 <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>
2598 <screen>/proc/fs/lustre/mds|obdfilter/*/exports/
2602 <para> Improved MDT statistics</para>
2605 <para>More detailed MDT operations statistics are collected for better profiling.</para>
2606 <screen>/proc/fs/lustre/mds/*/stats
2609 <section remap="h3">
2610 <title><indexterm><primary>utilities</primary><secondary>debugging</secondary></indexterm><indexterm><primary>debug</primary><secondary>utilities</secondary></indexterm>
2612 Testing / Debugging Utilities</title>
2613 <para>Lustre offers the following test and debugging utilities.</para>
2614 <section remap="h5">
2615 <title><indexterm><primary>loadgen</primary></indexterm>
2617 <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>
2618 <para>Loadgen offers the ability to run this test:</para>
2621 <para>Start an arbitrary number of (echo) clients.</para>
2624 <para>Start and connect to an echo server, instead of a real OST.</para>
2627 <para>Create/bulk_write/delete objects on any number of echo clients simultaneously.</para>
2630 <para>Currently, the maximum number of clients is limited by MAX_OBD_DEVICES and the amount of memory available.</para>
2632 <section remap="h5">
2633 <title>Usage</title>
2634 <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>
2635 <para>The obdecho module must be loaded by hand before running loadgen.</para>
2636 <screen># cd lustre/utils/
2637 # insmod ../obdecho/obdecho.ko
2640 This is a test program used to simulate large numbers of clients. The echo \
2641 obds are used, so the obdecho module must be loaded.
2643 Typical usage would be:
2644 loadgen> dev lustre-OST0000 set the target device
2645 loadgen> start 20 start 20 echo clients
2646 loadgen> wr 10 5 have 10 clients do simultaneous brw_write \
2649 Available commands are:
2661 For more help type: help command-name
2663 loadgen> device lustre-OST0000 192.168.0.21@tcp
2664 Added uuid OSS_UUID: 192.168.0.21@tcp
2665 Target OST name is 'lustre-OST0000'
2669 ./loadgen: running thread #1
2670 ./loadgen: running thread #2
2671 ./loadgen: running thread #3
2672 ./loadgen: running thread #4
2674 Estimate 76 clients before we run out of grant space (155872K / 2097152)
2683 wrote 25MB in 1.419s (17.623 MB/s)
2686 <para>The loadgen utility prints periodic status messages; message output can be controlled with the verbose command.</para>
2687 <para>To insure that a file can be written to (a requirement of write cache), OSTs reserve ("grants"), 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 "reserved" 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>
2688 <para>Echo Server</para>
2689 <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>
2690 <screen>loadgen> echosrv
2692 0 UP obdecho echosrv echosrv 3
2695 <para>On another node:</para>
2696 <screen>loadgen> device echosrv cfs21@tcp
2697 Added uuid OSS_UUID: 192.168.0.21@tcp
2698 Target OST name is 'echosrv'
2701 ./loadgen: running thread #1
2703 start a test_brw write test on X clients for Y iterations
2704 usage: write <num_clients> <num_iter> [<delay>]
2709 wrote 1MB in 0.029s (34.023 MB/s)
2711 <para>Scripting</para>
2712 <para>The threads all perform their actions in non-blocking mode; use the wait command to block for the idle state. For example:</para>
2714 ./loadgen << EOF
2715 device lustre-OST0000
2723 <section remap="h5">
2724 <title><indexterm><primary>lr_reader</primary></indexterm>
2726 <para>The lr_reader utility translates a last received (last_rcvd) file into human-readable form.</para>
2727 <para>The following utilities are part of the Lustre I/O kit. For more information, see <xref linkend="benchmarkingtests"/>.</para>
2729 <section remap="h5">
2731 <primary>sgpdd-survey</primary>
2732 </indexterm> sgpdd-survey</title>
2733 <para>The <literal>sgpdd-survey</literal> utility tests 'bare metal' performance,
2734 bypassing as much of the kernel as possible. The <literal>sgpdd-survey</literal> tool does
2735 not require Lustre, but it does require the sgp_dd package.</para>
2737 <para>The <literal>sgpdd-survey</literal> utility erases all data on the device.</para>
2740 <section remap="h5">
2742 <primary>obdfilter-survey</primary>
2743 </indexterm>obdfilter-survey</title>
2744 <para>The <literal>obdfilter-survey</literal> utility is a shell script that tests
2745 performance of isolated OSTS, the network via echo clients, and an end-to-end test.</para>
2747 <section remap="h5">
2748 <title><indexterm><primary>ior-survey</primary></indexterm>ior-survey</title>
2749 <para>The ior-survey utility is a script used to run the IOR benchmark. Lustre includes IOR version 2.8.6.</para>
2751 <section remap="h5">
2753 <primary>ost-survey</primary>
2754 </indexterm>ost-survey</title>
2755 <para>The <literal>ost-survey</literal> utility is an OST performance survey that tests
2756 client-to-disk performance of the individual OSTs in a Lustre file system.</para>
2758 <section remap="h5">
2759 <title><indexterm><primary>stats-collect</primary></indexterm>stats-collect</title>
2760 <para>The stats-collect utility contains scripts used to collect application profiling information from Lustre clients and servers.</para>
2763 <section remap="h3">
2764 <title><indexterm><primary>flock</primary></indexterm>Flock Feature</title>
2765 <para>Lustre now includes the flock feature, which provides file locking support. Flock describes classes of file locks known as 'flocks'. 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>
2766 <para>By default, the flock utility is disabled on Lustre. Two modes are available.</para>
2767 <informaltable frame="none">
2769 <colspec colname="c1" colwidth="50*"/>
2770 <colspec colname="c2" colwidth="50*"/>
2774 <para> <literal>local mode</literal></para>
2777 <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>
2779 <para>This mode does not impact performance and is appropriate for single-node databases.</para>
2785 <para> <literal>consistent mode</literal></para>
2788 <para> In this mode, locks are coherent across all clients.</para>
2789 <para> To enable it, use the -o flock. This is a client-mount option.</para>
2790 <warning><para>This mode affects the performance of the file being flocked and may affect stability, depending on the Lustre version used. Consider using a newer Lustre version which is more stable. If the consistent mode is enabled and no applications are using flock, then it has no effect.</para></warning>
2796 <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>
2797 <section remap="h4">
2798 <title>Example</title>
2799 <screen>$ mount -t lustre -o flock mds@tcp0:/lustre /mnt/client</screen>
2800 <para>You can check it in /etc/mtab. It should look like,</para>
2801 <screen>mds@tcp0:/lustre /mnt/client lustre rw,flock 0 0</screen>