<section remap="h3">
<title><indexterm><primary>I/O</primary><secondary>OST space usage</secondary></indexterm>Checking OST Space Usage</title>
<para>The example below shows an unbalanced file system:</para>
<section remap="h3">
<title><indexterm><primary>I/O</primary><secondary>OST space usage</secondary></indexterm>Checking OST Space Usage</title>
<para>The example below shows an unbalanced file system:</para>
filesystem summary: 11.8G 5.4G 5.8G \
45% /mnt/lustre</screen>
<para>In this case, OST:2 is almost full and when an attempt is made to write additional information to the file system (even with uniform striping over all the OSTs), the write command fails as follows:</para>
filesystem summary: 11.8G 5.4G 5.8G \
45% /mnt/lustre</screen>
<para>In this case, OST:2 is almost full and when an attempt is made to write additional information to the file system (even with uniform striping over all the OSTs), the write command fails as follows:</para>
- <screen>[root@LustreClient01 ~]# lfs setstripe /mnt/lustre 4M 0 -1
-[root@LustreClient01 ~]# dd if=/dev/zero of=/mnt/lustre/test_3 \ bs=10M cou\
-nt=100
-dd: writing `/mnt/lustre/test_3': No space left on device
+ <screen>client# lfs setstripe /mnt/lustre 4M 0 -1
+client# dd if=/dev/zero of=/mnt/lustre/test_3 bs=10M count=100
+dd: writing '/mnt/lustre/test_3': No space left on device
root@192.168.0.10's password:
Last login: Wed Nov 26 13:35:12 2008 from 192.168.0.6</screen>
</listitem>
<listitem>
<para>Use the <literal>lctl dl</literal> command to show the status of all file system components:</para>
root@192.168.0.10's password:
Last login: Wed Nov 26 13:35:12 2008 from 192.168.0.6</screen>
</listitem>
<listitem>
<para>Use the <literal>lctl dl</literal> command to show the status of all file system components:</para>
<listitem>
<para>Identify the file(s) to be moved.</para>
<para>In the example below, output from the <literal>getstripe</literal> command indicates that the file <literal>test_2</literal> is located entirely on OST2:</para>
<listitem>
<para>Identify the file(s) to be moved.</para>
<para>In the example below, output from the <literal>getstripe</literal> command indicates that the file <literal>test_2</literal> is located entirely on OST2:</para>
- <screen>[client]# cp -a /mnt/lustre/test_2 /mnt/lustre/test_2.tmp
-[client]# mv /mnt/lustre/test_2.tmp /mnt/lustre/test_2</screen>
+ <screen>client# cp -a /mnt/lustre/test_2 /mnt/lustre/test_2.tmp
+client# mv /mnt/lustre/test_2.tmp /mnt/lustre/test_2</screen>
</listitem>
<listitem>
<para>Check the file system balance.</para>
<para>The <literal>df</literal> output in the example below shows a more balanced system compared to the <literal>df</literal> output in the example in <xref linkend="dbdoclet.50438211_17536"/>.</para>
</listitem>
<listitem>
<para>Check the file system balance.</para>
<para>The <literal>df</literal> output in the example below shows a more balanced system compared to the <literal>df</literal> output in the example in <xref linkend="dbdoclet.50438211_17536"/>.</para>
<para>Running the <literal>writeconf</literal> command on the MDS erases all pools information (as well as any other parameters set using <literal>lctl conf_param</literal>). We recommend that the pools definitions (and <literal>conf_param</literal> settings) be executed using a script, so they can be reproduced easily after a <literal>writeconf</literal> is performed.</para>
</caution>
<para>To create a new pool, run:</para>
<para>Running the <literal>writeconf</literal> command on the MDS erases all pools information (as well as any other parameters set using <literal>lctl conf_param</literal>). We recommend that the pools definitions (and <literal>conf_param</literal> settings) be executed using a script, so they can be reproduced easily after a <literal>writeconf</literal> is performed.</para>
</caution>
<para>To create a new pool, run:</para>
<note>
<para>The pool name is an ASCII string up to 16 characters.</para>
</note>
<para>To add the named OST to a pool, run:</para>
<note>
<para>The pool name is an ASCII string up to 16 characters.</para>
</note>
<para>To add the named OST to a pool, run:</para>
- <para><literal><index_range> is <ost_index_start>-<ost_index_end>[,<index_range>]</literal> or <literal><ost_index_start>-<ost_index_end>/<step></literal></para>
+ <para><literal><replaceable>index_range</replaceable> is <replaceable>ost_index_start</replaceable>-<replaceable>ost_index_end[,index_range]</replaceable></literal> or <literal><replaceable>ost_index_start</replaceable>-<replaceable>ost_index_end/step</replaceable></literal></para>
<para> For example, to add even-numbered OSTs to pool1 on file system <literal>lustre</literal>, run a single command (add) to add many OSTs to the pool at one time:</para>
<para><screen>lctl pool_add lustre.pool1 OST[0-10/2]</screen></para>
<note>
<para>Each time an OST is added to a pool, a new <literal>llog</literal> configuration record is created. For convenience, you can run a single command.</para>
</note>
<para>To remove a named OST from a pool, run:</para>
<para> For example, to add even-numbered OSTs to pool1 on file system <literal>lustre</literal>, run a single command (add) to add many OSTs to the pool at one time:</para>
<para><screen>lctl pool_add lustre.pool1 OST[0-10/2]</screen></para>
<note>
<para>Each time an OST is added to a pool, a new <literal>llog</literal> configuration record is created. For convenience, you can run a single command.</para>
</note>
<para>To remove a named OST from a pool, run:</para>
<note>
<para>All OSTs must be removed from a pool before it can be destroyed.</para>
</note>
<para>To list pools in the named file system, run:</para>
<note>
<para>All OSTs must be removed from a pool before it can be destroyed.</para>
</note>
<para>To list pools in the named file system, run:</para>
<section remap="h4">
<title>Using the lfs Command with OST Pools</title>
<para>Several lfs commands can be run with OST pools. Use the <literal>lfs setstripe</literal> command to associate a directory with an OST pool. This causes all new regular files and directories in the directory to be created in the pool. The lfs command can be used to list pools in a file system and OSTs in a named pool.</para>
<para>To associate a directory with a pool, so all new files and directories will be created in the pool, run:</para>
<section remap="h4">
<title>Using the lfs Command with OST Pools</title>
<para>Several lfs commands can be run with OST pools. Use the <literal>lfs setstripe</literal> command to associate a directory with an OST pool. This causes all new regular files and directories in the directory to be created in the pool. The lfs command can be used to list pools in a file system and OSTs in a named pool.</para>
<para>To associate a directory with a pool, so all new files and directories will be created in the pool, run:</para>
<note>
<para>If you specify striping with an invalid pool name, because the pool does not exist or the pool name was mistyped, <literal>lfs setstripe</literal> returns an error. Run <literal>lfs pool_list</literal> to make sure the pool exists and the pool name is entered correctly.</para>
</note>
<note>
<para>If you specify striping with an invalid pool name, because the pool does not exist or the pool name was mistyped, <literal>lfs setstripe</literal> returns an error. Run <literal>lfs pool_list</literal> to make sure the pool exists and the pool name is entered correctly.</para>
</note>
- <screen>$ mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda
-$ mkdir -p /mnt/test/ost12
-$ mount -t lustre /dev/sda /mnt/test/ost12</screen>
+ <screen>oss# mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda
+oss# mkdir -p /mnt/test/ost12
+oss# mount -t lustre /dev/sda /mnt/test/ost12</screen>
<section remap="h3">
<title>Making File System Objects Immutable</title>
<para>An immutable file or directory is one that cannot be modified, renamed or removed. To do this:</para>
<section remap="h3">
<title>Making File System Objects Immutable</title>
<para>An immutable file or directory is one that cannot be modified, renamed or removed. To do this:</para>
<para>To check which checksum algorithm is being used by Lustre, run:</para>
<screen>$ lctl get_param osc.*.checksum_type</screen>
<para>To change the wire checksum algorithm used by Lustre, run:</para>
<para>To check which checksum algorithm is being used by Lustre, run:</para>
<screen>$ lctl get_param osc.*.checksum_type</screen>
<para>To change the wire checksum algorithm used by Lustre, run:</para>
<note>
<para>The in-memory checksum always uses the adler32 algorithm, if available, and only falls back to crc32 if adler32 cannot be used.</para>
</note>
<note>
<para>The in-memory checksum always uses the adler32 algorithm, if available, and only falls back to crc32 if adler32 cannot be used.</para>
</note>