- <section remap="h3">
- <title><indexterm><primary>maintance</primary><secondary>removing a OST</secondary></indexterm>
- Removing an OST from the File System</title>
- <para>OSTs can be removed from a Lustre file system. Currently in Lustre, removing an OST actually means that the OST is 'deactivated' from the file system, not permanently removed. A removed OST still appears in the device listing; you should not normally create a new OST with the same name.</para>
- <para>You may want to deactivate an OST and prevent new files from being written to it in several situations:</para>
- <itemizedlist>
- <listitem>
- <para>OST is nearing its space capacity</para>
- </listitem>
- <listitem>
- <para>Hard drive has failed and a RAID resync/rebuild is underway</para>
- </listitem>
- <listitem>
- <para>OST storage has failed permanently</para>
- </listitem>
- </itemizedlist>
- <para>When removing an OST, remember that the MDT does not communicate directly with OSTs. Rather, each OST has a corresponding OSC which communicates with the MDT. It is necessary to determine the device number of the OSC that corresponds to the OST. Then, you use this device number to deactivate the OSC on the MDT.</para>
- <para>To remove an OST from the file system:</para>
- <orderedlist>
- <listitem>
- <para>For the OST to be removed, determine the device number of the corresponding OSC on the MDT.</para>
- <orderedlist>
- <listitem>
- <para>List all OSCs on the node, along with their device numbers. Run:</para>
- <screen>lctldl|grep " osc "</screen>
- <para>This is sample <literal>lctl dl | grep</literal></para>
- <screen>11 UP osc lustre-OST-0000-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
-12 UP osc lustre-OST-0001-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
-13 IN osc lustre-OST-0000-osc lustre-MDT0000-mdtlov_UUID 5
-14 UP osc lustre-OST-0001-osc lustre-MDT0000-mdtlov_UUID 5</screen>
- </listitem>
- <listitem>
- <para>Determine the device number of the OSC that corresponds to the OST to be removed.</para>
- </listitem>
- </orderedlist>
- </listitem>
- <listitem>
- <para>Temporarily deactivate the OSC on the MDT. On the MDT, run: </para>
- <screen>$ mdt> lctl --device >devno< deactivate</screen>
- <para>For example, based on the command output in Step 1, to deactivate device 13 (the MDT’s OSC for <literal>OST-0000</literal>), the command would be:
-</para>
- <screen>$ mdt> lctl --device 13 deactivate</screen>
- <para>This marks the OST as inactive on the MDS, so no new objects are assigned to the OST. This does not prevent use of existing objects for reads or writes.
-</para>
- <note>
- <para>Do not deactivate the OST on the clients. Do so causes errors (EIOs), and the copy out to fail. </para>
- </note>
- <caution>
- <para>Do not use <literal>lctl conf_param</literal> to deactivate the OST. It permanently sets a parameter in the file system configuration.</para>
- </caution>
- </listitem>
- <listitem>
- <para>Discover all files that have objects residing on the deactivated OST. </para>
- <para>Depending on whether the deactivated OST is available or not, the data from that OST may be migrated to other OSTs, or may need to be restored from backup.
-</para>
- <orderedlist>
- <listitem>
- <para>If the OST is still online and available, find all files with objects on the deactivated OST, and copy them to other OSTs in the file system to:
-</para>
- <screen>[client]# lfs find --obd <OST UUID> <mount_point> | lfs_migrate -y</screen>
- </listitem>
- <listitem>
- <para>If the OST is no longer available, delete the files on that OST and restore them from backup:
- <screen>[client]# lfs find --obd <OST UUID> -print0 <mount_point> | \
+ <section condition="l24" xml:id="dbdoclet.rmremotedir">
+ <title><indexterm><primary>maintenance</primary><secondary>removing a MDT</secondary></indexterm>Removing a MDT from the File System</title>
+ <para>If the MDT is permanently inaccessible, <literal>lfs rmdir {directory}</literal> can be used to delete the directory entry. A normal <literal>rmdir</literal> will report an IO error due to the remote MDT being inactive. After the remote directory has been removed, the administrator should mark the MDT as permanently inactive with:</para>
+<screen>lctl conf_param {MDT name}.mdc.active=0
+</screen>
+<para>A user can identify which MDT holds a remote sub-directory using
+the <literal>lfs</literal> utility. For example:</para>
+<screen>client$ lfs getstripe -M /mnt/lustre/remote_dir1
+1
+client$ mkdir /mnt/lustre/local_dir0
+client$ lfs getstripe -M /mnt/lustre/local_dir0
+0
+</screen>
+ <para>The <literal>getstripe [--mdt-index|-M]</literal> parameters return
+ the index of the MDT that is serving the given directory.</para>
+ </section>
+ <section xml:id="dbdoclet.inactivemdt" condition='l24'>
+ <title>
+ <indexterm><primary>maintenance</primary></indexterm>
+ <indexterm><primary>maintenance</primary><secondary>inactive MDTs</secondary></indexterm>Working with Inactive MDTs</title>
+ <para>Files located on or below an inactive MDT are inaccessible until the MDT is activated again. Clients accessing an inactive MDT will receive an EIO error.</para></section>
+ <section remap="h3" xml:id="section_k3l_4gt_tl">
+ <title><indexterm>
+ <primary>maintenance</primary>
+ <secondary>removing a OST</secondary>
+ </indexterm> Removing an OST from the File System</title>
+ <para>When removing an OST, remember that the MDT does not communicate directly with OSTs.
+ Rather, each OST has a corresponding OSC which communicates with the MDT. It is necessary to
+ determine the device number of the OSC that corresponds to the OST. Then, you use this
+ device number to deactivate the OSC on the MDT.</para>
+ <para>To remove an OST from the file system:</para>
+ <orderedlist>
+ <listitem>
+ <para>For the OST to be removed, determine the device number of the corresponding OSC on
+ the MDT.</para>
+ <orderedlist>
+ <listitem>
+ <para>List all OSCs on the node, along with their device numbers. Run:</para>
+ <screen>lctl dl | grep osc</screen>
+ <para>For example: <literal>lctl dl | grep</literal></para>
+ <screen>11 UP osc testfs-OST-0000-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
+12 UP osc testfs-OST-0001-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
+13 IN osc testfs-OST-0000-osc testfs-MDT0000-mdtlov_UUID 5
+14 UP osc testfs-OST-0001-osc testfs-MDT0000-mdtlov_UUID 5</screen>
+ </listitem>
+ <listitem>
+ <para>Determine the device number of the OSC that corresponds to the OST to be
+ removed.</para>
+ </listitem>
+ </orderedlist>
+ </listitem>
+ <listitem>
+ <para>Temporarily deactivate the OSC on the MDT. On the MDT, run: </para>
+ <screen>mds# lctl --device <replaceable>lustre_devno</replaceable> deactivate</screen>
+ <para>For example, based on the command output in Step 1, to deactivate device 13 (the
+ MDT’s OSC for <literal>OST-0000</literal>), the command would be: </para>
+ <screen>mds# lctl --device 13 deactivate</screen>
+ <para>This marks the OST as inactive on the MDS, so no new objects are assigned to the
+ OST. This does not prevent use of existing objects for reads or writes. </para>
+ <note>
+ <para>Do not deactivate the OST on the clients. Do so causes errors (EIOs), and the copy
+ out to fail. </para>
+ </note>
+ <caution>
+ <para>Do not use <literal>lctl conf_param</literal> to deactivate the OST. It
+ permanently sets a parameter in the file system configuration.</para>
+ </caution>
+ </listitem>
+ <listitem>
+ <para>Discover all files that have objects residing on the deactivated OST. </para>
+ <para>Depending on whether the deactivated OST is available or not, the data from that OST
+ may be migrated to other OSTs, or may need to be restored from backup. </para>
+ <orderedlist>
+ <listitem>
+ <para>If the OST is still online and available, find all files with objects on the
+ deactivated OST, and copy them to other OSTs in the file system to: </para>
+ <screen>client# lfs find --obd <replaceable>ost_name</replaceable> <replaceable>/mount/point</replaceable> | lfs_migrate -y</screen>
+ </listitem>
+ <listitem>
+ <para>If the OST is no longer available, delete the files on that OST and restore them
+ from backup:
+ <screen>client# lfs find --obd <replaceable>ost_uuid</replaceable> -print0 <replaceable>/mount/point</replaceable> | \