Whamcloud - gitweb
FIX: xrefs and tidying
authorRichard Henwood <rhenwood@whamcloud.com>
Wed, 18 May 2011 16:45:39 +0000 (11:45 -0500)
committerRichard Henwood <rhenwood@whamcloud.com>
Wed, 18 May 2011 16:45:39 +0000 (11:45 -0500)
TroubleShootingRecovery.xml

index 0a9be20..7bffb61 100644 (file)
@@ -1,42 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<chapter version="5.0" xml:lang="en-US" xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink">
+<chapter version="5.0" xml:lang="en-US" xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" xml:id='troubleshootingrecovery'>
   <info>
-    <title>Troubleshooting Recovery</title>
+    <title xml:id='troubleshootingrecovery.title'>Troubleshooting Recovery</title>
   </info>
   <para><anchor xml:id="dbdoclet.50438225_pgfId-1292105" xreflabel=""/>This chapter describes what to do if something goes wrong during recovery. It describes:</para>
+
   <itemizedlist><listitem>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1292704" xreflabel=""/><link xl:href="TroubleShootingRecovery.html#50438225_71141">Recovering from Errors or Corruption on a Backing File System</link></para>
+      <para><xref linkend="dbdoclet.50438225_71141"/></para>
     </listitem>
+
 <listitem>
-      <para> </para>
+      <para><xref linkend="dbdoclet.50438225_37365"/></para>
     </listitem>
+
 <listitem>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1292709" xreflabel=""/><link xl:href="TroubleShootingRecovery.html#50438225_37365">Recovering from Corruption in the Lustre File System</link></para>
-    </listitem>
-<listitem>
-      <para> </para>
-    </listitem>
-<listitem>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1292832" xreflabel=""/><link xl:href="TroubleShootingRecovery.html#50438225_12316">Recovering from an Unavailable OST</link></para>
-    </listitem>
-<listitem>
-      <para> </para>
+      <para><xref linkend="dbdoclet.50438225_12316"/></para>
     </listitem>
+
 </itemizedlist>
-   <informaltable frame="none">
-    <tgroup cols="1">
-      <colspec colname="c1" colwidth="100*"/>
-      <tbody>
-        <row>
-          <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438225_pgfId-1292713" xreflabel=""/>For a description of how recovery is implemented in Lustre, see <link xl:href="LustreRecovery.html#50438268_71884">Chapter 30</link>: <link xl:href="TroubleShootingRecovery.html#50438225_28147">Troubleshooting Recovery</link>.</para></entry>
-        </row>
-      </tbody>
-    </tgroup>
-  </informaltable>
-   <section remap="h2">
-    <title><anchor xml:id="dbdoclet.50438225_pgfId-1292068" xreflabel=""/></title>
-    <section remap="h2">
-      <title>27.1 <anchor xml:id="dbdoclet.50438225_71141" xreflabel=""/>Recovering from Errors or <anchor xml:id="dbdoclet.50438225_marker-1292184" xreflabel=""/>Corruption on a Backing File System</title>
+
+<note><para>For a description of how recovery is implemented in Lustre, see <xref linkend="dbdoclet.50438225_28147"/>.</para></note>
+
+    <section xml:id="dbdoclet.50438225_71141">
+      <title>27.1 Recovering from Errors or <anchor xml:id="dbdoclet.50438225_marker-1292184" xreflabel=""/>Corruption on a Backing File System</title>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291241" xreflabel=""/>When an OSS, MDS, or MGS server crash occurs, it is not necessary to run e2fsck on the file system. ldiskfs journaling ensures that the file system remains coherent. The backing file systems are never accessed directly from the client, so client crashes are not relevant.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291243" xreflabel=""/>The only time it is REQUIRED that e2fsck be run on a device is when an event causes problems that ldiskfs journaling is unable to handle, such as a hardware device failure or I/O error. If the ldiskfs kernel code detects corruption on the disk, it mounts the file system as read-only to prevent further corruption, but still allows read access to the device. This appears as error &quot;-30&quot; (EROFS) in the syslogs on the server, e.g.:</para>
       <screen><anchor xml:id="dbdoclet.50438225_pgfId-1291304" xreflabel=""/>Dec 29 14:11:32 mookie kernel: LDISKFS-fs error (device sdz): ldiskfs_looku\
@@ -45,16 +31,7 @@ p: unlinked inode 5384166 in dir #145170469
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291325" xreflabel=""/>Dec 29 14:11:32 mookie kernel: Remounting filesystem read-only</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291305" xreflabel=""/>In such a situation, it is normally required that e2fsck only be run on the bad device before placing the device back into service.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291245" xreflabel=""/>In the vast majority of cases, Lustre can cope with any inconsistencies it finds on the disk and between other devices in the file system.</para>
-      <informaltable frame="none">
-        <tgroup cols="1">
-          <colspec colname="c1" colwidth="100*"/>
-          <tbody>
-            <row>
-              <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438225_pgfId-1291247" xreflabel=""/>lfsck is rarely required for Lustre operation.</para></entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </informaltable>
+              <note><para>lfsck is rarely required for Lustre operation.</para></note>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291249" xreflabel=""/>For problem analysis, it is strongly recommended that e2fsck be run under a logger, like script, to record all of the output and changes that are made to the file system in case this information is needed later.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291251" xreflabel=""/>If time permits, it is also a good idea to first run e2fsck in non-fixing mode (-n option) to assess the type and extent of damage to the file system. The drawback is that in this mode, e2fsck does not recover the file system journal, so there may appear to be file system corruption when none really exists.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291253" xreflabel=""/>To address concern about whether corruption is real or only due to the journal not being replayed, you can briefly mount and unmount the ldiskfs filesystem directly on the node with Lustre stopped (NOT via Lustre), using a command similar to:</para>
@@ -77,13 +54,16 @@ ion
 </screen>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1291234" xreflabel=""/>In addition, the e2fsprogs package contains the lfsck tool, which does distributed coherency checking for the Lustre file system after e2fsck has been run. Running lfsck is NOT required in a large majority of cases, at a small risk of having some leaked space in the file system. To avoid a lengthy downtime, it can be run (with care) after Lustre is started.</para>
     </section>
-    <section remap="h2">
-      <title>27.2 <anchor xml:id="dbdoclet.50438225_37365" xreflabel=""/>Recovering from <anchor xml:id="dbdoclet.50438225_marker-1292186" xreflabel=""/>Corruption in the Lustre File System</title>
+    <section xml:id="dbdoclet.50438225_37365">
+      <title>27.2 Recovering from <anchor xml:id="dbdoclet.50438225_marker-1292186" xreflabel=""/>Corruption in the Lustre File System</title>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1289918" xreflabel=""/>In cases where the MDS or an OST becomes corrupt, you can run a distributed check on the file system to determine what sort of problems exist. Use lfsck to correct any defects found.</para>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290095" xreflabel=""/> 1. Stop the Lustre file system.</para>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290099" xreflabel=""/> 2. Run e2fsck -f on the individual MDS / OST that had problems to fix any local file system damage.</para>
+      <orderedlist><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290095" xreflabel=""/>Stop the Lustre file system.</para>
+  </listitem><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290099" xreflabel=""/>Run e2fsck -f on the individual MDS / OST that had problems to fix any local file system damage.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1290108" xreflabel=""/>We recommend running e2fsck under script, to create a log of changes made to the file system in case it is needed later. After e2fsck is run, bring up the file system, if necessary, to reduce the outage window.</para>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290111" xreflabel=""/> 3. Run a full e2fsck of the MDS to create a database for lfsck. You <emphasis>must</emphasis> use the -n option for a mounted file system, otherwise you will corrupt the file system.</para>
+  </listitem><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290111" xreflabel=""/>Run a full e2fsck of the MDS to create a database for lfsck. You <emphasis>must</emphasis> use the -n option for a mounted file system, otherwise you will corrupt the file system.</para>
       <screen><anchor xml:id="dbdoclet.50438225_pgfId-1290120" xreflabel=""/>e2fsck -n -v --mdsdb /tmp/mdsdb /dev/{mdsdev}
 </screen>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1290115" xreflabel=""/>The mdsdb file can grow fairly large, depending on the number of files in the file system (10 GB or more for millions of files, though the actual file size is larger because the file is sparse). It is quicker to write the file to a local file system due to seeking and small writes. Depending on the number of files, this step can take several hours to complete.</para>
@@ -131,23 +111,16 @@ ck.
 <anchor xml:id="dbdoclet.50438225_pgfId-1290187" xreflabel=""/>   --------
 <anchor xml:id="dbdoclet.50438225_pgfId-1290188" xreflabel=""/>   387 files
 </screen>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290139" xreflabel=""/> 4. Make this file accessible on all OSTs, either by using a shared file system or copying the file to the OSTs. The pdcp command is useful here.</para>
+  </listitem><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290139" xreflabel=""/>Make this file accessible on all OSTs, either by using a shared file system or copying the file to the OSTs. The pdcp command is useful here.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1289927" xreflabel=""/>The pdcp command (installed with pdsh), can be used to copy files to groups of hosts. Pdcp is available here:</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1290242" xreflabel=""/><link xl:href="http://sourceforge.net/projects/pdsh">http://sourceforge.net/projects/pdsh</link></para>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1289928" xreflabel=""/> 5. Run a similar e2fsck step on the OSTs. The e2fsck --ostdb command can be run in parallel on all OSTs.</para>
+  </listitem><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1289928" xreflabel=""/>Run a similar e2fsck step on the OSTs. The e2fsck --ostdb command can be run in parallel on all OSTs.</para>
       <screen><anchor xml:id="dbdoclet.50438225_pgfId-1290293" xreflabel=""/>e2fsck -n -v --mdsdb /tmp/mdsdb --ostdb /tmp/{ostNdb} \/dev/{ostNdev}
 </screen>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1290266" xreflabel=""/>The mdsdb file is read-only in this step; a single copy can be shared by all OSTs.</para>
-      <informaltable frame="none">
-        <tgroup cols="1">
-          <colspec colname="c1" colwidth="100*"/>
-          <tbody>
-            <row>
-              <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438225_pgfId-1290279" xreflabel=""/>If the OSTs do not have shared file system access to the MDS, a stub mdsdb file, {mdsdb}.mdshdr, is generated. This can be used instead of the full mdsdb file.</para></entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </informaltable>
+              <note><para>If the OSTs do not have shared file system access to the MDS, a stub mdsdb file, {mdsdb}.mdshdr, is generated. This can be used instead of the full mdsdb file.</para></note>
        <para><anchor xml:id="dbdoclet.50438225_pgfId-1292837" xreflabel=""/><emphasis role="bold">Example:</emphasis></para>
       <screen><anchor xml:id="dbdoclet.50438225_pgfId-1290319" xreflabel=""/>[root@oss161 ~]# e2fsck -n -v --mdsdb /tmp/mdsdb --ostdb \ /tmp/ostdb /dev/\
 sda 
@@ -191,7 +164,8 @@ ck.
 <anchor xml:id="dbdoclet.50438225_pgfId-1290375" xreflabel=""/>   368 files
 <anchor xml:id="dbdoclet.50438225_pgfId-1290356" xreflabel=""/> 
 </screen>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290316" xreflabel=""/> 6. Make the mdsdb file and all ostdb files available on a mounted client and run lfsck to examine the file system. Optionally, correct the defects found by lfsck.</para>
+  </listitem><listitem>
+      <para><anchor xml:id="dbdoclet.50438225_pgfId-1290316" xreflabel=""/>Make the mdsdb file and all ostdb files available on a mounted client and run lfsck to examine the file system. Optionally, correct the defects found by lfsck.</para>
       <screen><anchor xml:id="dbdoclet.50438225_pgfId-1289934" xreflabel=""/>script /root/lfsck.lustre.log 
 <anchor xml:id="dbdoclet.50438225_pgfId-1290406" xreflabel=""/>lfsck -n -v --mdsdb /tmp/mdsdb --ostdb /tmp/{ost1db} /tmp/{ost2db} ... /lus\
 tre/mount/point
@@ -220,23 +194,18 @@ tre/mount/point
       <itemizedlist><listitem>
           <para><anchor xml:id="dbdoclet.50438225_pgfId-1290034" xreflabel=""/> Inode exists but has missing objects (dangling inode). This normally happens if there was a problem with an OST.</para>
         </listitem>
-<listitem>
-          <para> </para>
-        </listitem>
+
 <listitem>
           <para><anchor xml:id="dbdoclet.50438225_pgfId-1290418" xreflabel=""/> Inode is missing but OST has unreferenced objects (orphan object). Normally, this happens if there was a problem with the MDS.</para>
         </listitem>
-<listitem>
-          <para> </para>
-        </listitem>
+
 <listitem>
           <para><anchor xml:id="dbdoclet.50438225_pgfId-1290421" xreflabel=""/> Multiple inodes reference the same objects. This can happen if the MDS is corrupted or if the MDS storage is cached and loses some, but not all, writes.</para>
         </listitem>
-<listitem>
-          <para> </para>
-        </listitem>
+
 </itemizedlist>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1289943" xreflabel=""/>If the file system is in use and being modified while the --mdsdb and --ostdb steps are running, lfsck may report inconsistencies where none exist due to files and objects being created/removed after the database files were collected. Examine the lfsck results closely. You may want to re-run the test.</para>
+  </listitem></orderedlist>
       <section remap="h3">
         <title><anchor xml:id="dbdoclet.50438225_pgfId-1290574" xreflabel=""/>27.2.1 <anchor xml:id="dbdoclet.50438225_13916" xreflabel=""/>Working with Orphaned <anchor xml:id="dbdoclet.50438225_marker-1292187" xreflabel=""/>Objects</title>
         <para><anchor xml:id="dbdoclet.50438225_pgfId-1289945" xreflabel=""/>The easiest problem to resolve is that of orphaned objects. When the -l option for lfsck is used, these objects are linked to new files and put into lost+found in the Lustre file system, where they can be examined and saved or deleted as necessary. If you are certain the objects are not useful, run lfsck with the -d option to delete orphaned objects and free up any space they are using.</para>
@@ -244,35 +213,15 @@ tre/mount/point
         <screen><anchor xml:id="dbdoclet.50438225_pgfId-1289949" xreflabel=""/>dd if=/lustre/bad/file of=/new/file bs=4k conv=sync,noerror
 </screen>
         <para><anchor xml:id="dbdoclet.50438225_pgfId-1289951" xreflabel=""/>Because it is rarely useful to have files with large holes in them, most users delete these files after reading them (if useful) and/or restoring them from backup.</para>
-        <informaltable frame="none">
-          <tgroup cols="1">
-            <colspec colname="c1" colwidth="100*"/>
-            <tbody>
-              <row>
-                <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438225_pgfId-1290487" xreflabel=""/>You cannot write to the holes of such files without having lfsck re-create the objects. Generally, it is easier to delete these files and restore them from backup.</para></entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </informaltable>
+                <note><para>You cannot write to the holes of such files without having lfsck re-create the objects. Generally, it is easier to delete these files and restore them from backup.</para></note>
         <para><anchor xml:id="dbdoclet.50438225_pgfId-1289916" xreflabel=""/>To fix inodes with duplicate objects, use lfsck with the -c option to copy the duplicate object to a new object and assign it to a file. One file will be okay and the duplicate will likely contain garbage. By itself, lfsck cannot tell which file is the usable one.</para>
       </section>
     </section>
-    <section remap="h2">
-      <title>27.3 <anchor xml:id="dbdoclet.50438225_12316" xreflabel=""/>Recovering from an <anchor xml:id="dbdoclet.50438225_marker-1292768" xreflabel=""/>Unavailable OST</title>
+    <section xml:id="dbdoclet.50438225_12316">
+      <title>27.3 Recovering from an <anchor xml:id="dbdoclet.50438225_marker-1292768" xreflabel=""/>Unavailable OST</title>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1292771" xreflabel=""/>One of the most common problems encountered in a Lustre environment is when an OST becomes unavailable, because of a network partition, OSS node crash, etc. When this happens, the OST’s clients pause and wait for the OST to become available again, either on the primary OSS or a failover OSS. When the OST comes back online, Lustre starts a recovery process to enable clients to reconnect to the OST. Lustre servers put a limit on the time they will wait in recovery for clients to reconnect. The timeout length is determined by the obd_timeout parameter.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1292775" xreflabel=""/>During recovery, clients reconnect and replay their requests serially, in the same order they were done originally. Until a client receives a confirmation that a given transaction has been written to stable storage, the client holds on to the transaction, in case it needs to be replayed. Periodically, a progress message prints to the log, stating how_many/expected clients have reconnected. If the recovery is aborted, this log shows how many clients managed to reconnect. When all clients have completed recovery, or if the recovery timeout is reached, the recovery period ends and the OST resumes normal request processing.</para>
       <para><anchor xml:id="dbdoclet.50438225_pgfId-1292779" xreflabel=""/>If some clients fail to replay their requests during the recovery period, this will not stop the recovery from completing. You may have a situation where the OST recovers, but some clients are not able to participate in recovery (e.g. network problems or client failure), so they are evicted and their requests are not replayed. This would result in any operations on the evicted clients failing, including in-progress writes, which would cause cached writes to be lost. This is a normal outcome; the recovery cannot wait indefinitely, or the file system would be hung any time a client failed. The lost transactions are an unfortunate result of the recovery process.</para>
-      <informaltable frame="none">
-        <tgroup cols="1">
-          <colspec colname="c1" colwidth="100*"/>
-          <tbody>
-            <row>
-              <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438225_pgfId-1292780" xreflabel=""/>The version-based recovery (VBR) feature enables a failed client to be &apos;&apos;skipped&apos;&apos;, so remaining clients can replay their requests, resulting in a more successful recovery from a downed OST. For more information about the VBR feature, see <link xl:href="LustreRecovery.html#50438268_80068">Version-based Recovery</link>.</para></entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </informaltable>
-      <para><anchor xml:id="dbdoclet.50438225_pgfId-1292766" xreflabel=""/> </para>
-    </section>
+      <note><para>The version-based recovery (VBR) feature enables a failed client to be &apos;&apos;skipped&apos;&apos;, so remaining clients can replay their requests, resulting in a more successful recovery from a downed OST. For more information about the VBR feature, see <xref linkend='lustrerecovery'/>(Version-based Recovery).</para></note>
   </section>
 </chapter>