1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook"
3 xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US"
4 xml:id="systemconfigurationutilities">
5 <title xml:id="systemconfigurationutilities.title">System Configuration Utilities</title>
6 <para>This chapter includes system configuration utilities and includes the following sections:</para>
9 <para><xref linkend="dbdoclet.50438219_55923"/></para>
12 <para><xref linkend="dbdoclet.l_getidentity"/></para>
15 <para><xref linkend="dbdoclet.50438219_38274"/></para>
18 <para><xref linkend="dbdoclet.50438219_58217"/></para>
21 <para><xref linkend="dbdoclet.50438219_44971"/></para>
24 <para><xref linkend="dbdoclet.50438219_90386"/></para>
27 <para><xref linkend="dbdoclet.50438219_23232"/></para>
30 <para><xref linkend="dbdoclet.50438219_23648"/></para>
33 <para><xref linkend="dbdoclet.50438219_64286"/></para>
36 <para><xref linkend="dbdoclet.50438219_90218"/></para>
39 <para><xref linkend="dbdoclet.50438219_54734"/></para>
42 <para><xref linkend="dbdoclet.50438219_63667"/></para>
45 <para><xref linkend="dbdoclet.50438219_75432"/></para>
48 <para><xref linkend="dbdoclet.50438219_12635"/></para>
51 <para><xref linkend="dbdoclet.50438219_82679"/></para>
54 <para><xref linkend="dbdoclet.50438219_51496"/></para>
57 <para><xref linkend="dbdoclet.50438219_39574"/></para>
60 <para><xref linkend="dbdoclet.50438219_99928"/></para>
63 <section xml:id="dbdoclet.50438219_55923">
64 <title><indexterm><primary>e2scan</primary></indexterm>
66 <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>
67 <para><link xl:href="http://downloads.whamcloud.com/public/e2fsprogs/latest/">http://downloads.whamcloud.com/public/e2fsprogs/latest/</link></para>
69 <title>Synopsis</title>
70 <screen>e2scan [options] [-f file] block_device</screen>
73 <title>Description</title>
74 <para>When invoked, the e2scan utility iterates all inodes on the block device, finds modified inodes, and prints their inode numbers. A similar iterator, using libext2fs(5), builds a table (called parent database) which lists the parent node for each inode. With a lookup function, you can reconstruct modified pathnames from root.</para>
77 <title>Options</title>
78 <informaltable frame="all">
80 <colspec colname="c1" colwidth="50*"/>
81 <colspec colname="c2" colwidth="50*"/>
85 <para><emphasis role="bold">Option</emphasis></para>
88 <para><emphasis role="bold">Description</emphasis></para>
95 <para> <literal>-b <replaceable>inode buffer blocks</replaceable></literal></para>
98 <para> Sets the readahead inode blocks to get excellent performance when scanning the block device.</para>
104 <para> <literal>-o <replaceable>output file</replaceable></literal></para>
107 <para> If an output file is specified, modified pathnames are written to this file. Otherwise, modified parameters are written to stdout.</para>
112 <para> <literal>-t <replaceable>inode</replaceable>| <replaceable>pathname</replaceable></literal></para>
115 <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>
116 <para>The e2scan utility lists modified pathnames based on modified inode numbers.</para>
121 <para> <literal>-u</literal></para>
124 <para> Rebuilds the parent database from scratch. Otherwise, the current parent database is used.</para>
132 <section xml:id="dbdoclet.l_getidentity">
133 <title><indexterm><primary>l_getidentity</primary></indexterm>
134 l_getidentity</title>
135 <para>The l_getidentity tool normally handles Lustre user/group mapping
138 <title>Synopsis</title>
139 <screen>l_getidentity { $FSNAME-MDT{xxxx}| -d} {uid}</screen>
142 <title>Description</title>
143 <para>The <literal>l_getidentity</literal> utility is called from the
144 MDS to map a numeric UID value into the list of supplementary group
145 values for that UID, and writes this into the
146 <literal>mdt.*.identity_info</literal> parameter file. The list of
147 supplementary groups is cached in the kernel to avoid repeated
148 upcalls. See <xref linkend="dbdoclet.identity_upcall"/> for more
150 <para>The <literal>l_getidentity</literal> utility can also be run
151 directly for debugging purposes to ensure that the UID mapping for a
152 particular user is configured correctly, by using the
153 <literal>-d</literal> argument instead of the MDT name.
157 <title>Options</title>
158 <informaltable frame="all">
160 <colspec colname="c1" colwidth="50*"/>
161 <colspec colname="c2" colwidth="50*"/>
165 <para><emphasis role="bold">Option</emphasis></para>
168 <para><emphasis role="bold">Description</emphasis></para>
176 <literal>${FSNAME}-MDT{xxxx}</literal></para>
179 <para> Metadata server target name</para>
184 <para> <literal>uid</literal></para>
187 <para> User identifier</para>
196 <para>The l_getidentity files are located at:</para>
197 <screen>/proc/fs/lustre/mdt/${FSNAME}-MDT{xxxx}/identity_upcall</screen>
200 <section xml:id="dbdoclet.50438219_38274">
201 <title><indexterm><primary>lctl</primary></indexterm>
203 <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>
205 <title>Synopsis</title>
206 <screen>lctl [--device <replaceable>devno</replaceable>] <replaceable>command [args]</replaceable></screen>
209 <title>Description</title>
210 <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>
214 network <replaceable>up|down</replaceable>
216 ping <replaceable>nid</replaceable>help
218 <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>
219 <para>For non-interactive use, use the second invocation, which runs the command after connecting to the device.</para>
222 <title>Setting Parameters with lctl</title>
223 <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>
224 <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>
225 <screen>lctl set_param [-n] [-P] [-d] <replaceable>obdtype.obdname.property</replaceable>=<replaceable>value</replaceable></screen>
226 <para>For example:</para>
227 <screen>mds# lctl set_param mdt.testfs-MDT0000.identity_upcall=NONE</screen>
228 <para condition='l25'>Use <literal>-P</literal> option to set parameters permanently. Option <literal>-d </literal>deletes permanent parameters. For example:
229 <screen>mgs# lctl set_param -P mdt.testfs-MDT0000.identity_upcall=NONE
230 mgs# lctl set_param -P -d mdt.testfs-MDT0000.identity_upcall</screen></para>
231 <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>
232 <screen><replaceable>obd|fsname</replaceable>.obdtype.property=<replaceable>value</replaceable>) </screen>
233 <para>For example:</para>
234 <screen>mgs# lctl conf_param testfs-MDT0000.mdt.identity_upcall=NONE
235 $ lctl conf_param testfs.llite.max_read_ahead_mb=16 </screen>
237 <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>
239 <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>
240 <screen>lctl get_param [-n] <replaceable>obdtype.obdname.parameter</replaceable></screen>
241 <para>For example:</para>
242 <screen>mds# lctl get_param mdt.testfs-MDT0000.identity_upcall</screen>
243 <para>To list Lustre parameters that are available to set, use the <literal>lctl list_param</literal> command, with this syntax:</para>
244 <screen>lctl list_param [-R] [-F] <replaceable>obdtype.obdname.*</replaceable></screen>
245 <para>For example, to list all of the parameters on the MDT:</para>
246 <screen>oss# lctl list_param -RF mdt</screen>
247 <para>For more information on using lctl to set temporary and permanent parameters, see <xref linkend="dbdoclet.50438194_51490"/>.</para>
248 <para><emphasis role="bold">Network Configuration</emphasis></para>
249 <informaltable frame="all">
251 <colspec colname="c1" colwidth="50*"/>
252 <colspec colname="c2" colwidth="50*"/>
256 <para><emphasis role="bold">Option</emphasis></para>
259 <para><emphasis role="bold">Description</emphasis></para>
266 <para> <literal>network up|down|tcp|elan</literal></para>
269 <para> Starts or stops LNet, or selects a network type for other <literal>lctl</literal> LNet commands.</para>
274 <para> <literal>list_nids</literal></para>
277 <para> Prints all NIDs on the local node. LNet must be running.</para>
282 <para> <literal>which_nid <replaceable>nidlist</replaceable></literal></para>
285 <para> From a list of NIDs for a remote node, identifies the NID on which interface communication will occur.</para>
290 <para> <literal>ping <replaceable>nid</replaceable></literal></para>
293 <para> Checks LNet connectivity via an LNet ping. This uses the fabric appropriate to the specified NID.</para>
298 <para> <literal>interface_list</literal></para>
301 <para> Prints the network interface information for a given <emphasis>network</emphasis> type.</para>
306 <para> <literal>peer_list</literal></para>
309 <para> Prints the known peers for a given <emphasis>network</emphasis> type.</para>
314 <para> <literal>conn_list</literal></para>
317 <para> Prints all the connected remote NIDs for a given <emphasis>network</emphasis> type.</para>
322 <para> <literal>active_tx</literal></para>
325 <para> This command prints active transmits. It is only used for the Elan <emphasis>network</emphasis> type.</para>
330 <para> <literal>route_list</literal></para>
333 <para> Prints the complete routing table.</para>
339 <para><emphasis role="bold">Device Selection</emphasis></para>
340 <informaltable frame="all">
342 <colspec colname="c1" colwidth="33*"/>
343 <colspec colname="c2" colwidth="33*"/>
344 <colspec colname="c3" colwidth="33*"/>
348 <para><emphasis role="bold">Option</emphasis></para>
351 <para><emphasis role="bold"> </emphasis></para>
354 <para><emphasis role="bold">Description</emphasis></para>
361 <para> <literal>device <replaceable>devname</replaceable></literal></para>
367 <para> This selects the specified OBD device. All other commands depend on the device being set.</para>
372 <para> <literal>device_list</literal></para>
378 <para> Shows the local Lustre OBDs, a/k/a <literal>dl</literal>.</para>
384 <para><emphasis role="bold">Device Operations</emphasis></para>
385 <informaltable frame="all">
387 <colspec colname="c1" colwidth="33*"/>
388 <colspec colname="c2" colwidth="33*"/>
389 <colspec colname="c3" colwidth="33*"/>
392 <entry nameend="c2" namest="c1">
393 <para><emphasis role="bold">Option</emphasis></para>
396 <para><emphasis role="bold">Description</emphasis></para>
402 <entry nameend="c2" namest="c1">
403 <para> <literal>list_param [-F|-R] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
406 <para> Lists the Lustre or LNet parameter name.</para>
415 <para> <literal>-F</literal></para>
418 <para> Adds '/', '@' or '=' for directories, symlinks and writeable files, respectively.</para>
426 <para> <literal>-R</literal></para>
429 <para> Recursively lists all parameters under the specified path. If <literal>param_path</literal> is unspecified, all parameters are shown.</para>
433 <entry nameend="c2" namest="c1">
434 <para> <literal>get_param [-n|-N|-F] <replaceable>parameter</replaceable> <replaceable>[parameter ...]</replaceable></literal></para>
437 <para> Gets the value of a Lustre or LNet parameter from the specified path.</para>
445 <para> <literal>-n</literal></para>
448 <para> Prints only the parameter value and not the parameter name.</para>
456 <para> <literal>-N</literal></para>
459 <para> Prints only matched parameter names and not the values; especially useful when using patterns.</para>
467 <para> <literal>-F</literal></para>
470 <para> When <literal>-N</literal> is specified, adds '/', '@' or '=' for directories, symlinks and writeable files, respectively.</para>
474 <entry nameend="c2" namest="c1">
475 <para> <literal>set_param [-n] <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
478 <para> Sets the value of a Lustre or LNet parameter from the specified path.</para>
486 <para> <literal>-n</literal></para>
489 <para> Disables printing of the key name when printing values.</para>
493 <entry nameend="c2" namest="c1">
494 <para><literal>conf_param [-d] <replaceable>device|fsname</replaceable> <replaceable>parameter</replaceable>=<replaceable>value</replaceable></literal></para>
497 <para> Sets a permanent configuration parameter for any device via the MGS. This command must be run on the MGS node.</para>
498 <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>
499 <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>
507 <para><literal>-d <replaceable>device|fsname</replaceable>.<replaceable>parameter</replaceable></literal></para>
511 <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>
515 <entry nameend="c2" namest="c1">
516 <para> <literal>activate</literal></para>
519 <para> Re-activates an import after the deactivate operation. This setting is only effective until the next restart (see <literal>conf_param</literal>).</para>
523 <entry nameend="c2" namest="c1">
524 <para> <literal>deactivate</literal></para>
527 <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>
531 <entry nameend="c2" namest="c1">
532 <para> <literal>abort_recovery</literal></para>
535 <para> Aborts the recovery process on a re-starting MDT or OST.</para>
542 <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>
544 <para><emphasis role="bold">Virtual Block Device Operations</emphasis></para>
545 <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>
546 <informaltable frame="all">
548 <colspec colname="c1" colwidth="50*"/>
549 <colspec colname="c2" colwidth="50*"/>
553 <para><emphasis role="bold">Option</emphasis></para>
556 <para><emphasis role="bold">Description</emphasis></para>
563 <para><literal>blockdev_attach <replaceable>filename</replaceable> <replaceable>/dev/lloop_device</replaceable></literal></para>
566 <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>
571 <para><literal>blockdev_detach <replaceable>/dev/lloop_device</replaceable></literal></para>
574 <para> Detaches the virtual block device.</para>
579 <para><literal>blockdev_info <replaceable>/dev/lloop_device</replaceable></literal></para>
582 <para> Provides information about the Lustre file attached to the device node.</para>
588 <para><emphasis role="bold">Changelogs</emphasis></para>
589 <informaltable frame="all">
591 <colspec colname="c1" colwidth="50*"/>
592 <colspec colname="c2" colwidth="50*"/>
596 <para><emphasis role="bold">Option</emphasis></para>
599 <para><emphasis role="bold">Description</emphasis></para>
606 <para> <literal>changelog_register</literal></para>
609 <para> Registers a new changelog user for a particular device.
610 Changelog entries are saved persistently on the MDT with each
611 filesystem operation, and are only purged beyond all registered
612 user's minimum set point (see
613 <literal>lfs changelog_clear</literal>). This may cause the
614 Changelog to consume a large amount of space, eventually
615 filling the MDT, if a changelog user is registered but never
616 consumes those records.</para>
621 <para>changelog_deregister <replaceable>id</replaceable></para>
624 <para> Unregisters an existing changelog user. If the
625 user's "clear" record number is the minimum for
626 the device, changelog records are purged until the next minimum.
633 <para><emphasis role="bold">Debug</emphasis></para>
634 <informaltable frame="all">
636 <colspec colname="c1" colwidth="50*"/>
637 <colspec colname="c2" colwidth="50*"/>
641 <para><emphasis role="bold">Option</emphasis></para>
644 <para><emphasis role="bold">Description</emphasis></para>
651 <para> <literal>debug_daemon</literal></para>
654 <para> Starts and stops the debug daemon, and controls the output filename and size.</para>
659 <para> <literal>debug_kernel <replaceable>[file]</replaceable> [raw]</literal></para>
662 <para> Dumps the kernel debug buffer to stdout or a file.</para>
667 <para><literal>debug_file <replaceable>input_file</replaceable> <replaceable>[output_file]</replaceable></literal></para>
670 <para> Converts the kernel-dumped debug log from binary to plain text format.</para>
675 <para> <literal>clear</literal></para>
678 <para> Clears the kernel debug buffer.</para>
683 <para> <literal>mark <replaceable>text</replaceable></literal></para>
686 <para> Inserts marker text in the kernel debug buffer.</para>
691 <para> <literal>filter <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
694 <para> Filters kernel debug messages by subsystem or mask.</para>
699 <para> <literal>show <replaceable>subsystem_id|debug_mask</replaceable></literal></para>
702 <para> Shows specific types of messages.</para>
707 <para> <literal>debug_list <replaceable>subsystems|types</replaceable></literal></para>
710 <para> Lists all subsystem and debug types.</para>
715 <para> <literal>modules <replaceable>path</replaceable></literal></para>
718 <para> Provides GDB-friendly module information.</para>
726 <title>Options</title>
727 <para>Use the following options to invoke lctl.</para>
728 <informaltable frame="all">
730 <colspec colname="c1" colwidth="50*"/>
731 <colspec colname="c2" colwidth="50*"/>
735 <para><emphasis role="bold">Option</emphasis></para>
738 <para><emphasis role="bold">Description</emphasis></para>
745 <para> <literal>--device</literal></para>
748 <para> Device to be used for the operation (specified by name or number). See device_list.</para>
753 <para> <literal>--ignore_errors | ignore_errors</literal></para>
756 <para> Ignores errors during script processing.</para>
764 <title>Examples</title>
765 <para><literal>lctl</literal></para>
768 0 UP mgc MGC192.168.0.20@tcp btbb24e3-7deb-2ffa-eab0-44dffe00f692 5
769 1 UP ost OSS OSS_uuid 3
770 2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
771 lctl > dk /tmp/log Debug log: 87 lines, 87 kept, 0 dropped.
772 lctl > quit</screen>
775 <title>See Also</title>
778 <para> <xref linkend="dbdoclet.50438219_75432"/> </para>
781 <para> <xref linkend="dbdoclet.50438219_12635"/> </para>
784 <para> <xref linkend="dbdoclet.50438219_38274"/> </para>
787 <para> <xref linkend="dbdoclet.50438206_94597"/> </para>
792 <section xml:id="dbdoclet.50438219_58217">
793 <title><indexterm><primary>ll_decode_filter_fid</primary></indexterm>
794 ll_decode_filter_fid</title>
795 <para>The <literal>ll_decode_filter_fid</literal> utility displays the
796 Lustre object ID and MDT parent FID.</para>
798 <title>Synopsis</title>
799 <screen>ll_decode_filter_fid object_file [object_file ...]</screen>
802 <title>Description</title>
803 <para>The ll_decode_filter_fid utility decodes and prints the Lustre OST
804 object ID, MDT FID, stripe index for the specified OST object(s), which
805 is stored in the "trusted.fid" attribute on each OST object.
806 This is accessible to <literal>ll_decode_filter_fid</literal> when the
807 OST file system is mounted locally as type ldiskfs for maintenance.
809 <para>The "trusted.fid" extended attribute is stored on each
810 OST object when it is first modified (data written or attributes set),
811 and is not accessed or modified by Lustre after that time.</para>
812 <para>The OST object ID (objid) may be useful in case of OST directory
813 corruption, though LFSCK can normally reconstruct the entire OST object
814 directory tree, see <xref linkend="dbdoclet.lfsckadmin" /> for details.
815 The MDS FID can be useful to determine which MDS inode an OST object
816 is (or was) used by. The stripe index can be used in conjunction with
817 other OST objects to reconstruct the layout of a file even if the MDT
822 <title>Examples</title>
823 <screen>root@oss1# cd /mnt/ost/lost+found
824 root@oss1# ll_decode_filter_fid #12345[4,5,8]
825 #123454: objid=690670 seq=0 parent=[0x751c5:0xfce6e605:0x0]
826 #123455: objid=614725 seq=0 parent=[0x18d11:0xebba84eb:0x1]
827 #123458: objid=533088 seq=0 parent=[0x21417:0x19734d61:0x0]</screen>
828 <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>
829 <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>
830 <para>The idx field shows the stripe number of this OST object in the Lustre RAID-0 striped file.</para>
833 <title>See Also</title>
834 <para><xref linkend="dbdoclet.50438219_44971"/></para>
837 <section xml:id="dbdoclet.50438219_44971" condition='l28'>
838 <title><indexterm><primary>ll_recover_lost_found_objs</primary></indexterm>
839 ll_recover_lost_found_objs</title>
840 <para>The <literal>ll_recover_lost_found_objs</literal> utility was
841 used to help recover Lustre OST objects (file data) from the
842 <literal>lost+found</literal> directory of an OST and return them to
843 their correct locations based on information stored in the
844 <literal>trusted.fid</literal> extended attribute stored on every
845 OST object containing data.</para>
846 <note condition="l26"><para>This utility is not needed with Lustre 2.6
847 and later, and is removed in Lustre 2.8 since <literal>LFSCK</literal>
848 online scanning will automatically move objects from
849 <literal>lost+found</literal> to the proper place in the OST.</para>
852 <title>Synopsis</title>
853 <screen>llobdstat ost_name [interval]</screen>
856 <title>Description</title>
857 <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>
860 <title>Example</title>
861 <screen># llobdstat liane-OST0002 1
862 /usr/bin/llobdstat on /proc/fs/lustre/obdfilter/liane-OST0002/stats
863 Processor counters run at 2800.189 MHz
864 Read: 1.21431e+07, Write: 9.93363e+08, create/destroy: 24/1499, stat: 34, p\
866 [NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]
867 Timestamp Read-delta ReadRate Write-delta WriteRate
868 --------------------------------------------------------
869 1217026053 0.00MB 0.00MB/s 0.00MB 0.00MB/s
870 1217026054 0.00MB 0.00MB/s 0.00MB 0.00MB/s
871 1217026055 0.00MB 0.00MB/s 0.00MB 0.00MB/s
872 1217026056 0.00MB 0.00MB/s 0.00MB 0.00MB/s
873 1217026057 0.00MB 0.00MB/s 0.00MB 0.00MB/s
874 1217026058 0.00MB 0.00MB/s 0.00MB 0.00MB/s
875 1217026059 0.00MB 0.00MB/s 0.00MB 0.00MB/s st:1</screen>
879 <screen>/proc/fs/lustre/obdfilter/<replaceable>ostname</replaceable>/stats</screen>
882 <section xml:id="dbdoclet.50438219_90386">
883 <title><indexterm><primary>llog_reader</primary></indexterm>
885 <para>The llog_reader utility translates a Lustre configuration log into human-readable form.</para>
887 <title>Synopsis</title>
888 <screen>llog_reader filename</screen>
891 <title>Description</title>
892 <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>
893 <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>
894 <screen>mount -t ldiskfs /dev/sda /mnt/mgs
895 llog_reader /mnt/mgs/CONFIGS/tfs-client</screen>
896 <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>
897 <screen>debugfs -c -R 'dump CONFIGS/tfs-client /tmp/tfs-client' /dev/sda
898 llog_reader /tmp/tfs-client</screen>
900 <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>
904 <title>See Also</title>
905 <para><xref linkend="dbdoclet.50438219_39574"/></para>
908 <section xml:id="dbdoclet.50438219_23232">
909 <title><indexterm><primary>llstat</primary></indexterm>
911 <para>The llstat utility displays Lustre statistics.</para>
913 <title>Synopsis</title>
914 <screen>llstat [-c] [-g] [-i <replaceable>interval</replaceable>] <replaceable>stats_file
915 </replaceable></screen>
918 <title>Description</title>
919 <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>
922 <title>Options</title>
923 <informaltable frame="all">
925 <colspec colname="c1" colwidth="50*"/>
926 <colspec colname="c2" colwidth="50*"/>
930 <para><emphasis role="bold">Option</emphasis></para>
933 <para><emphasis role="bold">Description</emphasis></para>
940 <para> <literal>-c</literal></para>
943 <para> Clears the statistics file.</para>
948 <para> <literal>-i</literal></para>
951 <para> Specifies the polling period (in seconds).</para>
956 <para> <literal>-g</literal></para>
959 <para> Specifies graphable output format.</para>
964 <para> <literal>-h</literal></para>
967 <para> Displays help information.</para>
972 <para> <literal>stats_file</literal></para>
975 <para> Specifies either the full path to a statistics file or the shorthand reference, <literal>mds</literal> or <literal>ost</literal></para>
983 <title>Example</title>
984 <para>To monitor /proc/fs/lustre/ost/OSS/ost/stats at 1 second intervals, run;</para>
985 <screen>llstat -i 1 ost</screen>
989 <para>The llstat files are located at:</para>
990 <screen>/proc/fs/lustre/mdt/MDS/*/stats
991 /proc/fs/lustre/mdt/*/exports/*/stats
992 /proc/fs/lustre/mdc/*/stats
993 /proc/fs/lustre/ldlm/services/*/stats
994 /proc/fs/lustre/ldlm/namespaces/*/pool/stats
995 /proc/fs/lustre/mgs/MGS/exports/*/stats
996 /proc/fs/lustre/ost/OSS/*/stats
997 /proc/fs/lustre/osc/*/stats
998 /proc/fs/lustre/obdfilter/*/exports/*/stats
999 /proc/fs/lustre/obdfilter/*/stats
1000 /proc/fs/lustre/llite/*/stats
1004 <section xml:id="dbdoclet.50438219_23648">
1005 <title><indexterm><primary>llverdev</primary></indexterm>
1007 <para>The llverdev verifies a block device is functioning properly over its full size.</para>
1008 <section remap="h5">
1009 <title>Synopsis</title>
1010 <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>
1012 <section remap="h5">
1013 <title>Description</title>
1014 <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>
1015 <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>
1016 <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>
1017 <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>
1019 <section remap="h5">
1020 <title>Options</title>
1021 <informaltable frame="all">
1023 <colspec colname="c1" colwidth="33*"/>
1024 <colspec colname="c2" colwidth="33*"/>
1025 <colspec colname="c3" colwidth="33*"/>
1029 <para><emphasis role="bold">Option</emphasis></para>
1032 <para><emphasis role="bold"> </emphasis></para>
1035 <para><emphasis role="bold">Description</emphasis></para>
1041 <entry nameend="c2" namest="c1">
1042 <para> <literal>-c|--chunksize</literal></para>
1045 <para> I/O chunk size in bytes (default value is 1048576).</para>
1049 <entry nameend="c2" namest="c1">
1050 <para> <literal>-f|--force</literal></para>
1053 <para> Forces the test to run without a confirmation that the device will be overwritten and all data will be permanently destroyed.</para>
1057 <entry nameend="c2" namest="c1">
1058 <para> <literal>-h|--help</literal></para>
1061 <para> Displays a brief help message.</para>
1065 <entry nameend="c2" namest="c1">
1066 <para> <literal>-o <replaceable>offset</replaceable></literal></para>
1069 <para> Offset (in kilobytes) of the start of the test (default value is 0).</para>
1073 <entry nameend="c2" namest="c1">
1074 <para> <literal>-l|--long</literal></para>
1077 <para> Runs a full check, writing and then reading and verifying every block on the disk.</para>
1081 <entry nameend="c2" namest="c1">
1082 <para> <literal>-p|--partial</literal></para>
1085 <para> Runs a partial check, only doing periodic checks across the device (1 GB steps).</para>
1089 <entry nameend="c2" namest="c1">
1090 <para> <literal>-r|--read</literal></para>
1093 <para> Runs the test in read (verify) mode only, after having previously run the test in <literal>-w</literal> mode.</para>
1097 <entry nameend="c2" namest="c1">
1098 <para> <literal>-t <replaceable>timestamp</replaceable></literal></para>
1101 <para> Sets the test start time as printed at the start of a previously-interrupted
1102 test to ensure that validation data is the same across the entire file system
1103 (default value is the current time()).</para>
1107 <entry nameend="c2" namest="c1">
1108 <para> <literal>-v|--verbose</literal></para>
1111 <para> Runs the test in verbose mode, listing each read and write operation.</para>
1115 <entry nameend="c2" namest="c1">
1116 <para> <literal>-w|--write</literal></para>
1119 <para> Runs the test in write (test-pattern) mode (default runs both read and write).</para>
1126 <section remap="h5">
1127 <title>Examples</title>
1128 <para>Runs a partial device verification on /dev/sda:</para>
1129 <screen>llverdev -v -p /dev/sda
1130 llverdev: permanently overwrite all data on /dev/sda (yes/no)? y
1131 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1132 Timestamp: 1009839028
1133 Current write offset: 4096 kB</screen>
1134 <para>Continues an interrupted verification at offset 4096kB from the start of the device, using the same timestamp as the previous run:</para>
1135 <screen>llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda
1136 llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
1137 Timestamp: 1009839028
1139 read complete </screen>
1142 <section xml:id="dbdoclet.50438219_64286">
1143 <title><indexterm><primary>lshowmount</primary></indexterm>
1145 <para>The lshowmount utility shows Lustre exports.</para>
1146 <section remap="h5">
1147 <title>Synopsis</title>
1148 <screen>lshowmount [-ehlv]</screen>
1150 <section remap="h5">
1151 <title>Description</title>
1152 <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>
1154 <section remap="h5">
1155 <title>Options</title>
1156 <informaltable frame="all">
1158 <colspec colname="c1" colwidth="50*"/>
1159 <colspec colname="c2" colwidth="50*"/>
1163 <para><emphasis role="bold">Option</emphasis></para>
1166 <para><emphasis role="bold">Description</emphasis></para>
1173 <para> <literal>-e|--enumerate</literal></para>
1176 <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>
1181 <para> <literal>-h|--help</literal></para>
1184 <para> Causes lshowmount to print out a usage message.</para>
1189 <para> <literal>-l|--lookup</literal></para>
1192 <para> Causes lshowmount to try to look up the hostname for NIDs that look like IP addresses.</para>
1197 <para> <literal>-v|--verbose</literal></para>
1200 <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>
1207 <section remap="h5">
1208 <title>Files</title>
1209 <screen>/proc/fs/lustre/mgs/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1210 /proc/fs/lustre/mds/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid
1211 /proc/fs/lustre/obdfilter/<replaceable>server</replaceable>/exports/<replaceable>uuid</replaceable>/nid</screen>
1214 <section xml:id="dbdoclet.50438219_90218">
1215 <title><indexterm><primary>lst</primary></indexterm>
1217 <para>The lst utility starts LNet self-test.</para>
1218 <section remap="h5">
1219 <title>Synopsis</title>
1220 <screen>lst</screen>
1222 <section remap="h5">
1223 <title>Description</title>
1224 <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>
1225 <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>
1226 <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>
1227 <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>
1229 <section remap="h5">
1230 <title>Modules</title>
1231 <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>
1232 <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>
1233 <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>
1235 <section remap="h5">
1236 <title>Utilities</title>
1237 <para>LNet self-test includes two user utilities, lst and lstclient.</para>
1238 <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>
1239 <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>
1240 <screen>lstclient -sesid CONSOLE_NID group NAME</screen>
1242 <section remap="h5">
1243 <title>Example Script</title>
1244 <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>
1246 export LST_SESSION=$$
1247 lst new_session read/write
1248 lst add_group servers 192.168.10.[8,10,12-16]@tcp
1249 lst add_group readers 192.168.1.[1-253/2]@o2ib
1250 lst add_group writers 192.168.1.[2-254/2]@o2ib
1251 lst add_batch bulk_rw
1252 lst add_test --batch bulk_rw --from readers --to servers brw read check\
1254 lst add_test --batch bulk_rw --from writers --to servers brw write chec\
1258 # display server stats for 30 seconds
1259 lst stat servers & sleep 30; kill $!
1261 lst end_session </screen>
1264 <section xml:id="dbdoclet.50438219_54734">
1265 <title><indexterm><primary>lustre_rmmod.sh</primary></indexterm>
1266 lustre_rmmod.sh</title>
1267 <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>
1269 <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>
1272 <section xml:id="dbdoclet.50438219_63667">
1273 <title><indexterm><primary>lustre_rsync</primary></indexterm>
1274 lustre_rsync</title>
1275 <para>The lustre_rsync utility synchronizes (replicates) a Lustre file system to a target file system.</para>
1276 <section remap="h5">
1277 <title>Synopsis</title>
1278 <screen>lustre_rsync --source|-s <replaceable>src</replaceable> --target|-t <replaceable>tgt</replaceable>
1279 --mdt|-m <replaceable>mdt</replaceable> [--user|-u <replaceable>userid</replaceable>]
1280 [--xattr|-x <replaceable>yes|no</replaceable>] [--verbose|-v]
1281 [--statuslog|-l <replaceable>log</replaceable>] [--dry-run] [--abort-on-err]
1283 lustre_rsync --statuslog|-l <replaceable>log</replaceable>
1285 lustre_rsync --statuslog|-l <replaceable>log</replaceable> --source|-s <replaceable>source</replaceable>
1286 --target|-t <replaceable>tgt</replaceable> --mdt|-m <replaceable>mdt</replaceable></screen>
1288 <section remap="h5">
1289 <title>Description</title>
1290 <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>
1291 <para>Before using lustre_rsync:</para>
1294 <para>A changelog user must be registered (see lctl (8) changelog_register)</para>
1297 <para>- AND -</para>
1300 <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>
1304 <section remap="h5">
1305 <title>Options</title>
1306 <informaltable frame="all">
1308 <colspec colname="c1" colwidth="50*"/>
1309 <colspec colname="c2" colwidth="50*"/>
1313 <para><emphasis role="bold">Option</emphasis></para>
1316 <para><emphasis role="bold">Description</emphasis></para>
1323 <para> <literal>--source=<replaceable>src</replaceable></literal></para>
1326 <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>
1331 <para> <literal>--target=<replaceable>tgt</replaceable></literal></para>
1334 <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>
1339 <para> <literal>--mdt=<replaceable>mdt</replaceable></literal></para>
1342 <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>
1347 <para> <literal>--user=<replaceable>userid</replaceable></literal></para>
1350 <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>
1355 <para> <literal>--statuslog=<replaceable>log</replaceable></literal></para>
1358 <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>
1363 <para> <literal>--xattr<replaceable>yes|no</replaceable></literal></para>
1366 <para> Specifies whether extended attributes (xattrs) are synchronized or not. The default is to synchronize extended attributes.</para>
1367 <para>NOTE: Disabling xattrs causes Lustre striping information not to be synchronized.</para>
1372 <para> <literal>--verbose</literal></para>
1375 <para> Produces a verbose output.</para>
1380 <para> <literal>--dry-run</literal></para>
1383 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1388 <para> <literal>--abort-on-err</literal></para>
1391 <para> Shows the output of lustre_rsync commands (copy, mkdir, etc.) on the target file system without actually executing them.</para>
1398 <section remap="h5">
1399 <title>Examples</title>
1400 <para>Register a changelog user for an MDT (e.g., MDT lustre-MDT0000).</para>
1402 $ MDS lctl changelog_register \
1403 --device lustre-MDT0000 -n
1405 <para>Synchronize/replicate a Lustre file system (/mnt/lustre) to a target file system (/mnt/target).</para>
1406 <screen>$ lustre_rsync --source=/mnt/lustre --target=/mnt/target \
1407 --mdt=lustre-MDT0000 --user=cl1 \
1408 --statuslog replicate.log --verbose
1409 Lustre filesystem: lustre
1410 MDT device: lustre-MDT0000
1414 Changelog registration: cl1
1415 Starting changelog record: 0
1417 lustre_rsync took 1 seconds
1418 Changelog records consumed: 22
1420 <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>
1421 <screen>$ lustre_rsync --statuslog replicate.log --verbose
1422 Replicating Lustre filesystem: lustre
1423 MDT device: lustre-MDT0000
1426 Statuslog: replicate.log
1427 Changelog registration: cl1
1428 Starting changelog record: 22
1430 lustre_rsync took 2 seconds
1431 Changelog records consumed: 42</screen>
1432 <para>Synchronize a Lustre file system (/mnt/lustre) to two target file systems (/mnt/target1 and /mnt/target2).</para>
1433 <screen>$ lustre_rsync --source=/mnt/lustre \
1434 --target=/mnt/target1 --target=/mnt/target2 \
1435 --mdt=lustre-MDT0000 --user=cl1
1436 --statuslog replicate.log</screen>
1438 <section remap="h5">
1439 <title>See Also</title>
1440 <para><xref linkend="dbdoclet.50438206_94597"/></para>
1443 <section xml:id="dbdoclet.50438219_75432">
1444 <title><indexterm><primary>mkfs.lustre</primary></indexterm>
1446 <para>The <literal>mkfs.lustre</literal> utility formats a disk for a Lustre service.</para>
1447 <section remap="h5">
1448 <title>Synopsis</title>
1449 <screen>mkfs.lustre <replaceable>target_type</replaceable> [options] <replaceable>device</replaceable></screen>
1450 <para>where <replaceable>target_type</replaceable> is one of the following:</para>
1451 <informaltable frame="all">
1453 <colspec colname="c1" colwidth="50*"/>
1454 <colspec colname="c2" colwidth="50*"/>
1458 <para><emphasis role="bold">Option</emphasis></para>
1461 <para><emphasis role="bold">Description</emphasis></para>
1468 <para> <literal>--ost</literal></para>
1471 <para> Object storage target (OST)</para>
1476 <para> <literal>--mdt</literal></para>
1479 <para> Metadata storage target (MDT)</para>
1484 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1487 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1492 <para> <literal>--mgs</literal></para>
1495 <para> Configuration management service (MGS), one per site. This service can be
1496 combined with one <literal>--mdt</literal> service by specifying both
1504 <section remap="h5">
1505 <title>Description</title>
1506 <para><literal>mkfs.lustre</literal> is used to format a disk device for use as part of a
1507 Lustre file system. After formatting, a disk can be mounted to start the Lustre service
1508 defined by this command.</para>
1509 <para>When the file system is created, parameters can simply be added as a
1510 <literal>--param</literal> option to the <literal>mkfs.lustre</literal> command. See <xref
1511 linkend="dbdoclet.50438194_17237"/>.</para>
1512 <informaltable frame="all">
1514 <colspec colname="c1" colwidth="1*"/>
1515 <colspec colname="c2" colwidth="1*"/>
1516 <colspec colname="c3" colwidth="3*"/>
1519 <entry nameend="c2" namest="c1">
1520 <para><emphasis role="bold">Option</emphasis></para>
1523 <para><emphasis role="bold">Description</emphasis></para>
1529 <entry nameend="c2" namest="c1">
1530 <para> <literal>--backfstype=<replaceable>fstype</replaceable></literal></para>
1533 <para> Forces a particular format for the backing file system such as ldiskfs (the default) or zfs.</para>
1537 <entry nameend="c2" namest="c1">
1538 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
1541 <para> Sets a user comment about this disk, ignored by the Lustre software.</para>
1545 <entry nameend="c2" namest="c1">
1546 <para> <literal>--device-size=<replaceable>#</replaceable>>KB</literal></para>
1549 <para>Sets the device size for loop devices.</para>
1553 <entry nameend="c2" namest="c1">
1554 <para> <literal>--dryrun</literal></para>
1557 <para>Only prints what would be done; it does not affect the disk.</para>
1561 <entry nameend="c2" namest="c1"
1562 ><literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
1563 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
1564 service nodes. The <literal>--servicenode</literal> option cannot be used with
1565 <literal>--failnode</literal> option. See <xref
1566 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
1567 more details.</entry>
1570 <entry nameend="c2" namest="c1">
1571 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
1574 <para>Sets the NID(s) of a failover service node for a primary server for a target.
1575 The <literal>--failnode</literal> option cannot be used with
1576 <literal>--servicenode</literal> option. See <xref
1577 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
1578 for more details.<note>
1579 <para>When the <literal>--failnode</literal> option is used, certain
1580 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
1581 linkend="dbdoclet.50438188_92688"/>).</para>
1586 <entry nameend="c2" namest="c1">
1587 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
1590 <para> The Lustre file system of which this service/node will be a part. The default
1591 file system name is <literal>lustre</literal>.</para>
1594 <para>The file system name is limited to 8 characters.</para>
1599 <entry nameend="c2" namest="c1">
1601 <literal>--index=<replaceable>index_number</replaceable></literal></para>
1604 <para>Specifies the OST or MDT number (0...N). This allows mapping between the OSS
1605 and MDS node and the device on which the OST or MDT is located.</para>
1609 <entry nameend="c2" namest="c1">
1610 <para> <literal>--mkfsoptions=<replaceable>opts</replaceable></literal></para>
1613 <para> Formats options for the backing file system. For example, ext3 options could be set here.</para>
1617 <entry nameend="c2" namest="c1">
1618 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
1621 <para> Sets the mount options used when the backing file system is mounted.</para>
1622 <warning><para>Unlike earlier versions of <literal>mkfs.lustre</literal>, this version completely replaces
1623 the default mount options with those specified on the command line, and issues a
1624 warning on stderr if any default mount options are omitted.</para></warning>
1625 <para>The defaults for ldiskfs are:</para>
1626 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
1627 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
1628 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
1629 <para>Use care when altering the default mount options.</para>
1633 <entry nameend="c2" namest="c1">
1634 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
1638 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
1642 <entry nameend="c2" namest="c1">
1643 <para> <literal>--mgsnode=<replaceable>nid,...</replaceable></literal></para>
1646 <para> Sets the NIDs of the MGS node, required for all targets other than the MGS.</para>
1650 <entry nameend="c2" namest="c1">
1651 <para> <literal>--param <replaceable>key</replaceable>=<replaceable>value</replaceable></literal></para>
1654 <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>
1659 <para>  </para>
1662 <para> <literal>--param sys.timeout=40</literal>></para>
1665 <para> System obd timeout.</para>
1670 <para>  </para>
1673 <para> <literal>--param lov.stripesize=2M</literal></para>
1676 <para> Default stripe size.</para>
1681 <para>  </para>
1684 <para> <literal>param lov.stripecount=2</literal></para>
1687 <para> Default stripe count.</para>
1692 <para>  </para>
1695 <para> <literal>--param failover.mode=failout</literal></para>
1698 <para> Returns errors instead of waiting for recovery.</para>
1702 <entry nameend="c2" namest="c1">
1703 <para> <literal>--quiet</literal></para>
1706 <para> Prints less information.</para>
1710 <entry nameend="c2" namest="c1">
1711 <para> <literal>--reformat</literal></para>
1714 <para> Reformats an existing Lustre disk.</para>
1718 <entry nameend="c2" namest="c1">
1719 <para> <literal>--stripe-count-hint=stripes</literal></para>
1722 <para> Used to optimize the MDT's inode size.</para>
1726 <entry nameend="c2" namest="c1">
1727 <para> <literal>--verbose</literal></para>
1730 <para> Prints more information.</para>
1737 <section remap="h5">
1738 <title>Examples</title>
1739 <para>Creates a combined MGS and MDT for file system <literal>testfs</literal> on, e.g., node <literal>cfs21</literal>:</para>
1740 <screen>mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1</screen>
1741 <para>Creates an OST for file system <literal>testfs</literal> on any node (using the above
1743 <screen>mkfs.lustre --fsname=testfs --mgsnode=cfs21@tcp0 --ost --index=0 /dev/sdb</screen>
1744 <para>Creates a standalone MGS on, e.g., node <literal>cfs22</literal>:</para>
1745 <screen>mkfs.lustre --mgs /dev/sda1</screen>
1746 <para>Creates an MDT for file system <literal>myfs1</literal> on any node (using the above MGS):</para>
1747 <screen>mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2</screen>
1749 <section remap="h5">
1750 <title>See Also</title>
1753 <para><xref linkend="dbdoclet.50438219_75432"/>mkfs.lustre, </para>
1756 <para><xref linkend="dbdoclet.50438219_12635"/>mount.lustre, </para>
1759 <para><xref linkend="dbdoclet.50438206_94597"/>lfs</para>
1764 <section xml:id="dbdoclet.50438219_12635">
1765 <title><indexterm><primary>mount.lustre</primary></indexterm>
1766 mount.lustre</title>
1767 <para>The mount.lustre utility starts a Lustre client or target service.</para>
1768 <section remap="h5">
1769 <title>Synopsis</title>
1770 <screen>mount -t lustre [-o options] device mountpoint
1773 <section remap="h5">
1774 <title>Description</title>
1775 <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>
1776 <para>There are two forms for the device option, depending on whether a client or a target service is started:</para>
1777 <informaltable frame="all">
1779 <colspec colname="c1" colwidth="50*"/>
1780 <colspec colname="c2" colwidth="50*"/>
1784 <para><emphasis role="bold">Option</emphasis></para>
1787 <para><emphasis role="bold">Description</emphasis></para>
1794 <para> <literal><replaceable>mgsname</replaceable>:/<replaceable>fsname</replaceable><replaceable>[/subdir]</replaceable></literal></para>
1797 <para> Mounts the Lustre file system named
1798 <replaceable>fsname</replaceable> (optionally starting at
1799 subdirectory <replaceable>subdir</replaceable> within the
1800 filesystem, if specified) on the client at the directory
1801 <replaceable>mountpoint</replaceable>, by contacting the Lustre
1802 Management Service at <replaceable>mgsname</replaceable>. The
1803 format for <replaceable>mgsname</replaceable> is defined below. A
1804 client file system can be listed in <literal>fstab(5)</literal>
1805 for automatic mount at boot time, is usable like any local file
1806 system, and provides a full POSIX standard-compliant interface.
1812 <para> <replaceable>block_device</replaceable></para>
1815 <para> Starts the target service defined by the
1816 <literal>mkfs.lustre(8)</literal> command on the physical disk
1817 <replaceable>block_device</replaceable>. The
1818 <replaceable>block_device</replaceable> may be specified using
1819 <literal>-L <replaceable>label</replaceable></literal> to find
1820 the first block device with that label (e.g.
1821 <literal>testfs-MDT0000</literal>), or by UUID using the
1822 <literal>-U <replaceable>uuid</replaceable></literal> option.
1823 Care should be taken if there is a device-level backup of the
1824 target filesystem on the same node, which would have a
1825 duplicate label and UUID if it has not been changed with
1826 <literal>tune2fs(8)</literal> or similar. The mounted target
1827 service filesystem mounted at
1828 <replaceable>mountpoint</replaceable> is only useful for
1829 <literal>df(1)</literal> operations and appears in
1830 <literal>/proc/mounts</literal> to show the device is in use.
1838 <section remap="h5">
1839 <title>Options</title>
1840 <informaltable frame="all">
1842 <colspec colname="c1" colwidth="50*"/>
1843 <colspec colname="c2" colwidth="50*"/>
1847 <para><emphasis role="bold">Option</emphasis></para>
1850 <para><emphasis role="bold">Description</emphasis></para>
1857 <para> <literal>mgsname=<replaceable>mgsnode</replaceable>[:<replaceable>mgsnode</replaceable>]</literal></para>
1860 <para><replaceable>mgsname</replaceable> is a colon-separated
1861 list of <replaceable>mgsnode</replaceable> names where the MGS
1862 service may run. Multiple <replaceable>mgsnode</replaceable>
1863 values can be specified if the MGS service is configured for
1864 HA failover and may be running on any one of the nodes.
1870 <para> <literal>mgsnode=<replaceable>mgsnid</replaceable>[,<replaceable>mgsnid</replaceable>]</literal></para>
1873 <para> Each <replaceable>mgsnode</replaceable> may specify a
1874 comma-separated list of NIDs, if there are different LNet
1875 interfaces for that <literal>mgsnode</literal>.
1881 <para> <literal>mgssec=<replaceable>flavor</replaceable></literal></para>
1884 <para>Specifies the encryption flavor for the initial network
1885 RPC connection to the MGS. Non-security flavors are:
1886 <literal>null</literal>, <literal>plain</literal>, and
1887 <literal>gssnull</literal>, which respectively disable, or
1888 have no encryption or integrity features for testing purposes.
1889 Kerberos flavors are: <literal>krb5n</literal>,
1890 <literal>krb5a</literal>, <literal>krb5i</literal>, and
1891 <literal>krb5p</literal>. Shared-secret key flavors are:
1892 <literal>skn</literal>, <literal>ska</literal>,
1893 <literal>ski</literal>, and <literal>skpi</literal>, see the
1894 <xref linkend="lustressk"/> for more details. The security
1895 flavor for client-to-server connections is specified in the
1896 filesystem configuration that the client fetches from the MGS.
1902 <para> <literal>skpath=<replaceable>file|directory</replaceable></literal></para>
1905 <para condition='l29'>
1906 Path to a file or directory with the keyfile(s) to load for
1907 this mount command. Keys are inserted into the
1908 <literal>KEY_SPEC_SESSION_KEYRING</literal> keyring in the
1909 kernel with a description containing
1910 <literal>lustre:</literal> and a suffix which depends on
1911 whether the context of the mount command is for an MGS,
1918 <para> <literal>exclude=<replaceable>ostlist</replaceable></literal></para>
1921 <para>Starts a client or MDT with a colon-separated list of
1922 known inactive OSTs that it will not try to connect to.</para>
1928 <para>In addition to the standard mount(8) options, Lustre understands
1929 the following client-specific options:</para>
1930 <informaltable frame="all">
1932 <colspec colname="c1" colwidth="50*"/>
1933 <colspec colname="c2" colwidth="50*"/>
1937 <para><emphasis role="bold">Option</emphasis></para>
1940 <para><emphasis role="bold">Description</emphasis></para>
1947 <para><literal>always_ping</literal></para>
1950 <para condition='l29'>The client will periodically ping the server when it is
1951 idle, even if the server <literal>ptlrpc</literal> module
1952 is configured with the <literal>suppress_pings</literal>
1953 option. This allows clients to reliably use the filesystem
1954 even if they are not part of an external client health
1955 monitoring mechanism.
1961 <para> <literal>flock</literal></para>
1964 <para>Enables advisory file locking support between
1965 participating applications using the <literal>flock(2)</literal>
1966 system call. This causes file locking to be coherent across all
1967 client nodes also using this mount option. This is useful if
1968 applications need coherent userspace file locking across
1969 multiple client nodes, but also imposes communications overhead
1970 in order to maintain locking consistency between client nodes.
1976 <para> <literal>localflock</literal></para>
1979 <para>Enables client-local <literal>flock(2)</literal> support,
1980 using only client-local advisory file locking. This is faster
1981 than using the global <literal>flock</literal> option, and can
1982 be used for applications that depend on functioning
1983 <literal>flock(2)</literal> but run only on a single node.
1984 It has minimal overhead using only the Linux kernel's locks.
1990 <para> <literal>noflock</literal></para>
1993 <para>Disables <literal>flock(2)</literal> support entirely,
1994 and is the default option. Applications calling
1995 <literal>flock(2)</literal> get an
1996 <literal>ENOSYS</literal> error. It is up to the administrator
1997 to choose either the <literal>localflock</literal> or
1998 <literal>flock</literal> mount option based on their
1999 requirements. It is possible to mount clients with different
2000 options, and only those mounted with <literal>flock</literal>
2001 will be coherent amongst each other.
2007 <para> <literal>lazystatfs</literal></para>
2010 <para>Allows <literal>statfs(2)</literal> (as used by
2011 <literal>df(1)</literal> and <literal>lfs-df(1)</literal>) to
2012 return even if some OST or MDT is unresponsive or has been
2013 temporarily or permanently disabled in the configuration.
2014 This avoids blocking until all of the targets are available.
2015 This is the default behavior since Lustre 2.9.0.
2021 <para> <literal>nolazystatfs</literal></para>
2024 <para>Requires that <literal>statfs(2)</literal> block until all
2025 OSTs and MDTs are available and have returned space usage.
2031 <para> <literal>user_xattr</literal></para>
2034 <para>Enables get/set of extended attributes by regular users
2035 in the <literal>user.*</literal> namespace. See the
2036 <literal>attr(5)</literal> manual page for more details.
2042 <para> <literal>nouser_xattr</literal></para>
2045 <para>Disables use of extended attributes in the
2046 <literal>user.*</literal> namespace by regular users. Root
2047 and system processes can still use extended attributes.</para>
2052 <para> <literal>verbose</literal></para>
2055 <para> Enable extra mount/umount console messages.</para>
2060 <para> <literal>noverbose</literal></para>
2063 <para> Disable mount/umount console messages.</para>
2068 <para> <literal>user_fid2path</literal></para>
2071 <para>Enable FID-to-path translation by regular users.
2073 <note><para>This option allows a potential security hole because
2074 it allows regular users direct access to a file by its Lustre
2075 File ID. This bypasses POSIX path-based permission checks,
2076 and could allow the user to access a file in a directory that
2077 they do not have access to. Regular POSIX file mode and ACL
2078 permission checks are still performed on the file itself, so
2079 users cannot access a file to which they have no permission.
2085 <para> <literal>nouser_fid2path</literal></para>
2088 <para> Disable FID to path translation by
2089 regular users. Root and processes with
2090 <literal>CAP_DAC_READ_SEARCH</literal> can still perform FID
2091 to path translation.
2098 <para>In addition to the standard mount options and backing disk type
2099 (e.g. ldiskfs) options, Lustre understands the following server-specific
2100 mount options:</para>
2101 <informaltable frame="all">
2103 <colspec colname="c1" colwidth="50*"/>
2104 <colspec colname="c2" colwidth="50*"/>
2108 <para><emphasis role="bold">Option</emphasis></para>
2111 <para><emphasis role="bold">Description</emphasis></para>
2118 <para> <literal>nosvc</literal></para>
2121 <para> Starts the MGC (and MGS, if co-located) for a target service, not the actual service.</para>
2126 <para> <literal>nomgs</literal></para>
2129 <para> Starts only the MDT (with a co-located MGS), without starting the MGS.</para>
2134 <para> <literal>abort_recov</literal></para>
2137 <para> Aborts client recovery on that server and starts the target service immediately.</para>
2142 <para> <literal>max_sectors_kb=<replaceable>KB</replaceable></literal></para>
2145 <para condition='l2A'>Sets the block device parameter
2146 <literal>max_sectors_kb</literal> limit for the MDT or OST
2147 target being mounted to specified maximum number of kilobytes.
2148 When <literal>max_sectors_kb</literal> isn't specified as a
2149 mount option, it will automatically be set to the
2150 <literal>max_hw_sectors_kb</literal> (up to a maximum of 16MiB)
2151 for that block device. This default behavior is suited for
2152 most users. When <literal>max_sectors_kb=0</literal> is used,
2153 the current value for this tunable will be kept.
2159 <para> <literal>md_stripe_cache_size</literal></para>
2162 <para> Sets the stripe cache size for server-side disk with a striped RAID configuration.</para>
2167 <para> <literal>recovery_time_soft=<replaceable>timeout</replaceable></literal></para>
2170 <para>Allows <literal>timeout</literal> seconds for clients to
2171 reconnect for recovery after a server crash. This timeout is
2172 incrementally extended if it is about to expire and the server
2173 is still handling new connections from recoverable clients.
2175 <para>The default soft recovery timeout is 3 times the value
2176 of the Lustre timeout parameter (see
2177 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2178 timeout is 100 seconds, which would make the soft recovery
2179 timeout default to 300 seconds (5 minutes). The soft recovery
2180 timeout is set at mount time and will not change if the Lustre
2181 timeout is changed after mount time.
2187 <para> <literal>recovery_time_hard=<replaceable>timeout</replaceable></literal></para>
2190 <para>The server is allowed to incrementally extend its timeout
2191 up to a hard maximum of <replaceable>timeout</replaceable>
2194 <para>The default hard recovery timeout is 9 times the value
2195 of the Lustre timeout parameter (see
2196 <xref linkend="section_c24_nt5_dl"/>). The default Lustre
2197 timeout is 100 seconds, which would make the hard recovery
2198 timeout default to 900 seconds (15 minutes). The hard recovery
2199 timeout is set at mount time and will not change if the Lustre
2200 timeout is changed after mount time.
2206 <para> <literal>noscrub</literal></para>
2209 <para>Typically the MDT will detect restoration from a
2210 file-level backup during mount. This mount option prevents
2211 the OI Scrub from starting automatically when the MDT is
2212 mounted. Manually starting LFSCK after mounting provides finer
2213 control over the starting conditions. This mount option also
2214 prevents OI scrub from occurring automatically when OI
2215 inconsistency is detected (see
2216 <xref linkend="dbdoclet.lfsck_auto_scrub"/>).
2224 <section remap="h5">
2225 <title>Examples</title>
2226 <para>Starts a client for the Lustre file system
2227 <replaceable>chipfs</replaceable> at mount point
2228 <replaceable>/mnt/chip</replaceable>. The Management Service is running on
2229 a node reachable from this client via the cfs21@tcp0 NID.</para>
2230 <screen>mount -t lustre cfs21@tcp0:/chipfs /mnt/chip</screen>
2231 <para condition='l29'>Similar to the above example, but mounting a
2232 subdirectory under <replaceable>chipfs</replaceable> as a fileset.
2233 <screen>mount -t lustre cfs21@tcp0:/chipfs/v1_0 /mnt/chipv1_0</screen>
2235 <para>Starts the Lustre metadata target service from /dev/sda1 on mount point /mnt/test/mdt.</para>
2236 <screen>mount -t lustre /dev/sda1 /mnt/test/mdt</screen>
2237 <para>Starts the testfs-MDT0000 service (using the disk label), but aborts the recovery process.</para>
2238 <screen>mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt</screen>
2240 <section remap="h5">
2241 <title>See Also</title>
2244 <para> <xref linkend="dbdoclet.50438219_75432"/></para>
2247 <para> <xref linkend="dbdoclet.50438219_39574"/></para>
2250 <para> <xref linkend="dbdoclet.50438219_38274"/></para>
2253 <para> <xref linkend="dbdoclet.50438206_94597"/></para>
2258 <section xml:id="dbdoclet.50438219_82679">
2259 <title><indexterm><primary>plot-llstat</primary></indexterm>
2261 <para>The plot-llstat utility plots Lustre statistics.</para>
2262 <section remap="h5">
2263 <title>Synopsis</title>
2264 <screen>plot-llstat results_filename [parameter_index]
2267 <section remap="h5">
2268 <title>Description</title>
2269 <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>
2270 <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>
2271 <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>
2273 <section remap="h5">
2274 <title>Options</title>
2275 <informaltable frame="all">
2277 <colspec colname="c1" colwidth="50*"/>
2278 <colspec colname="c2" colwidth="50*"/>
2282 <para><emphasis role="bold">Option</emphasis></para>
2285 <para><emphasis role="bold">Description</emphasis></para>
2292 <para> <literal>results_filename</literal></para>
2295 <para> Output generated by plot-llstat</para>
2300 <para> <literal>parameter_index</literal></para>
2304 <para> Value of parameter_index can be:</para>
2305 <para> 1 - count per interval</para>
2306 <para> 2 - count per second (default setting)</para>
2307 <para> 3 - total count</para>
2314 <section remap="h5">
2315 <title>Example</title>
2316 <screen>llstat -i2 -g -c lustre-OST0000 > log
2317 plot-llstat log 3</screen>
2320 <section xml:id="dbdoclet.50438219_51496">
2321 <title><indexterm><primary>routerstat</primary></indexterm>
2323 <para>The routerstat utility prints Lustre router statistics.</para>
2324 <section remap="h5">
2325 <title>Synopsis</title>
2326 <screen>routerstat [<replaceable>interval</replaceable>]</screen>
2328 <section remap="h5">
2329 <title>Description</title>
2330 <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>
2332 <section remap="h5">
2333 <title>Output</title>
2334 <para>The routerstat output includes the following fields:</para>
2335 <informaltable frame="all">
2337 <colspec colname="c1" colwidth="50*"/>
2338 <colspec colname="c2" colwidth="50*"/>
2342 <para><emphasis role="bold">Output</emphasis></para>
2345 <para><emphasis role="bold">Description</emphasis></para>
2352 <para> <literal>M</literal></para>
2355 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2360 <para> <literal>E</literal></para>
2363 <para> Number of LNet errors</para>
2368 <para> <literal>S</literal></para>
2371 <para> Total size (length) of messages sent in bytes/ Number of messages sent</para>
2376 <para> <literal>R</literal></para>
2379 <para> Total size (length) of messages received in bytes/ Number of messages received</para>
2384 <para> <literal>F</literal></para>
2387 <para> Total size (length) of messages routed in bytes/ Number of messages routed</para>
2392 <para> <literal>D</literal></para>
2395 <para> Total size (length) of messages dropped in bytes/ Number of messages dropped</para>
2401 <para>When an <literal><replaceable>interval</replaceable></literal> is specified, additional lines of statistics are printed including the following fields:</para>
2402 <informaltable frame="all">
2404 <colspec colname="c1" colwidth="50*"/>
2405 <colspec colname="c2" colwidth="50*"/>
2409 <para><emphasis role="bold">Output</emphasis></para>
2412 <para><emphasis role="bold">Description</emphasis></para>
2419 <para> <literal>M</literal></para>
2422 <para> Number of messages currently being processed by LNet (The maximum number of messages ever processed by LNet concurrently)</para>
2427 <para> <literal>E</literal></para>
2430 <para> Number of LNet errors per second</para>
2435 <para> <literal>S</literal></para>
2438 <para> Rate of data sent in Mbytes per second/ Count of messages sent per second</para>
2443 <para> <literal>R</literal></para>
2446 <para> Rate of data received in Mbytes per second/ Count of messages received per second</para>
2451 <para> <literal>F</literal></para>
2454 <para> Rate of data routed in Mbytes per second/ Count of messages routed per second</para>
2459 <para> <literal>D</literal></para>
2462 <para> Rate of data dropped in Mbytes per second/ Count of messages dropped per second</para>
2469 <section remap="h5">
2470 <title>Example</title>
2471 <screen># routerstat 1
2472 M 0(13) E 0 S 117379184/4250 R 878480/4356 F 0/0 D 0/0
2473 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2474 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2475 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2476 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2477 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2478 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2479 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2480 M 0( 13) E 0 S 8.00/ 8 R 0.00/ 16 F 0.00/ 0 D 0.00/0
2481 M 0( 13) E 0 S 7.00/ 7 R 0.00/ 14 F 0.00/ 0 D 0.00/0
2484 <section remap="h5">
2485 <title>Files</title>
2486 <para>The routerstat utility extracts statistics data from:</para>
2487 <screen>/proc/sys/lnet/stats</screen>
2490 <section xml:id="dbdoclet.50438219_39574">
2491 <title><indexterm><primary>tunefs.lustre</primary></indexterm>
2492 tunefs.lustre</title>
2493 <para>The tunefs.lustre utility modifies configuration information on a Lustre target disk.</para>
2494 <section remap="h5">
2495 <title>Synopsis</title>
2496 <screen>tunefs.lustre [options] <replaceable>/dev/device</replaceable></screen>
2498 <section remap="h5">
2499 <title>Description</title>
2500 <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>
2502 <para>Changes made here affect a file system only when the target is mounted the next time.</para>
2504 <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>
2505 <screen>$ tunefs.lustre --erase-params --param=<replaceable>new_parameters</replaceable> </screen>
2506 <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>
2507 <screen>$ tunefs.lustre --param mdt.identity_upcall=NONE /dev/sda1</screen>
2509 <section remap="h5">
2510 <title>Options</title>
2511 <para>The tunefs.lustre options are listed and explained below.</para>
2512 <informaltable frame="all">
2514 <colspec colname="c1" colwidth="50*"/>
2515 <colspec colname="c2" colwidth="50*"/>
2519 <para><emphasis role="bold">Option</emphasis></para>
2522 <para><emphasis role="bold">Description</emphasis></para>
2529 <para> <literal>--comment=<replaceable>comment</replaceable></literal></para>
2532 <para> Sets a user comment about this disk, ignored by Lustre.</para>
2537 <para> <literal>--dryrun</literal></para>
2540 <para> Only prints what would be done; does not affect the disk.</para>
2545 <para> <literal>--erase-params</literal></para>
2548 <para> Removes all previous parameter information.</para>
2553 <literal>--servicenode=<replaceable>nid,...</replaceable></literal></entry>
2554 <entry>Sets the NID(s) of all service nodes, including primary and failover partner
2555 service nodes. The <literal>--servicenode</literal> option cannot be used with
2556 <literal>--failnode</literal> option. See <xref
2557 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/> for
2558 more details.</entry>
2562 <para> <literal>--failnode=<replaceable>nid,...</replaceable></literal></para>
2565 <para>Sets the NID(s) of a failover service node for a primary server for a target.
2566 The <literal>--failnode</literal> option cannot be used with
2567 <literal>--servicenode</literal> option. See <xref
2568 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"/>
2569 for more details.<note>
2570 <para>When the <literal>--failnode</literal> option is used, certain
2571 restrictions apply (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
2572 linkend="dbdoclet.50438188_92688"/>).</para>
2578 <para> <literal>--fsname=<replaceable>filesystem_name</replaceable></literal></para>
2581 <para> The Lustre file system of which this service will be a part. The default file
2582 system name is <literal>lustre</literal>.</para>
2587 <para> <literal>--index=<replaceable>index</replaceable></literal></para>
2590 <para> Forces a particular OST or MDT index.</para>
2595 <para> <literal>--mountfsoptions=<replaceable>opts</replaceable></literal></para>
2598 <para> Sets the mount options used when the backing file system is mounted.</para>
2599 <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>
2600 <para>The defaults for ldiskfs are:</para>
2601 <para>MGS/MDT: <literal>errors=remount-ro,iopen_nopriv,user_xattr</literal></para>
2602 <para>OST: <literal>errors=remount-ro,extents,mballoc</literal></para>
2603 <para condition='l25'>OST: <literal>errors=remount-ro</literal></para>
2604 <para>Do not alter the default mount options unless you know what you are doing.</para>
2609 <para> <literal>--network=<replaceable>net,...</replaceable></literal></para>
2612 <para> Network(s) to which to restrict this OST/MDT. This option can be repeated as necessary.</para>
2617 <para> <literal>--mgs</literal></para>
2620 <para> Adds a configuration management service to this target.</para>
2625 <para> <literal>--msgnode=<replaceable>nid,...</replaceable></literal></para>
2628 <para> Sets the NID(s) of the MGS node; required for all targets other than the MGS.</para>
2633 <para> <literal>--nomgs</literal></para>
2636 <para> Removes a configuration management service to this target.</para>
2641 <para> <literal>--quiet</literal></para>
2644 <para> Prints less information.</para>
2649 <para> <literal>--verbose</literal></para>
2652 <para> Prints more information.</para>
2657 <para> <literal>--writeconf</literal></para>
2660 <para> Erases all configuration logs for the file system to which this MDT belongs,
2661 and regenerates them. This is dangerous operation. All clients must be unmounted
2662 and servers for this file system should be stopped. All targets (OSTs/MDTs) must
2663 then be restarted to regenerate the logs. No clients should be started until all
2664 targets have restarted.</para>
2665 <para>The correct order of operations is:</para>
2668 <para>Unmount all clients on the file system</para>
2671 <para>Unmount the MDT and all OSTs on the file system</para>
2674 <para>Run <literal>tunefs.lustre --writeconf
2675 <replaceable>device</replaceable></literal> on every server</para>
2678 <para>Mount the MDT and OSTs</para>
2681 <para>Mount the clients</para>
2690 <section remap="h5">
2691 <title>Examples</title>
2692 <para>Change the MGS's NID address. (This should be done on each target disk, since they should all contact the same MGS.)</para>
2693 <screen>tunefs.lustre --erase-param --mgsnode=<replaceable>new_nid</replaceable> --writeconf /dev/sda</screen>
2694 <para>Add a failover NID location for this target.</para>
2695 <screen>tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda </screen>
2697 <section remap="h5">
2698 <title>See Also</title>
2701 <para><xref linkend="dbdoclet.50438219_75432"/></para>
2704 <para><xref linkend="dbdoclet.50438219_12635"/></para>
2707 <para><xref linkend="dbdoclet.50438219_38274"/></para>
2710 <para><xref linkend="dbdoclet.50438206_94597"/></para>
2715 <section xml:id="dbdoclet.50438219_99928">
2716 <title><indexterm><primary>utilities</primary><secondary>system config</secondary></indexterm>
2717 Additional System Configuration Utilities</title>
2718 <para>This section describes additional system configuration utilities for Lustre.</para>
2719 <section remap="h3">
2720 <title><indexterm><primary>utilities</primary><secondary>application profiling</secondary></indexterm>
2721 Application Profiling Utilities</title>
2722 <para>The following utilities are located in /usr/bin.</para>
2723 <para><literal>lustre_req_history.sh</literal></para>
2724 <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>
2726 <section remap="h3">
2727 <title>More /proc Statistics for Application Profiling</title>
2728 <para>The following utilities provide additional statistics.</para>
2729 <para><literal>vfs_ops_stats</literal></para>
2730 <para>The client vfs_ops_stats utility tracks Linux VFS operation calls into Lustre for a single PID, PPID, GID or everything.</para>
2731 <screen>/proc/fs/lustre/llite/*/vfs_ops_stats
2732 /proc/fs/lustre/llite/*/vfs_track_[pid|ppid|gid]
2734 <para><literal>extents_stats</literal></para>
2735 <para>The client extents_stats utility shows the size distribution of I/O calls from the client (cumulative and by process).</para>
2736 <screen>/proc/fs/lustre/llite/*/extents_stats, extents_stats_per_process
2738 <para><literal>offset_stats</literal></para>
2739 <para>The client offset_stats utility shows the read/write seek activity of a client by offsets and ranges.</para>
2740 <screen>/proc/fs/lustre/llite/*/offset_stats
2742 <para>Lustre includes per-client and improved MDT statistics:</para>
2745 <para> Per-client statistics tracked on the servers</para>
2748 <para>Each MDS and OSS now tracks LDLM and operations statistics for
2749 every connected client, for comparisons and simpler collection of
2750 distributed job statistics.</para>
2751 <screen>/proc/fs/lustre/mds|obdfilter/*/exports/
2755 <para> Improved MDT statistics</para>
2758 <para>More detailed MDT operations statistics are collected for better
2760 <screen>/proc/fs/lustre/mdt/*/md_stats
2763 <section remap="h3">
2764 <title><indexterm><primary>utilities</primary><secondary>debugging</secondary></indexterm><indexterm><primary>debug</primary><secondary>utilities</secondary></indexterm>
2766 Testing / Debugging Utilities</title>
2767 <para>Lustre offers the following test and debugging utilities.</para>
2768 <section remap="h5">
2769 <title><indexterm><primary>lr_reader</primary></indexterm>
2771 <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>
2772 <para>The following utilities are part of the Lustre I/O kit. For more information, see <xref linkend="benchmarkingtests"/>.</para>
2774 <section remap="h5">
2776 <primary>sgpdd-survey</primary>
2777 </indexterm> sgpdd-survey</title>
2778 <para>The <literal>sgpdd-survey</literal> utility tests 'bare metal' performance,
2779 bypassing as much of the kernel as possible. The <literal>sgpdd-survey</literal> tool does
2780 not require Lustre, but it does require the sgp_dd package.</para>
2782 <para>The <literal>sgpdd-survey</literal> utility erases all data on the device.</para>
2785 <section remap="h5">
2787 <primary>obdfilter-survey</primary>
2788 </indexterm>obdfilter-survey</title>
2789 <para>The <literal>obdfilter-survey</literal> utility is a shell script that tests
2790 performance of isolated OSTS, the network via echo clients, and an end-to-end test.</para>
2792 <section remap="h5">
2793 <title><indexterm><primary>ior-survey</primary></indexterm>ior-survey</title>
2794 <para>The ior-survey utility is a script used to run the IOR benchmark. Lustre includes IOR version 2.8.6.</para>
2796 <section remap="h5">
2798 <primary>ost-survey</primary>
2799 </indexterm>ost-survey</title>
2800 <para>The <literal>ost-survey</literal> utility is an OST performance survey that tests
2801 client-to-disk performance of the individual OSTs in a Lustre file system.</para>
2803 <section remap="h5">
2804 <title><indexterm><primary>stats-collect</primary></indexterm>stats-collect</title>
2805 <para>The stats-collect utility contains scripts used to collect application profiling information from Lustre clients and servers.</para>
2808 <section remap="h3" condition='l29' xml:id="SystemConfigurationUtilities.fileset">
2809 <title><indexterm><primary>fileset</primary></indexterm>Fileset Feature</title>
2810 <para> With the fileset feature, Lustre now provides subdirectory mount
2811 support. Subdirectory mounts, also referred to as filesets, allow a
2812 client to mount a child directory of a parent filesystem, thereby limiting
2813 the filesystem namespace visibility on a specific client. A common use
2814 case is for a client to use a subdirectory mount when there is a desire to
2815 limit the visibility of the entire filesystem namesapce to aid in the
2816 prevention of accidental file deletions outside of the subdirectory
2818 <para>It is important to note that invocation of the subdirectory mount is
2819 voluntary by the client and not does prevent access to files that are
2820 visible in multiple subdirectory mounts via hard links. Furthermore, it
2821 does not prevent the client from subsequently mounting the whole file
2822 system without a subdirectory being specified.</para>
2823 <figure xml:id="understandinglustre.fig.fileset">
2826 <primary>Lustre</primary>
2827 <secondary>fileset</secondary>
2828 </indexterm>Lustre fileset</title>
2831 <imagedata scalefit="1" width="100%"
2832 fileref="./figures/fileset.png" />
2835 <phrase>Lustre file system fileset feature</phrase>
2839 <section remap="h4">
2840 <title>Examples</title>
2841 <para>The following example will mount the
2842 <literal>chipfs</literal> filesystem on client1 and create a
2843 subdirectory <literal>v1_1</literal> within that filesystem. Client2
2844 will then mount only the <literal>v1_1</literal> subdirectory as a
2845 fileset, thereby limiting access to anything else in the
2846 <literal>chipfs</literal> filesystem from client2.</para>
2847 <screen>client1# mount -t lustre mgs@tcp:/chipfs /mnt/chip
2848 client1# mkdir /mnt/chip/v1_1</screen>
2849 <screen>client2# mount -t lustre mgs@tcp:/chipfs/v1_1 /mnt/chipv1_1</screen>
2850 <para>You can check the created mounts in /etc/mtab. It should look like
2851 the following:</para>
2852 <screen><replaceable>client1</replaceable>
2853 mds@tcp0:/chipfs/ /mnt/chip lustre rw 0 0
2855 <replaceable>client2</replaceable>
2856 mds@tcp0:/chipfs/v1_1 /mnt/chipv1_1 lustre rw 0 0</screen>
2857 <para>Create a directory under the /mnt/chip mount, and get its FID</para>
2858 <screen>client1# mkdir /mnt/chip/v1_2
2859 client1# lfs path2fid /mnt/chip/v1_2
2860 [0x200000400:0x2:0x0]
2862 <para>If you try resolve the FID of the <literal>/mnt/chip/v1_2</literal>
2863 path (as created in the example above) on client2, an error will be returned
2864 as the FID can not be resolved on client2 since it is not part of the
2865 mounted fileset on that client. Recall that the fileset on client2 mounted
2866 the <literal>v1_1</literal> subdirectory beneath the top level
2867 <literal>chipfs</literal> filesystem.
2869 <screen>client2# lfs fid2path /mnt/chip/v1_2 [0x200000400:0x2:0x0]
2870 fid2path: error on FID [0x200000400:0x2:0x0]: No such file or directory</screen>
2871 <para>Subdirectory mounts do not have the <literal>.lustre</literal>
2872 pseudo directory, which prevents clients from opening or accessing files
2874 <screen>client1# ls /mnt/chipfs/.lustre
2875 fid lost+found</screen>
2876 <screen>client2# ls /mnt/chipv1_1/.lustre
2877 ls: cannot access /mnt/chipv1_1/.lustre: No such file or directory
2883 <!--vim:expandtab:shiftwidth=2:tabstop=8:-->