<para>To mount a client or an MDT with one or more inactive OSTs, run commands similar to this:</para>
<screen>client# mount -o exclude=testfs-OST0000 -t lustre \
uml1:/testfs /mnt/testfs
- client# cat /proc/fs/lustre/lov/testfs-clilov-*/target_obd</screen>
- <para>To activate an inactive OST on a live client or MDT, use the <literal>lctl activate</literal> command on the OSC device. For example:</para>
+ client# lctl get_param lov.testfs-clilov-*.target_obd</screen>
+ <para>To activate an inactive OST on a live client or MDT, use the
+ <literal>lctl activate</literal> command on the OSC device. For example:</para>
<screen>lctl --device 7 activate</screen>
<note>
- <para>A colon-separated list can also be specified. For example, <literal>exclude=testfs-OST0000:testfs-OST0001</literal>.</para>
+ <para>A colon-separated list can also be specified. For example,
+ <literal>exclude=testfs-OST0000:testfs-OST0001</literal>.</para>
</note>
</section>
<section xml:id="dbdoclet.50438199_15240">
<title><indexterm><primary>maintenance</primary><secondary>finding nodes</secondary></indexterm>
Finding Nodes in the Lustre File System</title>
- <para>There may be situations in which you need to find all nodes in your Lustre file system or get the names of all OSTs.</para>
+ <para>There may be situations in which you need to find all nodes in
+ your Lustre file system or get the names of all OSTs.</para>
<para>To get a list of all Lustre nodes, run this command on the MGS:</para>
- <screen># cat /proc/fs/lustre/mgs/MGS/live/*</screen>
+ <screen># lctl get_param mgs.MGS.live.*</screen>
<note>
- <para>This command must be run on the MGS.
- </para>
+ <para>This command must be run on the MGS.</para>
</note>
- <para>In this example, file system <literal>testfs</literal> has three nodes,
- <literal>testfs-MDT0000</literal>, <literal>testfs-OST0000</literal>, and
- <literal>testfs-OST0001</literal>.</para>
- <screen>cfs21:/tmp# cat /proc/fs/lustre/mgs/MGS/live/*
+ <para>In this example, file system <literal>testfs</literal> has three
+ nodes, <literal>testfs-MDT0000</literal>,
+ <literal>testfs-OST0000</literal>, and
+ <literal>testfs-OST0001</literal>.</para>
+ <screen>mgs:/root# lctl get_param mgs.MGS.live.*
fsname: testfs
flags: 0x0 gen: 26
testfs-MDT0000
testfs-OST0000
testfs-OST0001 </screen>
<para>To get the names of all OSTs, run this command on the MDS:</para>
- <screen># cat /proc/fs/lustre/lov/<replaceable>fsname</replaceable>-mdtlov/target_obd </screen>
+ <screen>mds:/root# lctl get_param lov.*-mdtlov.target_obd </screen>
<note>
- <para>This command must be run on the MDS.
- </para>
+ <para>This command must be run on the MDS.</para>
</note>
- <para>In this example, there are two OSTs, testfs-OST0000 and testfs-OST0001, which are both
- active.</para>
- <screen>cfs21:/tmp# cat /proc/fs/lustre/lov/testfs-mdtlov/target_obd
+ <para>In this example, there are two OSTs, testfs-OST0000 and
+ testfs-OST0001, which are both active.</para>
+ <screen>mgs:/root# lctl get_param lov.testfs-mdtlov.target_obd
0: testfs-OST0000_UUID ACTIVE
1: testfs-OST0001_UUID ACTIVE </screen>
</section>
<para>Start the MGS.</para>
<screen>mgs# mount -t lustre <replaceable>/dev/mgs_device</replaceable> <replaceable>/mgs_mount_point</replaceable></screen>
<para>Check to make sure it knows about all your file system</para>
- <screen>cat /proc/fs/lustre/mgs/MGS/filesystems</screen>
+ <screen>mgs:/root# lctl get_param mgs.MGS.filesystems</screen>
</listitem>
<listitem>
<para>Remove the MGS option from the MDT, and set the new MGS nid.</para>
<listitem>
<para>Start the MDT.</para>
<screen>mds# mount -t lustre <replaceable>/dev/mdt_device /mdt_mount_point</replaceable></screen>
- <para>Check to make sure the MGS configuration look right</para>
- <screen>mds# cat /proc/fs/lustre/mgs/MGS/live/<replaceable>filesystem_name</replaceable></screen>
+ <para>Check to make sure the MGS configuration looks right:</para>
+ <screen>mgs# lctl get_param mgs.MGS.live.<replaceable>filesystem_name</replaceable></screen>
</listitem>
</orderedlist>
</section>
<?xml version='1.0' encoding='UTF-8'?>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0"
xml:lang="en-US" xml:id="lustreproc">
- <title xml:id="lustreproc.title">LustreProc</title>
- <para>The <literal>/proc</literal> file system acts as an interface to internal data structures in
- the kernel. This chapter describes entries in <literal>/proc</literal> that are useful for
- tuning and monitoring aspects of a Lustre file system. It includes these sections:</para>
+ <title xml:id="lustreproc.title">Lustre Parameters</title>
+ <para>The <literal>/proc</literal> and <literal>/sys</literal> file systems
+ acts as an interface to internal data structures in the kernel. This chapter
+ describes parameters and tunables that are useful for optimizing and
+ monitoring aspects of a Lustre file system. It includes these sections:</para>
<itemizedlist>
<listitem>
<para><xref linkend="dbdoclet.50438271_83523"/></para>
</listitem>
</itemizedlist>
<section>
- <title>Introduction to <literal>/proc</literal></title>
- <para>The <literal>/proc</literal> directory provides an interface to internal data structures
- in the kernel that enables monitoring and tuning of many aspects of Lustre file system and
- application performance These data structures include settings and metrics for components such
- as memory, networking, file systems, and kernel housekeeping routines, which are available
- throughout the hierarchical file layout in <literal>/proc.</literal>
+ <title>Introduction to Lustre Parameters</title>
+ <para>Lustre parameters and statistics files provide an interface to
+ internal data structures in the kernel that enables monitoring and
+ tuning of many aspects of Lustre file system and application performance.
+ These data structures include settings and metrics for components such
+ as memory, networking, file systems, and kernel housekeeping routines,
+ which are available throughout the hierarchical file layout.
</para>
- <para>Typically, metrics are accessed by reading from <literal>/proc</literal> files and
- settings are changed by writing to <literal>/proc</literal> files. Some data is server-only,
- some data is client-only, and some data is exported from the client to the server and is thus
- duplicated in both locations.</para>
+ <para>Typically, metrics are accessed via <literal>lctl get_param</literal>
+ files and settings are changed by via <literal>lctl set_param</literal>.
+ Some data is server-only, some data is client-only, and some data is
+ exported from the client to the server and is thus duplicated in both
+ locations.</para>
<note>
- <para>In the examples in this chapter, <literal>#</literal> indicates a command is entered as
- root. Servers are named according to the convention
- <literal><replaceable>fsname</replaceable>-<replaceable>MDT|OSTnumber</replaceable></literal>.
+ <para>In the examples in this chapter, <literal>#</literal> indicates
+ a command is entered as root. Lustre servers are named according to the
+ convention <literal><replaceable>fsname</replaceable>-<replaceable>MDT|OSTnumber</replaceable></literal>.
The standard UNIX wildcard designation (*) is used.</para>
</note>
- <para>In most cases, information is accessed using the <literal>lctl get_param</literal> command
- and settings are changed using the <literal>lctl set_param</literal> command. Some examples
- are shown below:</para>
+ <para>Some examples are shown below:</para>
<itemizedlist>
<listitem>
<para> To obtain data from a Lustre client:</para>
osc.testfs-OST0006-osc-ffff881071d5cc00
osc.testfs-OST0007-osc-ffff881071d5cc00
osc.testfs-OST0008-osc-ffff881071d5cc00</screen>
- <para>In this example, information about OST connections available on a client is displayed
- (indicated by "osc").</para>
+ <para>In this example, information about OST connections available
+ on a client is displayed (indicated by "osc").</para>
</listitem>
</itemizedlist>
<itemizedlist>
</itemizedlist>
<itemizedlist>
<listitem>
- <para> To view a specific file, use <literal>lctl get_param</literal>
- :<screen># lctl get_param osc.lustre-OST0000-osc-ffff881071d5cc00.rpc_stats</screen></para>
+ <para> To view a specific file, use <literal>lctl get_param</literal>:
+ <screen># lctl get_param osc.lustre-OST0000*.rpc_stats</screen></para>
</listitem>
</itemizedlist>
<para>For more information about using <literal>lctl</literal>, see <xref
xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438194_51490"/>.</para>
- <para>Data can also be viewed using the <literal>cat</literal> command with the full path to the
- file. The form of the <literal>cat</literal> command is similar to that of the <literal>lctl
- get_param</literal> command with these differences. In the <literal>cat</literal> command: </para>
+ <para>Data can also be viewed using the <literal>cat</literal> command
+ with the full path to the file. The form of the <literal>cat</literal>
+ command is similar to that of the <literal>lctl get_param</literal>
+ command with some differences. Unfortunately, as the Linux kernel has
+ changed over the years, the location of statistics and parameter files
+ has also changed, which means that the Lustre parameter files may be
+ located in either the <literal>/proc</literal> directory, in the
+ <literal>/sys</literal> directory, and/or in the
+ <literal>/sys/kernel/debug</literal> directory, depending on the kernel
+ version and the Lustre version being used. The <literal>lctl</literal>
+ command insulates scripts from these changes and is preferred over direct
+ file access, unless as part of a high-performance monitoring system.
+ In the <literal>cat</literal> command:</para>
<itemizedlist>
<listitem>
- <para> Replace the dots in the path with slashes.</para>
+ <para>Replace the dots in the path with slashes.</para>
</listitem>
<listitem>
- <para> Prepend the path with the following as
- appropriate:<screen>/proc/{fs,sys}/{lustre,lnet}</screen></para>
+ <para>Prepend the path with the following as appropriate:
+ <screen>/{proc,sys}/{fs,sys}/{lustre,lnet}</screen></para>
</listitem>
</itemizedlist>
<para>For example, an <literal>lctl get_param</literal> command may look like
osc.testfs-OST0000-osc-ffff881071d5cc00.uuid=594db456-0685-bd16-f59b-e72ee90e9819
osc.testfs-OST0001-osc-ffff881071d5cc00.uuid=594db456-0685-bd16-f59b-e72ee90e9819
...</screen></para>
- <para>The equivalent <literal>cat</literal> command looks like
- this:<screen># cat /proc/fs/lustre/osc/*/uuid
+ <para>The equivalent <literal>cat</literal> command may look like this:
+ <screen># cat /proc/fs/lustre/osc/*/uuid
594db456-0685-bd16-f59b-e72ee90e9819
594db456-0685-bd16-f59b-e72ee90e9819
...</screen></para>
- <para>The <literal>llstat</literal> utility can be used to monitor some Lustre file system I/O
- activity over a specified time period. For more details, see <xref
- xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438219_23232"/></para>
- <para>Some data is imported from attached clients and is available in a directory called
- <literal>exports</literal> located in the corresponding per-service directory on a Lustre
- server. For
- example:<screen># ls /proc/fs/lustre/obdfilter/testfs-OST0000/exports/192.168.124.9\@o2ib1/
+ <para>or like this:
+ <screen># cat /sys/fs/lustre/osc/*/uuid
+594db456-0685-bd16-f59b-e72ee90e9819
+594db456-0685-bd16-f59b-e72ee90e9819
+...</screen></para>
+ <para>The <literal>llstat</literal> utility can be used to monitor some
+ Lustre file system I/O activity over a specified time period. For more
+ details, see
+ <xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438219_23232"/></para>
+ <para>Some data is imported from attached clients and is available in a
+ directory called <literal>exports</literal> located in the corresponding
+ per-service directory on a Lustre server. For example:
+ <screen>oss:/root# lctl list_param obdfilter.testfs-OST0000.exports.*
# hash ldlm_stats stats uuid</screen></para>
<section remap="h3">
<title>Identifying Lustre File Systems and Servers</title>
- <para>Several <literal>/proc</literal> files on the MGS list existing Lustre file systems and
- file system servers. The examples below are for a Lustre file system called
+ <para>Several <literal>/proc</literal> files on the MGS list existing
+ Lustre file systems and file system servers. The examples below are for
+ a Lustre file system called
<literal>testfs</literal> with one MDT and three OSTs.</para>
<itemizedlist>
<listitem>
<para>See also <xref linkend="dbdoclet.50438219_84890"/> (<literal>llobdstat</literal>) and
<xref linkend="dbdoclet.50438273_80593"/> (<literal>collectl</literal>).</para>
</note>
- <para>MDT <literal>stats</literal> files can be used to track MDT statistics for the MDS. The
- example below shows sample output from an MDT <literal>stats</literal> file.</para>
+ <para>MDT <literal>stats</literal> files can be used to track MDT
+ statistics for the MDS. The example below shows sample output from an
+ MDT <literal>stats</literal> file.</para>
<screen># lctl get_param mds.*-MDT0000.stats
snapshot_time 1244832003.676892 secs.usecs
open 2 samples [reqs]