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.whamcloud.com/public/e2fsprogs/latest/">http://downloads.whamcloud.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</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.
605 Changelog entries are saved persistently on the MDT with each
606 filesystem operation, and are only purged beyond all registered
607 user's minimum set point (see
608 <literal>lfs changelog_clear</literal>). This may cause the
609 Changelog to consume a large amount of space, eventually
610 filling the MDT, if a changelog user is registered but never
611 consumes those records.</para>
616 <para>changelog_deregister <replaceable>id</replaceable></para>
619 <para> Unregisters an existing changelog user. If the
620 user's "clear" record number is the minimum for
621 the device, changelog records are purged until the next minimum.
628 <para><emphasis role="bold">Debug</emphasis></para>
629 <informaltable frame="all">
631 <colspec colname="c1" colwidth="50*"/>
632 <colspec colname="c2" colwidth="50*"/>
636 <para><emphasis role="bold">Option</emphasis></para>
639 <para><emphasis role="bold">Description</emphasis></para>
646 <para> <literal>debug_daemon</literal></para>
649 <para> Starts and stops the debug daemon, and controls the output filename and size.</para>
654 <para> <literal>debug_kernel <replaceable>[file]</replaceable> [raw]</literal></para>
657 <para> Dumps the kernel debug buffer to stdout or a file.</para>
662 <para><literal>debug_file <replaceable>input_file</replaceable> <replaceable>[output_file]</replaceable></literal></para>
665 <para> Converts the kernel-dumped debug log from binary to plain text format.</para>
670 <para> <literal>clear</literal></para>
673 <para> Clears the kernel debug buffer.</para>
678 <para> <literal>mark <replaceable>text</replaceable></literal></para>
681 <para> Inserts marker text in the kernel debug buffer.</para>
686 <para> <literal>filter <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
689 <para> Filters kernel debug messages by subsystem or mask.</para>
694 <para> <literal>show <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
697 <para> Shows specific types of messages.</para>
702 <para> <literal>debug_list <replaceable>subsystems|types</replaceable></literal></para>
705 <para> Lists all subsystem and debug types.</para>
710 <para> <literal>modules <replaceable>path</replaceable></literal></para>
713 <para> Provides GDB-friendly module information.</para>
721 <title>Options</title>
722 <para>Use the following options to invoke lctl.</para>
723 <informaltable frame="all">
725 <colspec colname="c1" colwidth="50*"/>
726 <colspec colname="c2" colwidth="50*"/>
730 <para><emphasis role="bold">Option</emphasis></para>
733 <para><emphasis role="bold">Description</emphasis></para>
740 <para> <literal>--device</literal></para>
743 <para> Device to be used for the operation (specified by name or number). See device_list.</para>
748 <para> <literal>--ignore_errors | ignore_errors</literal></para>
751 <para> Ignores errors during script processing.</para>
759 <title>Examples</title>
760 <para><literal>lctl</literal></para>
763 0 UP mgc MGC192.168.0.20@tcp btbb24e3-7deb-2ffa-eab0-44dffe00f692 5
764 1 UP ost OSS OSS_uuid 3
765 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
766 lctl > dk /tmp/log Debug log: 87 lines, 87 kept, 0 dropped.
767 lctl > quit</screen>
770 <title>See Also</title>
773 <para> <xref linkend="dbdoclet.50438219_75432"/> </para>
776 <para> <xref linkend="dbdoclet.50438219_12635"/> </para>
779 <para> <xref linkend="dbdoclet.50438219_38274"/> </para>
782 <para> <xref linkend="dbdoclet.50438206_94597"/> </para>
787 <section xml:id="dbdoclet.50438219_58217">
788 <title><indexterm><primary>ll_decode_filter_fid</primary></indexterm>
789 ll_decode_filter_fid</title>
790 <para>The ll_decode_filter_fid utility displays the Lustre object ID and MDT parent FID.</para>
792 <title>Synopsis</title>
793 <screen>ll_decode_filter_fid object_file [object_file ...]</screen>
796 <title>Description</title>
797 <para>The ll_decode_filter_fid utility decodes and prints the Lustre OST object ID, MDT FID,
798 stripe index for the specified OST object(s), which is stored in the "trusted.fid"
799 attribute on each OST object. This is accessible to <literal>ll_decode_filter_fid</literal>
800 when the OST file system is mounted locally as type ldiskfs for maintenance.</para>
801 <para>The "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>
802 <para>The OST object ID (objid) is useful in case of OST directory corruption, though normally the ll_recover_lost_found_objs(8) utility is able to reconstruct the entire OST object directory hierarchy. The MDS FID can be useful to determine which MDS inode an OST object is (or was) used by. The stripe index can be used in conjunction with other OST objects to reconstruct the layout of a file even if the MDT inode was lost.</para>
805 <title>Examples</title>
806 <screen>root@oss1# cd /mnt/ost/lost+found
807 root@oss1# ll_decode_filter_fid #12345[4,5,8]
808 #123454: objid=690670 seq=0 parent=[0x751c5:0xfce6e605:0x0]
809 #123455: objid=614725 seq=0 parent=[0x18d11:0xebba84eb:0x1]
810 #123458: objid=533088 seq=0 parent=[0x21417:0x19734d61:0x0]</screen>
811 <para>This shows that the three files in lost+found have decimal object IDs - 690670, 614725, and 533088, respectively. The object sequence number (formerly object group) is 0 for all current OST objects.</para>
812 <para>The MDT parent inode FIDs are hexadecimal numbers of the form sequence:oid:idx. Since the sequence number is below 0x100000000 in all these cases, the FIDs are in the legacy Inode and Generation In FID (IGIF) namespace and are mapped directly to the MDT inode = seq and generation = oid values; the MDT inodes are 0x751c5, 0x18d11, and 0x21417 respectively. For objects with MDT parent sequence numbers above 0x200000000, this indicates that the FID needs to be mapped via the MDT Object Index (OI) file on the MDT to determine the internal inode number.</para>
813 <para>The idx field shows the stripe number of this OST object in the Lustre RAID-0 striped file.</para>
816 <title>See Also</title>
817 <para><xref linkend="dbdoclet.50438219_44971"/></para>
820 <section xml:id="dbdoclet.50438219_44971" condition='l28'>
821 <title><indexterm><primary>ll_recover_lost_found_objs</primary></indexterm>
822 ll_recover_lost_found_objs</title>
823 <para>The <literal>ll_recover_lost_found_objs</literal> utility was
824 used to help recover Lustre OST objects (file data) from the
825 <literal>lost+found</literal> directory of an OST and return them to
826 their correct locations based on information stored in the
827 <literal>trusted.fid</literal> extended attribute stored on every
828 OST object containing data.</para>
829 <note condition="l26"><para>This utility is not needed with Lustre 2.6
830 and later, and is removed in Lustre 2.8 since <literal>LFSCK</literal>
831 online scanning will automatically move objects from
832 <literal>lost+found</literal> to the proper place in the OST.</para>
834 <note condition='l25'>
835 <para>The <literal>ll_recover_lost_found_objs</literal> tool is not
836 strictly necessary to bring an OST back online, it just avoids losing
837 access to objects that were moved to the lost+found directory due to
838 directory corruption on the OST.</para>
841 <title>Synopsis</title>
842 <screen>$ ll_recover_lost_found_objs [-hv] -d directory</screen>
845 <title>Description</title>
846 <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>
847 <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>
850 <title>Options</title>
851 <informaltable frame="all">
853 <colspec colname="c1" colwidth="50*"/>
854 <colspec colname="c2" colwidth="50*"/>
858 <para><emphasis role="bold">Option</emphasis></para>
861 <para><emphasis role="bold">Description</emphasis></para>
868 <para> <literal>-h</literal></para>
871 <para> Prints a help message</para>
876 <para> <literal>-v</literal></para>
879 <para> Increases verbosity</para>
884 <para> <literal>-d <replaceable>directory</replaceable></literal></para>
887 <para> Sets the lost and found directory path</para>
895 <title>Example</title>
896 <screen>ll_recover_lost_found_objs -d /mnt/ost/lost+found </screen>
899 <section xml:id="dbdoclet.50438219_84890">
900 <title><indexterm><primary>llodbstat</primary></indexterm>
902 <para>The llobdstat utility displays OST statistics.</para>
904 <title>Synopsis</title>
905 <screen>llobdstat ost_name [interval]</screen>
908 <title>Description</title>
909 <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>
912 <title>Example</title>
913 <screen># llobdstat liane-OST0002 1
914 /usr/bin/llobdstat on /proc/fs/lustre/obdfilter/liane-OST0002/stats
915 Processor counters run at 2800.189 MHz
916 Read: 1.21431e+07, Write: 9.93363e+08, create/destroy: 24/1499, stat: 34, p\
918 [NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]
919 Timestamp Read-delta ReadRate Write-delta WriteRate
920 --------------------------------------------------------
921 1217026053 0.00MB 0.00MB/s 0.00MB 0.00MB/s
922 1217026054 0.00MB 0.00MB/s 0.00MB 0.00MB/s
923 1217026055 0.00MB 0.00MB/s 0.00MB 0.00MB/s
924 1217026056 0.00MB 0.00MB/s 0.00MB 0.00MB/s
925 1217026057 0.00MB 0.00MB/s 0.00MB 0.00MB/s
926 1217026058 0.00MB 0.00MB/s 0.00MB 0.00MB/s
927 1217026059 0.00MB 0.00MB/s 0.00MB 0.00MB/s st:1</screen>
931 <screen>/proc/fs/lustre/obdfilter/<replaceable>ostname</replaceable>/stats</screen>
934 <section xml:id="dbdoclet.50438219_90386">
935 <title><indexterm><primary>llog_reader</primary></indexterm>
937 <para>The llog_reader utility translates a Lustre configuration log into human-readable form.</para>
939 <title>Synopsis</title>
940 <screen>llog_reader filename</screen>
943 <title>Description</title>
944 <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>
945 <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>
946 <screen>mount -t ldiskfs /dev/sda /mnt/mgs
947 llog_reader /mnt/mgs/CONFIGS/tfs-client</screen>
948 <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>
949 <screen>debugfs -c -R 'dump CONFIGS/tfs-client /tmp/tfs-client' /dev/sda
950 llog_reader /tmp/tfs-client</screen>
952 <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>
956 <title>See Also</title>
957 <para><xref linkend="dbdoclet.50438219_39574"/></para>
960 <section xml:id="dbdoclet.50438219_23232">
961 <title><indexterm><primary>llstat</primary></indexterm>
963 <para>The llstat utility displays Lustre statistics.</para>
965 <title>Synopsis</title>
966 <screen>llstat [-c] [-g] [-i <replaceable>interval</replaceable>] <replaceable>stats_file
967 </replaceable></screen>
970 <title>Description</title>
971 <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>
974 <title>Options</title>
975 <informaltable frame="all">
977 <colspec colname="c1" colwidth="50*"/>
978 <colspec colname="c2" colwidth="50*"/>
982 <para><emphasis role="bold">Option</emphasis></para>
985 <para><emphasis role="bold">Description</emphasis></para>
992 <para> <literal>-c</literal></para>
995 <para> Clears the statistics file.</para>
1000 <para> <literal>-i</literal></para>
1003 <para> Specifies the polling period (in seconds).</para>
1008 <para> <literal>-g</literal></para>
1011 <para> Specifies graphable output format.</para>
1016 <para> <literal>-h</literal></para>
1019 <para> Displays help information.</para>
1024 <para> <literal>stats_file</literal></para>
1027 <para> Specifies either the full path to a statistics file or the shorthand reference, <literal>mds</literal> or <literal>ost</literal></para>
1034 <section remap="h5">
1035 <title>Example</title>
1036 <para>To monitor /proc/fs/lustre/ost/OSS/ost/stats at 1 second intervals, run;</para>
1037 <screen>llstat -i 1 ost</screen>
1039 <section remap="h5">
1040 <title>Files</title>
1041 <para>The llstat files are located at:</para>
1042 <screen>/proc/fs/lustre/mdt/MDS/*/stats
1043 /proc/fs/lustre/mdt/*/exports/*/stats
1044 /proc/fs/lustre/mdc/*/stats
1045 /proc/fs/lustre/ldlm/services/*/stats
1046 /proc/fs/lustre/ldlm/namespaces/*/pool/stats
1047 /proc/fs/lustre/mgs/MGS/exports/*/stats
1048 /proc/fs/lustre/ost/OSS/*/stats
1049 /proc/fs/lustre/osc/*/stats
1050 /proc/fs/lustre/obdfilter/*/exports/*/stats
1051 /proc/fs/lustre/obdfilter/*/stats
1052 /proc/fs/lustre/llite/*/stats
1056 <section xml:id="dbdoclet.50438219_23648">
1057 <title><indexterm><primary>llverdev</primary></indexterm>
1059 <para>The llverdev verifies a block device is functioning properly over its full size.</para>
1060 <section remap="h5">
1061 <title>Synopsis</title>
1062 <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>
1064 <section remap="h5">
1065 <title>Description</title>
1066 <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>
1067 <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>
1068 <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>
1069 <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>
1071 <section remap="h5">
1072 <title>Options</title>
1073 <informaltable frame="all">
1075 <colspec colname="c1" colwidth="33*"/>
1076 <colspec colname="c2" colwidth="33*"/>
1077 <colspec colname="c3" colwidth="33*"/>
1081 <para><emphasis role="bold">Option</emphasis></para>
1084 <para><emphasis role="bold"> </emphasis></para>
1087 <para><emphasis role="bold">Description</emphasis></para>
1093 <entry nameend="c2" namest="c1">
1094 <para> <literal>-c|--chunksize</literal></para>
1097 <para> I/O chunk size in bytes (default value is 1048576).</para>
1101 <entry nameend="c2" namest="c1">
1102 <para> <literal>-f|--force</literal></para>
1105 <para> Forces the test to run without a confirmation that the device will be overwritten and all data will be permanently destroyed.</para>
1109 <entry nameend="c2" namest="c1">
1110 <para> <literal>-h|--help</literal></para>
1113 <para> Displays a brief help message.</para>
1117 <entry nameend="c2" namest="c1">
1118 <para> <literal>-o <replaceable>offset</replaceable></literal></para>
1121 <para> Offset (in kilobytes) of the start of the test (default value is 0).</para>
1125 <entry nameend="c2" namest="c1">
1126 <para> <literal>-l|--long</literal></para>
1129 <para> Runs a full check, writing and then reading and verifying every block on the disk.</para>
1133 <entry nameend="c2" namest="c1">
1134 <para> <literal>-p|--partial</literal></para>
1137 <para> Runs a partial check, only doing periodic checks across the device (1 GB steps).</para>
1141 <entry nameend="c2" namest="c1">
1142 <para> <literal>-r|--read</literal></para>
1145 <para> Runs the test in read (verify) mode only, after having previously run the test in <literal>-w</literal> mode.</para>
1149 <entry nameend="c2" namest="c1">
1150 <para> <literal>-t <replaceable>timestamp</replaceable></literal></para>
1153 <para> Sets the test start time as printed at the start of a previously-interrupted
1154 test to ensure that validation data is the same across the entire file system
1155 (default value is the current time()).</para>
1159 <entry nameend="c2" namest="c1">
1160 <para> <literal>-v|--verbose</literal></para>
1163 <para> Runs the test in verbose mode, listing each read and write operation.</para>
1167 <entry nameend="c2" namest="c1">
1168 <para> <literal>-w|--write</literal></para>
1171 <para> Runs the test in write (test-pattern) mode (default runs both read and write).</para>
1178 <section remap="h5">
1179 <title>Examples</title>
1180 <para>Runs a partial device verification on /dev/sda:</para>
1181 <screen>llverdev -v -p /dev/sda
1182 llverdev: permanently overwrite all data on /dev/sda (yes/no)? y
1183 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1184 Timestamp: 1009839028
1185 Current write offset: 4096 kB</screen>
1186 <para>Continues an interrupted verification at offset 4096kB from the start of the device, using the same timestamp as the previous run:</para>
1187 <screen>llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda
1188 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1189 Timestamp: 1009839028
1191 read complete </screen>
1194 <section xml:id="dbdoclet.50438219_64286">
1195 <title><indexterm><primary>lshowmount</primary></indexterm>
1197 <para>The lshowmount utility shows Lustre exports.</para>
1198 <section remap="h5">
1199 <title>Synopsis</title>
1200 <screen>lshowmount [-ehlv]</screen>
1202 <section remap="h5">
1203 <title>Description</title>
1204 <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>
1206 <section remap="h5">
1207 <title>Options</title>
1208 <informaltable frame="all">
1210 <colspec colname="c1" colwidth="50*"/>
1211 <colspec colname="c2" colwidth="50*"/>
1215 <para><emphasis role="bold">Option</emphasis></para>
1218 <para><emphasis role="bold">Description</emphasis></para>
1225 <para> <literal>-e|--enumerate</literal></para>
1228 <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>
1233 <para> <literal>-h|--help</literal></para>
1236 <para> Causes lshowmount to print out a usage message.</para>
1241 <para> <literal>-l|--lookup</literal></para>
1244 <para> Causes lshowmount to try to look up the hostname for NIDs that look like IP addresses.</para>
1249 <para> <literal>-v|--verbose</literal></para>
1252 <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>
1259 <section remap="h5">
1260 <title>Files</title>
1261 <screen>/proc/fs/lustre/mgs/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1262 /proc/fs/lustre/mds/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1263 /proc/fs/lustre/obdfilter/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid</screen>
1266 <section xml:id="dbdoclet.50438219_90218">
1267 <title><indexterm><primary>lst</primary></indexterm>
1269 <para>The lst utility starts LNet self-test.</para>
1270 <section remap="h5">
1271 <title>Synopsis</title>
1272 <screen>lst</screen>
1274 <section remap="h5">
1275 <title>Description</title>
1276 <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>
1277 <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>
1278 <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>
1279 <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>
1281 <section remap="h5">
1282 <title>Modules</title>
1283 <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>
1284 <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>
1285 <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>
1287 <section remap="h5">
1288 <title>Utilities</title>
1289 <para>LNet self-test includes two user utilities, lst and lstclient.</para>
1290 <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>
1291 <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>
1292 <screen>lstclient -sesid CONSOLE_NID group NAME</screen>
1294 <section remap="h5">
1295 <title>Example Script</title>
1296 <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>
1298 export LST_SESSION=$$
1299 lst new_session read/write
1300 lst add_group servers 192.168.10.[8,10,12-16]@tcp
1301 lst add_group readers 192.168.1.[1-253/2]@o2ib
1302 lst add_group writers 192.168.1.[2-254/2]@o2ib
1303 lst add_batch bulk_rw
1304 lst add_test --batch bulk_rw --from readers --to servers brw read check\
1306 lst add_test --batch bulk_rw --from writers --to servers brw write chec\
1310 # display server stats for 30 seconds
1311 lst stat servers & sleep 30; kill $!
1313 lst end_session </screen>
1316 <section xml:id="dbdoclet.50438219_54734">
1317 <title><indexterm><primary>lustre_rmmod.sh</primary></indexterm>
1318 lustre_rmmod.sh</title>
1319 <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>
1321 <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>
1324 <section xml:id="dbdoclet.50438219_63667">
1325 <title><indexterm><primary>lustre_rsync</primary></indexterm>
1326 lustre_rsync</title>
1327 <para>The lustre_rsync utility synchronizes (replicates) a Lustre file system to a target file system.</para>
1328 <section remap="h5">
1329 <title>Synopsis</title>
1330 <screen>lustre_rsync --source|-s <replaceable>src</replaceable> --target|-t <replaceable>tgt</replaceable>
1331 --mdt|-m <replaceable>mdt</replaceable> [--user|-u <replaceable>userid</replaceable>]
1332 [--xattr|-x <replaceable>yes|no</replaceable>] [--verbose|-v]
1333 [--statuslog|-l <replaceable>log</replaceable>] [--dry-run] [--abort-on-err]
1335 lustre_rsync --statuslog|-l <replaceable>log</replaceable>
1337 lustre_rsync --statuslog|-l <replaceable>log</replaceable> --source|-s <replaceable>source</replaceable>
1338 --target|-t <replaceable>tgt</replaceable> --mdt|-m <replaceable>mdt</replaceable></screen>
1340 <section remap="h5">
1341 <title>Description</title>
1342 <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>
1343 <para>Before using lustre_rsync:</para>
1346 <para>A changelog user must be registered (see lctl (8) changelog_register)</para>
1349 <para>- AND -</para>
1352 <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>
1356 <section remap="h5">
1357 <title>Options</title>
1358 <informaltable frame="all">
1360 <colspec colname="c1" colwidth="50*"/>
1361 <colspec colname="c2" colwidth="50*"/>
1365 <para><emphasis role="bold">Option</emphasis></para>
1368 <para><emphasis role="bold">Description</emphasis></para>
1375 <para> <literal>--source=<replaceable>src</replaceable></literal></para>
1378 <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>
1383 <para> <literal>--target=<replaceable>tgt</replaceable></literal></para>
1386 <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>
1391 <para> <literal>--mdt=<replaceable>mdt</replaceable></literal></para>
1394 <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>
1399 <para> <literal>--user=<replaceable>userid</replaceable></literal></para>
1402 <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>
1407 <para> <literal>--statuslog=<replaceable>log</replaceable></literal></para>
1410 <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>
1415 <para> <literal>--xattr<replaceable>yes|no</replaceable></literal></para>
1418 <para> Specifies whether extended attributes (xattrs) are synchronized or not. The default is to synchronize extended attributes.</para>
1419 <para>NOTE: Disabling xattrs causes Lustre striping information not to be synchronized.</para>
1424 <para> <literal>--verbose</literal></para>
1427 <para> Produces a verbose output.</para>
1432 <para> <literal>--dry-run</literal></para>
1435 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1440 <para> <literal>--abort-on-err</literal></para>
1443 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1450 <section remap="h5">
1451 <title>Examples</title>
1452 <para>Register a changelog user for an MDT (e.g., MDT lustre-MDT0000).</para>
1454 $ MDS lctl changelog_register \
1455 --device lustre-MDT0000 -n
1457 <para>Synchronize/replicate a Lustre file system (/mnt/lustre) to a target file system (/mnt/target).</para>
1458 <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \
1459 --mdt=lustre-MDT0000 --user=cl1 \
1460 --statuslog replicate.log --verbose
1461 Lustre filesystem: lustre
1462 MDT device: lustre-MDT0000
1466 Changelog registration: cl1
1467 Starting changelog record: 0
1469 lustre_rsync took 1 seconds
1470 Changelog records consumed: 22
1472 <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>
1473 <screen>$ lustre_rsync --statuslog replicate.log --verbose
1474 Replicating Lustre filesystem: lustre
1475 MDT device: lustre-MDT0000
1478 Statuslog: replicate.log
1479 Changelog registration: cl1
1480 Starting changelog record: 22
1482 lustre_rsync took 2 seconds
1483 Changelog records consumed: 42</screen>
1484 <para>Synchronize a Lustre file system (/mnt/lustre) to two target file systems (/mnt/target1 and /mnt/target2).</para>
1485 <screen>$ lustre_rsync --source=/mnt/lustre \
1486 --target=/mnt/target1 --target=/mnt/target2 \
1487 --mdt=lustre-MDT0000 --user=cl1
1488 --statuslog replicate.log</screen>
1490 <section remap="h5">
1491 <title>See Also</title>
1492 <para><xref linkend="dbdoclet.50438206_94597"/></para>
1495 <section xml:id="dbdoclet.50438219_75432">
1496 <title><indexterm><primary>mkfs.lustre</primary></indexterm>
1498 <para>The <literal>mkfs.lustre</literal> utility formats a disk for a Lustre service.</para>
1499 <section remap="h5">
1500 <title>Synopsis</title>
1501 <screen>mkfs.lustre <replaceable>target_type</replaceable> [options] <replaceable>device</replaceable></screen>
1502 <para>where <replaceable>target_type</replaceable> is one of the following:</para>
1503 <informaltable frame="all">
1505 <colspec colname="c1" colwidth="50*"/>
1506 <colspec colname="c2" colwidth="50*"/>
1510 <para><emphasis role="bold">Option</emphasis></para>
1513 <para><emphasis role="bold">Description</emphasis></para>
1520 <para> <literal>--ost</literal></para>
1523 <para> Object storage target (OST)</para>
1528 <para> <literal>--mdt</literal></para>
1531 <para> Metadata storage target (MDT)</para>
1536 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1539 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1544 <para> <literal>--mgs</literal></para>
1547 <para> Configuration management service (MGS), one per site. This service can be
1548 combined with one <literal>--mdt</literal> service by specifying both
1556 <section remap="h5">
1557 <title>Description</title>
1558 <para><literal>mkfs.lustre</literal> is used to format a disk device for use as part of a
1559 Lustre file system. After formatting, a disk can be mounted to start the Lustre service
1560 defined by this command.</para>
1561 <para>When the file system is created, parameters can simply be added as a
1562 <literal>--param</literal> option to the <literal>mkfs.lustre</literal> command. See <xref
1563 linkend="dbdoclet.50438194_17237"/>.</para>
1564 <informaltable frame="all">
1566 <colspec colname="c1" colwidth="1*"/>
1567 <colspec colname="c2" colwidth="1*"/>
1568 <colspec colname="c3" colwidth="3*"/>
1571 <entry nameend="c2" namest="c1">
1572 <para><emphasis role="bold">Option</emphasis></para>
1575 <para><emphasis role="bold">Description</emphasis></para>
1581 <entry nameend="c2" namest="c1">
1582 <para> <literal>--backfstype=<replaceable>fstype</replaceable></literal></para>
1585 <para> Forces a particular format for the backing file system such as ldiskfs (the default) or zfs.</para>
1589 <entry nameend="c2" namest="c1">
1590 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
1593 <para> Sets a user comment about this disk, ignored by the Lustre software.</para>
1597 <entry nameend="c2" namest="c1">
1598 <para> <literal>--device-size=<replaceable>#</replaceable>>KB</literal></para>
1601 <para>Sets the device size for loop devices.</para>
1605 <entry nameend="c2" namest="c1">
1606 <para> <literal>--dryrun</literal></para>
1609 <para>Only prints what would be done; it does not affect the disk.</para>
1613 <entry nameend="c2" namest="c1"
1614 ><literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
1615 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
1616 service nodes. The <literal>--servicenode</literal> option cannot be used with
1617 <literal>--failnode</literal> option. See <xref
1618 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
1619 more details.</entry>
1622 <entry nameend="c2" namest="c1">
1623 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
1626 <para>Sets the NID(s) of a failover service node for a primary server for a target.
1627 The <literal>--failnode</literal> option cannot be used with
1628 <literal>--servicenode</literal> option. See <xref
1629 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
1630 for more details.<note>
1631 <para>When the <literal>--failnode</literal> option is used, certain
1632 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
1633 linkend="dbdoclet.50438188_92688"/>).</para>
1638 <entry nameend="c2" namest="c1">
1639 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
1642 <para> The Lustre file system of which this service/node will be a part. The default
1643 file system name is <literal>lustre</literal>.</para>
1646 <para>The file system name is limited to 8 characters.</para>
1651 <entry nameend="c2" namest="c1">
1653 <literal>--index=<replaceable>index_number</replaceable></literal></para>
1656 <para>Specifies the OST or MDT number (0...N). This allows mapping between the OSS
1657 and MDS node and the device on which the OST or MDT is located.</para>
1661 <entry nameend="c2" namest="c1">
1662 <para> <literal>--mkfsoptions=<replaceable>opts</replaceable></literal></para>
1665 <para> Formats options for the backing file system. For example, ext3 options could be set here.</para>
1669 <entry nameend="c2" namest="c1">
1670 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
1673 <para> Sets the mount options used when the backing file system is mounted.</para>
1674 <warning><para>Unlike earlier versions of <literal>mkfs.lustre</literal>, this version completely replaces
1675 the default mount options with those specified on the command line, and issues a
1676 warning on stderr if any default mount options are omitted.</para></warning>
1677 <para>The defaults for ldiskfs are:</para>
1678 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
1679 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
1680 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
1681 <para>Use care when altering the default mount options.</para>
1685 <entry nameend="c2" namest="c1">
1686 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1690 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1694 <entry nameend="c2" namest="c1">
1695 <para> <literal>--mgsnode=<replaceable>nid,...</replaceable></literal></para>
1698 <para> Sets the NIDs of the MGS node, required for all targets other than the MGS.</para>
1702 <entry nameend="c2" namest="c1">
1703 <para> <literal>--param <replaceable>key</replaceable>=<replaceable>value</replaceable></literal></para>
1706 <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>
1711 <para>  </para>
1714 <para> <literal>--param sys.timeout=40</literal>></para>
1717 <para> System obd timeout.</para>
1722 <para>  </para>
1725 <para> <literal>--param lov.stripesize=2M</literal></para>
1728 <para> Default stripe size.</para>
1733 <para>  </para>
1736 <para> <literal>param lov.stripecount=2</literal></para>
1739 <para> Default stripe count.</para>
1744 <para>  </para>
1747 <para> <literal>--param failover.mode=failout</literal></para>
1750 <para> Returns errors instead of waiting for recovery.</para>
1754 <entry nameend="c2" namest="c1">
1755 <para> <literal>--quiet</literal></para>
1758 <para> Prints less information.</para>
1762 <entry nameend="c2" namest="c1">
1763 <para> <literal>--reformat</literal></para>
1766 <para> Reformats an existing Lustre disk.</para>
1770 <entry nameend="c2" namest="c1">
1771 <para> <literal>--stripe-count-hint=stripes</literal></para>
1774 <para> Used to optimize the MDT's inode size.</para>
1778 <entry nameend="c2" namest="c1">
1779 <para> <literal>--verbose</literal></para>
1782 <para> Prints more information.</para>
1789 <section remap="h5">
1790 <title>Examples</title>
1791 <para>Creates a combined MGS and MDT for file system <literal>testfs</literal> on, e.g., node <literal>cfs21</literal>:</para>
1792 <screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
1793 <para>Creates an OST for file system <literal>testfs</literal> on any node (using the above
1795 <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
1796 <para>Creates a standalone MGS on, e.g., node <literal>cfs22</literal>:</para>
1797 <screen>mkfs.lustre --mgs /dev/sda1</screen>
1798 <para>Creates an MDT for file system <literal>myfs1</literal> on any node (using the above MGS):</para>
1799 <screen>mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2</screen>
1801 <section remap="h5">
1802 <title>See Also</title>
1805 <para><xref linkend="dbdoclet.50438219_75432"/>mkfs.lustre, </para>
1808 <para><xref linkend="dbdoclet.50438219_12635"/>mount.lustre, </para>
1811 <para><xref linkend="dbdoclet.50438206_94597"/>lfs</para>
1816 <section xml:id="dbdoclet.50438219_12635">
1817 <title><indexterm><primary>mount.lustre</primary></indexterm>
1818 mount.lustre</title>
1819 <para>The mount.lustre utility starts a Lustre client or target service.</para>
1820 <section remap="h5">
1821 <title>Synopsis</title>
1822 <screen>mount -t lustre [-o options] device mountpoint
1825 <section remap="h5">
1826 <title>Description</title>
1827 <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>
1828 <para>There are two forms for the device option, depending on whether a client or a target service is started:</para>
1829 <informaltable frame="all">
1831 <colspec colname="c1" colwidth="50*"/>
1832 <colspec colname="c2" colwidth="50*"/>
1836 <para><emphasis role="bold">Option</emphasis></para>
1839 <para><emphasis role="bold">Description</emphasis></para>
1846 <para> <literal><replaceable>mgsname</replaceable>:/<replaceable>fsname</replaceable><replaceable>[/subdir]</replaceable></literal></para>
1849 <para> Mounts the Lustre file system named
1850 <replaceable>fsname</replaceable> (optionally starting at
1851 subdirectory <replaceable>subdir</replaceable> within the
1852 filesystem, if specified) on the client at the directory
1853 <replaceable>mountpoint</replaceable>, by contacting the Lustre
1854 Management Service at <replaceable>mgsname</replaceable>. The
1855 format for <replaceable>mgsname</replaceable> is defined below. A
1856 client file system can be listed in <literal>fstab(5)</literal>
1857 for automatic mount at boot time, is usable like any local file
1858 system, and provides a full POSIX standard-compliant interface.
1864 <para> <replaceable>block_device</replaceable></para>
1867 <para> Starts the target service defined by the
1868 <literal>mkfs.lustre(8)</literal> command on the physical disk
1869 <replaceable>block_device</replaceable>. The
1870 <replaceable>block_device</replaceable> may be specified using
1871 <literal>-L <replaceable>label</replaceable></literal> to find
1872 the first block device with that label (e.g.
1873 <literal>testfs-MDT0000</literal>), or by UUID using the
1874 <literal>-U <replaceable>uuid</replaceable></literal> option.
1875 Care should be taken if there is a device-level backup of the
1876 target filesystem on the same node, which would have a
1877 duplicate label and UUID if it has not been changed with
1878 <literal>tune2fs(8)</literal> or similar. The mounted target
1879 service filesystem mounted at
1880 <replaceable>mountpoint</replaceable> is only useful for
1881 <literal>df(1)</literal> operations and appears in
1882 <literal>/proc/mounts</literal> to show the device is in use.
1890 <section remap="h5">
1891 <title>Options</title>
1892 <informaltable frame="all">
1894 <colspec colname="c1" colwidth="50*"/>
1895 <colspec colname="c2" colwidth="50*"/>
1899 <para><emphasis role="bold">Option</emphasis></para>
1902 <para><emphasis role="bold">Description</emphasis></para>
1909 <para> <literal>mgsname=<replaceable>mgsnode</replaceable>[:<replaceable>mgsnode</replaceable>]</literal></para>
1912 <para><replaceable>mgsname</replaceable> is a colon-separated
1913 list of <replaceable>mgsnode</replaceable> names where the MGS
1914 service may run. Multiple <replaceable>mgsnode</replaceable>
1915 values can be specified if the MGS service is configured for
1916 HA failover and may be running on any one of the nodes.
1922 <para> <literal>mgsnode=<replaceable>mgsnid</replaceable>[,<replaceable>mgsnid</replaceable>]</literal></para>
1925 <para> Each <replaceable>mgsnode</replaceable> may specify a
1926 comma-separated list of NIDs, if there are different LNet
1927 interfaces for that <literal>mgsnode</literal>.
1933 <para> <literal>mgssec=<replaceable>flavor</replaceable></literal></para>
1936 <para>Specifies the encryption flavor for the initial network
1937 RPC connection to the MGS. Non-security flavors are:
1938 <literal>null</literal>, <literal>plain</literal>, and
1939 <literal>gssnull</literal>, which respectively disable, or
1940 have no encryption or integrity features for testing purposes.
1941 Kerberos flavors are: <literal>krb5n</literal>,
1942 <literal>krb5a</literal>, <literal>krb5i</literal>, and
1943 <literal>krb5p</literal>. Shared-secret key flavors are:
1944 <literal>skn</literal>, <literal>ska</literal>,
1945 <literal>ski</literal>, and <literal>skpi</literal>, see the
1946 <xref linkend="lustressk"/> for more details. The security
1947 flavor for client-to-server connections is specified in the
1948 filesystem configuration that the client fetches from the MGS.
1954 <para> <literal>skpath=<replaceable>file|directory</replaceable></literal></para>
1957 <para condition='l29'>
1958 Path to a file or directory with the keyfile(s) to load for
1959 this mount command. Keys are inserted into the
1960 <literal>KEY_SPEC_SESSION_KEYRING</literal> keyring in the
1961 kernel with a description containing
1962 <literal>lustre:</literal> and a suffix which depends on
1963 whether the context of the mount command is for an MGS,
1970 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
1973 <para>Starts a client or MDT with a colon-separated list of
1974 known inactive OSTs that it will not try to connect to.</para>
1980 <para>In addition to the standard mount(8) options, Lustre understands
1981 the following client-specific options:</para>
1982 <informaltable frame="all">
1984 <colspec colname="c1" colwidth="50*"/>
1985 <colspec colname="c2" colwidth="50*"/>
1989 <para><emphasis role="bold">Option</emphasis></para>
1992 <para><emphasis role="bold">Description</emphasis></para>
1999 <para><literal>always_ping</literal></para>
2002 <para condition='l29'>The client will periodically ping the server when it is
2003 idle, even if the server <literal>ptlrpc</literal> module
2004 is configured with the <literal>suppress_pings</literal>
2005 option. This allows clients to reliably use the filesystem
2006 even if they are not part of an external client health
2007 monitoring mechanism.
2013 <para> <literal>flock</literal></para>
2016 <para>Enables advisory file locking support between
2017 participating applications using the <literal>flock(2)</literal>
2018 system call. This causes file locking to be coherent across all
2019 client nodes also using this mount option. This is useful if
2020 applications need coherent userspace file locking across
2021 multiple client nodes, but also imposes communications overhead
2022 in order to maintain locking consistency between client nodes.
2028 <para> <literal>localflock</literal></para>
2031 <para>Enables client-local <literal>flock(2)</literal> support,
2032 using only client-local advisory file locking. This is faster
2033 than using the global <literal>flock</literal> option, and can
2034 be used for applications that depend on functioning
2035 <literal>flock(2)</literal> but run only on a single node.
2036 It has minimal overhead using only the Linux kernel's locks.
2042 <para> <literal>noflock</literal></para>
2045 <para>Disables <literal>flock(2)</literal> support entirely,
2046 and is the default option. Applications calling
2047 <literal>flock(2)</literal> get an
2048 <literal>ENOSYS</literal> error. It is up to the administrator
2049 to choose either the <literal>localflock</literal> or
2050 <literal>flock</literal> mount option based on their
2051 requirements. It is possible to mount clients with different
2052 options, and only those mounted with <literal>flock</literal>
2053 will be coherent amongst each other.
2059 <para> <literal>lazystatfs</literal></para>
2062 <para>Allows <literal>statfs(2)</literal> (as used by
2063 <literal>df(1)</literal> and <literal>lfs-df(1)</literal>) to
2064 return even if some OST or MDT is unresponsive or has been
2065 temporarily or permanently disabled in the configuration.
2066 This avoids blocking until all of the targets are available.
2067 This is the default behavior since Lustre 2.9.0.
2073 <para> <literal>nolazystatfs</literal></para>
2076 <para>Requires that <literal>statfs(2)</literal> block until all
2077 OSTs and MDTs are available and have returned space usage.
2083 <para> <literal>user_xattr</literal></para>
2086 <para>Enables get/set of extended attributes by regular users
2087 in the <literal>user.*</literal> namespace. See the
2088 <literal>attr(5)</literal> manual page for more details.
2094 <para> <literal>nouser_xattr</literal></para>
2097 <para>Disables use of extended attributes in the
2098 <literal>user.*</literal> namespace by regular users. Root
2099 and system processes can still use extended attributes.</para>
2104 <para> <literal>verbose</literal></para>
2107 <para> Enable extra mount/umount console messages.</para>
2112 <para> <literal>noverbose</literal></para>
2115 <para> Disable mount/umount console messages.</para>
2120 <para> <literal>user_fid2path</literal></para>
2123 <para>Enable FID-to-path translation by regular users.
2125 <note><para>This option allows a potential security hole because
2126 it allows regular users direct access to a file by its Lustre
2127 File ID. This bypasses POSIX path-based permission checks,
2128 and could allow the user to access a file in a directory that
2129 they do not have access to. Regular POSIX file mode and ACL
2130 permission checks are still performed on the file itself, so
2131 users cannot access a file to which they have no permission.
2137 <para> <literal>nouser_fid2path</literal></para>
2140 <para> Disable FID to path translation by
2141 regular users. Root and processes with
2142 <literal>CAP_DAC_READ_SEARCH</literal> can still perform FID
2143 to path translation.
2150 <para>In addition to the standard mount options and backing disk type
2151 (e.g. ldiskfs) options, Lustre understands the following server-specific
2152 mount options:</para>
2153 <informaltable frame="all">
2155 <colspec colname="c1" colwidth="50*"/>
2156 <colspec colname="c2" colwidth="50*"/>
2160 <para><emphasis role="bold">Option</emphasis></para>
2163 <para><emphasis role="bold">Description</emphasis></para>
2170 <para> <literal>nosvc</literal></para>
2173 <para> Starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
2178 <para> <literal>nomgs</literal></para>
2181 <para> Starts only the MDT (with a co-located MGS), without starting the MGS.</para>
2186 <para> <literal>abort_recov</literal></para>
2189 <para> Aborts client recovery on that server and starts the target service immediately.</para>
2194 <para> <literal>max_sectors_kb=<replaceable>KB</replaceable></literal></para>
2197 <para condition='l210'>Sets the block device parameter
2198 <literal>max_sectors_kb</literal> limit for the MDT or OST
2199 target being mounted to specified maximum number of kilobytes.
2200 When <literal>max_sectors_kb</literal> isn't specified as a
2201 mount option, it will automatically be set to the
2202 <literal>max_hw_sectors_kb</literal> (up to a maximum of 16MiB)
2203 for that block device. This default behavior is suited for
2204 most users. When <literal>max_sectors_kb=0</literal> is used,
2205 the current value for this tunable will be kept.
2211 <para> <literal>md_stripe_cache_size</literal></para>
2214 <para> Sets the stripe cache size for server-side disk with a striped RAID configuration.</para>
2219 <para> <literal>recovery_time_soft=<replaceable>timeout</replaceable></literal></para>
2222 <para>Allows <literal>timeout</literal> seconds for clients to
2223 reconnect for recovery after a server crash. This timeout is
2224 incrementally extended if it is about to expire and the server
2225 is still handling new connections from recoverable clients.
2227 <para>The default soft recovery timeout is 3 times the value
2228 of the Lustre timeout parameter (see
2229 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2230 timeout is 100 seconds, which would make the soft recovery
2231 timeout default to 300 seconds (5 minutes). The soft recovery
2232 timeout is set at mount time and will not change if the Lustre
2233 timeout is changed after mount time.
2239 <para> <literal>recovery_time_hard=<replaceable>timeout</replaceable></literal></para>
2242 <para>The server is allowed to incrementally extend its timeout
2243 up to a hard maximum of <replaceable>timeout</replaceable>
2246 <para>The default hard recovery timeout is 9 times the value
2247 of the Lustre timeout parameter (see
2248 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2249 timeout is 100 seconds, which would make the hard recovery
2250 timeout default to 900 seconds (15 minutes). The hard recovery
2251 timeout is set at mount time and will not change if the Lustre
2252 timeout is changed after mount time.
2258 <para> <literal>noscrub</literal></para>
2261 <para>Typically the MDT will detect restoration from a
2262 file-level backup during mount. This mount option prevents
2263 the OI Scrub from starting automatically when the MDT is
2264 mounted. Manually starting LFSCK after mounting provides finer
2265 control over the starting conditions. This mount option also
2266 prevents OI scrub from occurring automatically when OI
2267 inconsistency is detected (see
2268 <xref linkend="dbdoclet.lfsck_auto_scrub"/>).
2276 <section remap="h5">
2277 <title>Examples</title>
2278 <para>Starts a client for the Lustre file system
2279 <replaceable>chipfs</replaceable> at mount point
2280 <replaceable>/mnt/chip</replaceable>. The Management Service is running on
2281 a node reachable from this client via the cfs21@tcp0 NID.</para>
2282 <screen>mount -t lustre cfs21@tcp0:/chipfs /mnt/chip</screen>
2283 <para condition='l29'>Similar to the above example, but mounting a
2284 subdirectory under <replaceable>chipfs</replaceable> as a fileset.
2285 <screen>mount -t lustre cfs21@tcp0:/chipfs/v1_0 /mnt/chipv1_0</screen>
2287 <para>Starts the Lustre metadata target service from /dev/sda1 on mount point /mnt/test/mdt.</para>
2288 <screen>mount -t lustre /dev/sda1 /mnt/test/mdt</screen>
2289 <para>Starts the testfs-MDT0000 service (using the disk label), but aborts the recovery process.</para>
2290 <screen>mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt</screen>
2292 <section remap="h5">
2293 <title>See Also</title>
2296 <para> <xref linkend="dbdoclet.50438219_75432"/></para>
2299 <para> <xref linkend="dbdoclet.50438219_39574"/></para>
2302 <para> <xref linkend="dbdoclet.50438219_38274"/></para>
2305 <para> <xref linkend="dbdoclet.50438206_94597"/></para>
2310 <section xml:id="dbdoclet.50438219_82679">
2311 <title><indexterm><primary>plot-llstat</primary></indexterm>
2313 <para>The plot-llstat utility plots Lustre statistics.</para>
2314 <section remap="h5">
2315 <title>Synopsis</title>
2316 <screen>plot-llstat results_filename [parameter_index]
2319 <section remap="h5">
2320 <title>Description</title>
2321 <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>
2322 <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>
2323 <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>
2325 <section remap="h5">
2326 <title>Options</title>
2327 <informaltable frame="all">
2329 <colspec colname="c1" colwidth="50*"/>
2330 <colspec colname="c2" colwidth="50*"/>
2334 <para><emphasis role="bold">Option</emphasis></para>
2337 <para><emphasis role="bold">Description</emphasis></para>
2344 <para> <literal>results_filename</literal></para>
2347 <para> Output generated by plot-llstat</para>
2352 <para> <literal>parameter_index</literal></para>
2356 <para> Value of parameter_index can be:</para>
2357 <para> 1 - count per interval</para>
2358 <para> 2 - count per second (default setting)</para>
2359 <para> 3 - total count</para>
2366 <section remap="h5">
2367 <title>Example</title>
2368 <screen>llstat -i2 -g -c lustre-OST0000 > log
2369 plot-llstat log 3</screen>
2372 <section xml:id="dbdoclet.50438219_51496">
2373 <title><indexterm><primary>routerstat</primary></indexterm>
2375 <para>The routerstat utility prints Lustre router statistics.</para>
2376 <section remap="h5">
2377 <title>Synopsis</title>
2378 <screen>routerstat [<replaceable>interval</replaceable>]</screen>
2380 <section remap="h5">
2381 <title>Description</title>
2382 <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>
2384 <section remap="h5">
2385 <title>Output</title>
2386 <para>The routerstat output includes the following fields:</para>
2387 <informaltable frame="all">
2389 <colspec colname="c1" colwidth="50*"/>
2390 <colspec colname="c2" colwidth="50*"/>
2394 <para><emphasis role="bold">Output</emphasis></para>
2397 <para><emphasis role="bold">Description</emphasis></para>
2404 <para> <literal>M</literal></para>
2407 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2412 <para> <literal>E</literal></para>
2415 <para> Number of LNet errors</para>
2420 <para> <literal>S</literal></para>
2423 <para> Total size (length) of messages sent in bytes/ Number of messages sent</para>
2428 <para> <literal>R</literal></para>
2431 <para> Total size (length) of messages received in bytes/ Number of messages received</para>
2436 <para> <literal>F</literal></para>
2439 <para> Total size (length) of messages routed in bytes/ Number of messages routed</para>
2444 <para> <literal>D</literal></para>
2447 <para> Total size (length) of messages dropped in bytes/ Number of messages dropped</para>
2453 <para>When an <literal><replaceable>interval</replaceable></literal> is specified, additional lines of statistics are printed including the following fields:</para>
2454 <informaltable frame="all">
2456 <colspec colname="c1" colwidth="50*"/>
2457 <colspec colname="c2" colwidth="50*"/>
2461 <para><emphasis role="bold">Output</emphasis></para>
2464 <para><emphasis role="bold">Description</emphasis></para>
2471 <para> <literal>M</literal></para>
2474 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2479 <para> <literal>E</literal></para>
2482 <para> Number of LNet errors per second</para>
2487 <para> <literal>S</literal></para>
2490 <para> Rate of data sent in Mbytes per second/ Count of messages sent per second</para>
2495 <para> <literal>R</literal></para>
2498 <para> Rate of data received in Mbytes per second/ Count of messages received per second</para>
2503 <para> <literal>F</literal></para>
2506 <para> Rate of data routed in Mbytes per second/ Count of messages routed per second</para>
2511 <para> <literal>D</literal></para>
2514 <para> Rate of data dropped in Mbytes per second/ Count of messages dropped per second</para>
2521 <section remap="h5">
2522 <title>Example</title>
2523 <screen># routerstat 1
2524 M 0(13) E 0 S 117379184/4250 R 878480/4356 F 0/0 D 0/0
2525 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2526 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2527 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2528 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2529 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2530 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2531 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2532 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2533 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2536 <section remap="h5">
2537 <title>Files</title>
2538 <para>The routerstat utility extracts statistics data from:</para>
2539 <screen>/proc/sys/lnet/stats</screen>
2542 <section xml:id="dbdoclet.50438219_39574">
2543 <title><indexterm><primary>tunefs.lustre</primary></indexterm>
2544 tunefs.lustre</title>
2545 <para>The tunefs.lustre utility modifies configuration information on a Lustre target disk.</para>
2546 <section remap="h5">
2547 <title>Synopsis</title>
2548 <screen>tunefs.lustre [options] <replaceable>/dev/device</replaceable></screen>
2550 <section remap="h5">
2551 <title>Description</title>
2552 <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>
2554 <para>Changes made here affect a file system only when the target is mounted the next time.</para>
2556 <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>
2557 <screen>$ tunefs.lustre --erase-params --param=<replaceable>new_parameters</replaceable> </screen>
2558 <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>
2559 <screen>$ tunefs.lustre --param mdt.identity_upcall=NONE /dev/sda1</screen>
2561 <section remap="h5">
2562 <title>Options</title>
2563 <para>The tunefs.lustre options are listed and explained below.</para>
2564 <informaltable frame="all">
2566 <colspec colname="c1" colwidth="50*"/>
2567 <colspec colname="c2" colwidth="50*"/>
2571 <para><emphasis role="bold">Option</emphasis></para>
2574 <para><emphasis role="bold">Description</emphasis></para>
2581 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
2584 <para> Sets a user comment about this disk, ignored by Lustre.</para>
2589 <para> <literal>--dryrun</literal></para>
2592 <para> Only prints what would be done; does not affect the disk.</para>
2597 <para> <literal>--erase-params</literal></para>
2600 <para> Removes all previous parameter information.</para>
2605 <literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
2606 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
2607 service nodes. The <literal>--servicenode</literal> option cannot be used with
2608 <literal>--failnode</literal> option. See <xref
2609 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
2610 more details.</entry>
2614 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
2617 <para>Sets the NID(s) of a failover service node for a primary server for a target.
2618 The <literal>--failnode</literal> option cannot be used with
2619 <literal>--servicenode</literal> option. See <xref
2620 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
2621 for more details.<note>
2622 <para>When the <literal>--failnode</literal> option is used, certain
2623 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
2624 linkend="dbdoclet.50438188_92688"/>).</para>
2630 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
2633 <para> The Lustre file system of which this service will be a part. The default file
2634 system name is <literal>lustre</literal>.</para>
2639 <para> <literal>--index=<replaceable>index</replaceable></literal></para>
2642 <para> Forces a particular OST or MDT index.</para>
2647 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
2650 <para> Sets the mount options used when the backing file system is mounted.</para>
2651 <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>
2652 <para>The defaults for ldiskfs are:</para>
2653 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
2654 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
2655 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
2656 <para>Do not alter the default mount options unless you know what you are doing.</para>
2661 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
2664 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
2669 <para> <literal>--mgs</literal></para>
2672 <para> Adds a configuration management service to this target.</para>
2677 <para> <literal>--msgnode=<replaceable>nid,...</replaceable></literal></para>
2680 <para> Sets the NID(s) of the MGS node; required for all targets other than the MGS.</para>
2685 <para> <literal>--nomgs</literal></para>
2688 <para> Removes a configuration management service to this target.</para>
2693 <para> <literal>--quiet</literal></para>
2696 <para> Prints less information.</para>
2701 <para> <literal>--verbose</literal></para>
2704 <para> Prints more information.</para>
2709 <para> <literal>--writeconf</literal></para>
2712 <para> Erases all configuration logs for the file system to which this MDT belongs,
2713 and regenerates them. This is dangerous operation. All clients must be unmounted
2714 and servers for this file system should be stopped. All targets (OSTs/MDTs) must
2715 then be restarted to regenerate the logs. No clients should be started until all
2716 targets have restarted.</para>
2717 <para>The correct order of operations is:</para>
2720 <para>Unmount all clients on the file system</para>
2723 <para>Unmount the MDT and all OSTs on the file system</para>
2726 <para>Run <literal>tunefs.lustre --writeconf
2727 <replaceable>device</replaceable></literal> on every server</para>
2730 <para>Mount the MDT and OSTs</para>
2733 <para>Mount the clients</para>
2742 <section remap="h5">
2743 <title>Examples</title>
2744 <para>Change the MGS's NID address. (This should be done on each target disk, since they should all contact the same MGS.)</para>
2745 <screen>tunefs.lustre --erase-param --mgsnode=<replaceable>new_nid</replaceable> --writeconf /dev/sda</screen>
2746 <para>Add a failover NID location for this target.</para>
2747 <screen>tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda </screen>
2749 <section remap="h5">
2750 <title>See Also</title>
2753 <para><xref linkend="dbdoclet.50438219_75432"/></para>
2756 <para><xref linkend="dbdoclet.50438219_12635"/></para>
2759 <para><xref linkend="dbdoclet.50438219_38274"/></para>
2762 <para><xref linkend="dbdoclet.50438206_94597"/></para>
2767 <section xml:id="dbdoclet.50438219_99928">
2768 <title><indexterm><primary>utilities</primary><secondary>system config</secondary></indexterm>
2769 Additional System Configuration Utilities</title>
2770 <para>This section describes additional system configuration utilities for Lustre.</para>
2771 <section remap="h3">
2772 <title><indexterm><primary>utilities</primary><secondary>application profiling</secondary></indexterm>
2773 Application Profiling Utilities</title>
2774 <para>The following utilities are located in /usr/bin.</para>
2775 <para><literal>lustre_req_history.sh</literal></para>
2776 <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>
2778 <section remap="h3">
2779 <title>More /proc Statistics for Application Profiling</title>
2780 <para>The following utilities provide additional statistics.</para>
2781 <para><literal>vfs_ops_stats</literal></para>
2782 <para>The client vfs_ops_stats utility tracks Linux VFS operation calls into Lustre for a single PID, PPID, GID or everything.</para>
2783 <screen>/proc/fs/lustre/llite/*/vfs_ops_stats
2784 /proc/fs/lustre/llite/*/vfs_track_[pid|ppid|gid]
2786 <para><literal>extents_stats</literal></para>
2787 <para>The client extents_stats utility shows the size distribution of I/O calls from the client (cumulative and by process).</para>
2788 <screen>/proc/fs/lustre/llite/*/extents_stats, extents_stats_per_process
2790 <para><literal>offset_stats</literal></para>
2791 <para>The client offset_stats utility shows the read/write seek activity of a client by offsets and ranges.</para>
2792 <screen>/proc/fs/lustre/llite/*/offset_stats
2794 <para>Lustre includes per-client and improved MDT statistics:</para>
2797 <para> Per-client statistics tracked on the servers</para>
2800 <para>Each MDS and OSS now tracks LDLM and operations statistics for
2801 every connected client, for comparisons and simpler collection of
2802 distributed job statistics.</para>
2803 <screen>/proc/fs/lustre/mds|obdfilter/*/exports/
2807 <para> Improved MDT statistics</para>
2810 <para>More detailed MDT operations statistics are collected for better
2812 <screen>/proc/fs/lustre/mdt/*/md_stats
2815 <section remap="h3">
2816 <title><indexterm><primary>utilities</primary><secondary>debugging</secondary></indexterm><indexterm><primary>debug</primary><secondary>utilities</secondary></indexterm>
2818 Testing / Debugging Utilities</title>
2819 <para>Lustre offers the following test and debugging utilities.</para>
2820 <section remap="h5">
2821 <title><indexterm><primary>lr_reader</primary></indexterm>
2823 <para>The lr_reader utility translates the content of the <literal>last_rcvd</literal> and <literal>reply_data</literal> files into human-readable form.</para>
2824 <para>The following utilities are part of the Lustre I/O kit. For more information, see <xref linkend="benchmarkingtests"/>.</para>
2826 <section remap="h5">
2828 <primary>sgpdd-survey</primary>
2829 </indexterm> sgpdd-survey</title>
2830 <para>The <literal>sgpdd-survey</literal> utility tests 'bare metal' performance,
2831 bypassing as much of the kernel as possible. The <literal>sgpdd-survey</literal> tool does
2832 not require Lustre, but it does require the sgp_dd package.</para>
2834 <para>The <literal>sgpdd-survey</literal> utility erases all data on the device.</para>
2837 <section remap="h5">
2839 <primary>obdfilter-survey</primary>
2840 </indexterm>obdfilter-survey</title>
2841 <para>The <literal>obdfilter-survey</literal> utility is a shell script that tests
2842 performance of isolated OSTS, the network via echo clients, and an end-to-end test.</para>
2844 <section remap="h5">
2845 <title><indexterm><primary>ior-survey</primary></indexterm>ior-survey</title>
2846 <para>The ior-survey utility is a script used to run the IOR benchmark. Lustre includes IOR version 2.8.6.</para>
2848 <section remap="h5">
2850 <primary>ost-survey</primary>
2851 </indexterm>ost-survey</title>
2852 <para>The <literal>ost-survey</literal> utility is an OST performance survey that tests
2853 client-to-disk performance of the individual OSTs in a Lustre file system.</para>
2855 <section remap="h5">
2856 <title><indexterm><primary>stats-collect</primary></indexterm>stats-collect</title>
2857 <para>The stats-collect utility contains scripts used to collect application profiling information from Lustre clients and servers.</para>
2860 <section remap="h3" condition='l29'>
2861 <title><indexterm><primary>fileset</primary></indexterm>Fileset Feature</title>
2862 <para> With the fileset feature, Lustre now provides subdirectory mount
2863 support. Subdirectory mounts, also referred to as filesets, allow a
2864 client to mount a child directory of a parent filesystem, thereby limiting
2865 the filesystem namespace visibility on a specific client. A common use
2866 case is for a client to use a subdirectory mount when there is a desire to
2867 limit the visibility of the entire filesystem namesapce to aid in the
2868 prevention of accidental file deletions outside of the subdirectory
2870 <para>It is important to note that invocation of the subdirectory mount is
2871 voluntary by the client and not does prevent access to files that are
2872 visible in multiple subdirectory mounts via hard links. Furthermore, it
2873 does not prevent the client from subsequently mounting the whole file
2874 system without a subdirectory being specified.</para>
2875 <figure xml:id="understandinglustre.fig.fileset">
2878 <primary>Lustre</primary>
2879 <secondary>fileset</secondary>
2880 </indexterm>Lustre fileset</title>
2883 <imagedata scalefit="1" width="100%"
2884 fileref="./figures/fileset.png" />
2887 <phrase>Lustre file system fileset feature</phrase>
2891 <section remap="h4">
2892 <title>Examples</title>
2893 <para>The following example will mount the
2894 <literal>chipfs</literal> filesystem on client1 and create a
2895 subdirectory <literal>v1_1</literal> within that filesystem. Client2
2896 will then mount only the <literal>v1_1</literal> subdirectory as a
2897 fileset, thereby limiting access to anything else in the
2898 <literal>chipfs</literal> filesystem from client2.</para>
2899 <screen>client1# mount -t lustre mgs@tcp:/chipfs /mnt/chip
2900 client1# mkdir /mnt/chip/v1_1</screen>
2901 <screen>client2# mount -t lustre mgs@tcp:/chipfs/v1_1 /mnt/chipv1_1</screen>
2902 <para>You can check the created mounts in /etc/mtab. It should look like
2903 the following:</para>
2904 <screen><replaceable>client1</replaceable>
2905 mds@tcp0:/chipfs/ /mnt/chip lustre rw 0 0
2907 <replaceable>client2</replaceable>
2908 mds@tcp0:/chipfs/v1_1 /mnt/chipv1_1 lustre rw 0 0</screen>
2909 <para>Create a directory under the /mnt/chip mount, and get its FID</para>
2910 <screen>client1# mkdir /mnt/chip/v1_2
2911 client1# lfs path2fid /mnt/chip/v1_2
2912 [0x200000400:0x2:0x0]
2914 <para>If you try resolve the FID of the <literal>/mnt/chip/v1_2</literal>
2915 path (as created in the example above) on client2, an error will be returned
2916 as the FID can not be resolved on client2 since it is not part of the
2917 mounted fileset on that client. Recall that the fileset on client2 mounted
2918 the <literal>v1_1</literal> subdirectory beneath the top level
2919 <literal>chipfs</literal> filesystem.
2921 <screen>client2# lfs fid2path /mnt/chip/v1_2 [0x200000400:0x2:0x0]
2922 fid2path: error on FID [0x200000400:0x2:0x0]: No such file or directory</screen>
2923 <para>Subdirectory mounts do not have the <literal>.lustre</literal>
2924 pseudo directory, which prevents clients from opening or accessing files
2926 <screen>client1# ls /mnt/chipfs/.lustre
2927 fid lost+found</screen>
2928 <screen>client2# ls /mnt/chipv1_1/.lustre
2929 ls: cannot access /mnt/chipv1_1/.lustre: No such file or directory