Whamcloud - gitweb
LUDOC-232 lfsck: remove mention of old lfsck
[doc/manual.git] / TroubleShootingRecovery.xml
1 <?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="troubleshootingrecovery">
2     <title xml:id="troubleshootingrecovery.title">Troubleshooting Recovery</title>
3     <para>This chapter describes what to do if something goes wrong during recovery. It describes:</para>
4     <itemizedlist>
5         <listitem>
6             <para><xref linkend="dbdoclet.50438225_71141"/></para>
7         </listitem>
8         <listitem>
9             <para><xref linkend="dbdoclet.50438225_37365"/></para>
10         </listitem>
11         <listitem>
12             <para><xref linkend="dbdoclet.50438225_12316"/></para>
13         </listitem>
14         <listitem>
15             <para><xref linkend="dbdoclet.lfsckadmin"/></para>
16         </listitem>
17     </itemizedlist>
18     <section xml:id="dbdoclet.50438225_71141">
19         <title><indexterm><primary>recovery</primary><secondary>corruption of backing file system</secondary></indexterm>Recovering from Errors or Corruption on a Backing File System</title>
20         <para>When an OSS, MDS, or MGS server crash occurs, it is not necessary to run e2fsck on the
21             file system. <literal>ldiskfs</literal> journaling ensures that the file system remains
22             consistent over a system crash. The backing file systems are never accessed directly
23             from the client, so client crashes are not relevant for server file system
24             consistency.</para>
25         <para>The only time it is REQUIRED that <literal>e2fsck</literal> 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; (<literal>EROFS</literal>) in the syslogs on the server, e.g.:</para>
26         <screen>Dec 29 14:11:32 mookie kernel: LDISKFS-fs error (device sdz):
27             ldiskfs_lookup: unlinked inode 5384166 in dir #145170469
28 Dec 29 14:11:32 mookie kernel: Remounting filesystem read-only</screen>
29         <para>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>
30         <para>In the vast majority of cases, the Lustre software can cope with any inconsistencies
31             found on the disk and between other devices in the file system.</para>
32         <note>
33             <para>The offline LFSCK tool included with e2fsprogs is rarely required for Lustre file
34                 system operation.</para>
35         </note>
36         <para>For problem analysis, it is strongly recommended that <literal>e2fsck</literal> 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>
37         <para>If time permits, it is also a good idea to first run <literal>e2fsck</literal> 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, <literal>e2fsck</literal> does not recover the file system journal, so there may appear to be file system corruption when none really exists.</para>
38         <para>To address concern about whether corruption is real or only due to the journal not
39             being replayed, you can briefly mount and unmount the <literal>ldiskfs</literal> file
40             system directly on the node with the Lustre file system stopped, using a command similar
41             to:</para>
42         <screen>mount -t ldiskfs /dev/{ostdev} /mnt/ost; umount /mnt/ost</screen>
43         <para>This causes the journal to be recovered.</para>
44         <para>The <literal>e2fsck</literal> utility works well when fixing file system corruption
45             (better than similar file system recovery tools and a primary reason why
46                 <literal>ldiskfs</literal> was chosen over other file systems). However, it is often
47             useful to identify the type of damage that has occurred so an <literal>ldiskfs</literal>
48             expert can make intelligent decisions about what needs fixing, in place of
49                 <literal>e2fsck</literal>.</para>
50         <screen>root# {stop lustre services for this device, if running}
51 root# script /tmp/e2fsck.sda
52 Script started, file is /tmp/e2fsck.sda
53 root# mount -t ldiskfs /dev/sda /mnt/ost
54 root# umount /mnt/ost
55 root# e2fsck -fn /dev/sda   # don&apos;t fix file system, just check for corruption
56 :
57 [e2fsck output]
58 :
59 root# e2fsck -fp /dev/sda   # fix errors with prudent answers (usually <literal>yes</literal>)
60         </screen>
61     </section>
62     <section xml:id="dbdoclet.50438225_37365">
63         <title><indexterm><primary>recovery</primary><secondary>corruption of Lustre file system</secondary></indexterm>Recovering from Corruption in the Lustre File System</title>
64         <para>In cases where an ldiskfs MDT or OST becomes corrupt, you need to run e2fsck to correct the local filesystem consistency, then use <literal>LFSCK</literal> to run a distributed check on the file system to resolve any inconsistencies between the MDTs and OSTs.</para>
65         <orderedlist>
66             <listitem>
67                 <para>Stop the Lustre file system.</para>
68             </listitem>
69             <listitem>
70                 <para>Run <literal>e2fsck -f</literal> on the individual MDS / OST that had problems to fix any local file system damage.</para>
71                 <para>We recommend running <literal>e2fsck</literal> under script, to create a log of changes made to the file system in case it is needed later. After <literal>e2fsck</literal> is run, bring up the file system, if necessary, to reduce the outage window.</para>
72             </listitem>
73         </orderedlist>
74         <section xml:id="dbdoclet.50438225_13916">
75             <title><indexterm><primary>recovery</primary><secondary>orphaned objects</secondary></indexterm>Working with Orphaned Objects</title>
76             <para>The easiest problem to resolve is that of orphaned objects. When the LFSCK layout check is run, these objects are linked to new files and put into <literal>.lustre/lost+found</literal> in the Lustre file system, where they can be examined and saved or deleted as necessary.</para>
77         </section>
78     </section>
79     <section xml:id="dbdoclet.50438225_12316">
80         <title><indexterm><primary>recovery</primary><secondary>unavailable OST</secondary></indexterm>Recovering from an Unavailable OST</title>
81         <para>One problem encountered in a Lustre file system environment is
82             when an OST becomes unavailable due to a network partition, OSS node crash, etc. When
83             this happens, the OST&apos;s clients pause and wait for the OST to become available
84             again, either on the primary OSS or a failover OSS. When the OST comes back online, the
85             Lustre file system starts a recovery process to enable clients to reconnect to the OST.
86             Lustre servers put a limit on the time they will wait in recovery for clients to
87             reconnect.</para>
88         <para>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>
89         <para>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>
90         <note>
91             <para>The failure of client recovery does not indicate or lead to
92             filesystem corruption.  This is a normal event that is handled by
93             the MDT and OST, and should not result in any inconsistencies
94             between servers.</para>
95         </note>
96         <note>
97             <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>
98         </note>
99     </section>
100     <section xml:id="dbdoclet.lfsckadmin" condition='l23'>
101         <title><indexterm><primary>recovery</primary><secondary>oiscrub</secondary></indexterm><indexterm><primary>recovery</primary><secondary>lfsck</secondary></indexterm>Checking the file system with LFSCK</title>
102         <para>LFSCK is an administrative tool introduced in Lustre software release 2.3 for checking
103             and repair of the attributes specific to a mounted Lustre file system. It is similar in
104             concept to an offline fsck repair tool for a local filesystem,
105             but LFSCK is implemented to run as part of the Lustre file system while the file
106             system is mounted and in use. This allows consistency of checking and repair by the
107             Lustre software without unnecessary downtime, and can be run on the largest Lustre file
108             systems.</para>
109         <para>In Lustre software release 2.3, LFSCK can verify and repair the Object Index (OI)
110             table that is used internally to map Lustre File Identifiers (FIDs) to MDT internal
111             inode numbers, through a process called OI Scrub. An OI Scrub is required after
112             restoring from a file-level MDT backup (<xref linkend="dbdoclet.50438207_71633"/>), or
113             in case the OI table is otherwise corrupted. Later phases of LFSCK will add further
114             checks to the Lustre distributed file system state.</para>
115         <para condition='l24'>In Lustre software release 2.4, LFSCK namespace scanning can verify and repair the directory FID-in-Dirent and LinkEA consistency.
116 </para>
117         <para condition='l26'>In Lustre software release 2.6, LFSCK layout scanning can verify and repair MDT-OST file layout inconsistency. File layout inconsistencies between MDT-objects and OST-objects that are checked and corrected include dangling reference, unreferenced OST-objects, mismatched references and multiple references.
118 </para>
119         <para>Control and monitoring of LFSCK is through LFSCK and the <literal>/proc</literal> file system
120             interfaces. LFSCK supports three types of interface: switch interface, status
121             interface and adjustment interface. These interfaces are detailed below.</para>
122     <section>
123         <title>LFSCK switch interface</title>
124         <section>
125             <title>Manually Starting LFSCK</title>
126             <section>
127                 <title>Synopsis</title>
128                 <screen>lctl lfsck_start -M | --device <replaceable>[MDT,OST]_device</replaceable> \
129                     [-e | --error <replaceable>error_handle</replaceable>] \
130                     [-h | --help] \
131                     [-n | --dryrun <replaceable>switch</replaceable>] \
132                     [-r | --reset] \
133                     [-s | --speed <replaceable>speed_limit</replaceable>] \
134                     [-A | --all] \
135                     [-t | --type <replaceable>lfsck_type[,lfsck_type...]</replaceable>] \
136                     [-w | --windows <replaceable>win_size</replaceable>] \
137                     [-o | --orphan]
138                 </screen>
139             </section>
140             <section>
141                 <title>Description</title>
142                 <para>This command is used by LFSCK after the MDT is mounted.</para>
143             </section>
144             <section>
145                 <title>Options</title>
146                 <para>The various <literal>lfsck_start</literal> options are listed and described below. For a complete list of available options, type <literal>lctl lfsck_start -h</literal>.</para>
147                 <informaltable frame="all">
148                     <tgroup cols="2">
149                         <colspec colname="c1" colwidth="3*"/>
150                         <colspec colname="c2" colwidth="7*"/>
151                         <thead>
152                             <row>
153                                 <entry>
154                                     <para><emphasis role="bold">Option</emphasis></para>
155                                 </entry>
156                                 <entry>
157                                     <para><emphasis role="bold">Description</emphasis></para>
158                                 </entry>
159                             </row>
160                         </thead>
161                         <tbody>
162                             <row>
163                                 <entry>
164                                     <para><literal>-M | --device</literal> </para>
165                                 </entry>
166                                 <entry>
167                                     <para>The MDT or OST device to start LFSCK/scrub on.</para>
168                                 </entry>
169                             </row>
170                             <row>
171                                 <entry>
172                                     <para><literal>-e | --error</literal> </para>
173                                 </entry>
174                                 <entry>
175                                     <para>Error handle, <literal>continue</literal> (default) or <literal>abort</literal>. Specify whether the LFSCK will stop or not if fail to repair something. If it is not specified, the saved value (when resuming from checkpoint) will be used if present. This option cannot be changed if LFSCK is running.</para>
176                                 </entry>
177                             </row>
178                             <row>
179                                 <entry>
180                                     <para><literal>-h | --help</literal> </para>
181                                 </entry>
182                                 <entry>
183                                     <para>Operating help information.</para>
184                                 </entry>
185                             </row>
186                             <row>
187                                 <entry>
188                                     <para><literal>-n | --dryrun</literal> </para>
189                                 </entry>
190                                 <entry>
191                                     <para>Perform a trial without making any changes. <literal>off</literal> (default) or <literal>on</literal>.</para>
192                                 </entry>
193                             </row>
194                             <row>
195                                 <entry>
196                                     <para><literal>-r | --reset</literal> </para>
197                                 </entry>
198                                 <entry>
199                                     <para>Reset the start position for the object iteration to the beginning for the specified MDT. By default the iterator will resume scanning from the last checkpoint (saved periodically by LFSCK) provided it is available.</para>
200                                 </entry>
201                             </row>
202                             <row>
203                                 <entry>
204                                     <para><literal>-s | --speed</literal> </para>
205                                 </entry>
206                                 <entry>
207                                     <para>Set the upper speed limit of LFSCK processing in objects per second. If it is not specified, the saved value (when resuming from checkpoint) or default value of 0 (0 = run as fast as possible) is used. Speed can be adjusted while LFSCK is running with the adjustment interface.</para>
208                                 </entry>
209                             </row>
210                             <row>
211                                 <entry>
212                                     <para><literal>-A | --all</literal> </para>
213                                 </entry>
214                                 <entry>
215                                     <para condition='l26'>Start LFSCK on all devices via a single lctl command. It is not only used for layout consistency check/repair, but also for other LFSCK components, such as LFSCK for namespace consistency (LFSCK 1.5) and for DNE consistency check/repair in the future.</para>
216                                 </entry>
217                             </row>
218                             <row>
219                                 <entry>
220                                     <para><literal>-t | --type</literal> </para>
221                                 </entry>
222                                 <entry>
223                                     <para>The type of checking/repairing that should be performed. The new LFSCK framework provides a single interface for a variety of system consistency checking/repairing operations including:</para>
224 <para>Without a specified option, the LFSCK component(s) which ran last time and did not finish or the component(s) corresponding to some known system inconsistency, will be started. Anytime the LFSCK is triggered, the OI scrub will run automatically, so there is no need to specify OI_scrub.</para>
225 <para condition='l24'><literal>namespace</literal>: check and repair FID-in-Dirent and LinkEA consistency.</para>
226 <para condition='l26'><literal>layout</literal>: check and repair MDT-OST inconsistency.</para>
227                                 </entry>
228                             </row>
229                             <row>
230                                 <entry>
231                                     <para><literal>-w | --windows</literal> </para>
232                                 </entry>
233                                 <entry>
234                                     <para condition='l26'>The windows size for async requests pipeline.</para>
235                                 </entry>
236                             </row>
237                             <row>
238                                 <entry>
239                                     <para><literal>-o | --orphan</literal> </para>
240                                 </entry>
241                                 <entry>
242                                     <para condition='l26'>Handle orphan objects, such as orphan OST-objects for layout LFSCK.</para>
243                                 </entry>
244                             </row>
245                         </tbody>
246                     </tgroup>
247                 </informaltable>
248             </section>
249         </section>
250         <section>
251             <title>Manually Stopping LFSCK</title>
252             <section>
253                 <title>Synopsis</title>
254                 <screen>lctl lfsck_stop -M | --device <replaceable>[MDT,OST]_device</replaceable> \
255                     [-A | --all] \
256                     [-h | --help]
257                 </screen>
258             </section>
259             <section>
260                 <title>Description</title>
261                 <para>This command is used by LFSCK after the MDT is mounted.</para>
262             </section>
263             <section>
264                 <title>Options</title>
265                 <para>The various <literal>lfsck_stop</literal> options are listed and described below. For a complete list of available options, type <literal>lctl lfsck_stop -h</literal>.</para>
266                 <informaltable frame="all">
267                     <tgroup cols="2">
268                         <colspec colname="c1" colwidth="3*"/>
269                         <colspec colname="c2" colwidth="7*"/>
270                         <thead>
271                             <row>
272                                 <entry>
273                                     <para><emphasis role="bold">Option</emphasis></para>
274                                 </entry>
275                                 <entry>
276                                     <para><emphasis role="bold">Description</emphasis></para>
277                                 </entry>
278                             </row>
279                         </thead>
280                         <tbody>
281                             <row>
282                                 <entry>
283                                     <para><literal>-M | --device</literal> </para>
284                                 </entry>
285                                 <entry>
286                                     <para>The MDT or OST device to stop LFSCK/scrub on.</para>
287                                 </entry>
288                             </row>
289                             <row>
290                                 <entry>
291                                     <para><literal>-A | --all</literal> </para>
292                                 </entry>
293                                 <entry>
294                                     <para>Stop LFSCK on all devices.</para>
295                                 </entry>
296                             </row>
297                             <row>
298                                 <entry>
299                                     <para><literal>-h | --help</literal> </para>
300                                 </entry>
301                                 <entry>
302                                     <para>Operating help information.</para>
303                                 </entry>
304                             </row>
305                         </tbody>
306                     </tgroup>
307                 </informaltable>
308             </section>
309         </section>
310     </section>
311     <section>
312         <title>LFSCK status interface</title>
313         <section>
314             <title>LFSCK status of OI Scrub via <literal>procfs</literal></title>
315             <section >
316                 <title>Synopsis</title>
317                 <screen>lctl get_param -n osd-ldiskfs.<replaceable>FSNAME</replaceable>-<replaceable>MDT_device</replaceable>.oi_scrub
318                 </screen>
319             </section>
320             <section>
321                 <title>Description</title>
322                 <para>For each LFSCK component there is a dedicated procfs interface to trace corresponding LFSCK component status. For OI Scrub, the interface is the OSD layer procfs interface, named <literal>oi_scrub</literal>. To display OI Scrub status, the standard <literal>lctl get_param</literal> command is used as described in the synopsis.</para>
323             </section>
324             <section>
325                 <title>Output</title>
326                 <informaltable frame="all">
327                     <tgroup cols="2">
328                         <colspec colname="c1" colwidth="3*"/>
329                         <colspec colname="c2" colwidth="7*"/>
330                         <thead>
331                             <row>
332                                 <entry>
333                                     <para><emphasis role="bold">Information</emphasis></para>
334                                 </entry>
335                                 <entry>
336                                     <para><emphasis role="bold">Detail</emphasis></para>
337                                 </entry>
338                             </row>
339                         </thead>
340                         <tbody>
341                             <row>
342                                 <entry>
343                                     <para>General Information</para>
344                                 </entry>
345                                 <entry>
346                                     <itemizedlist>
347                                         <listitem><para>Name: OI_scrub.</para></listitem>
348                                         <listitem><para>OI scrub magic id (an identifier unique to OI scrub).</para></listitem>
349                                         <listitem><para>OI files count.</para></listitem>
350                                         <listitem><para>Status: one of the status - <literal>init</literal>, <literal>scanning</literal>, <literal>completed</literal>, <literal>failed</literal>, <literal>stopped</literal>, <literal>paused</literal>, or <literal>crashed</literal>.</para></listitem>
351                                         <listitem><para>Flags: including - <literal>recreated</literal> (OI file(s) is/are removed/recreated),
352                                                   <literal>inconsistent</literal> (restored from
353                                                   file-level backup), <literal>auto</literal>
354                                                   (triggered by non-UI mechanism), and
355                                                   <literal>upgrade</literal> (from Lustre software
356                                                   release 1.8 IGIF format.)</para></listitem>
357                                         <listitem><para>Parameters: OI scrub parameters, like <literal>failout</literal>.</para></listitem>
358                                         <listitem><para>Time Since Last Completed.</para></listitem>
359                                         <listitem><para>Time Since Latest Start.</para></listitem>
360                                         <listitem><para>Time Since Last Checkpoint.</para></listitem>
361                                         <listitem><para>Latest Start Position: the position for the latest scrub started from.</para></listitem>
362                                         <listitem><para>Last Checkpoint Position.</para></listitem>
363                                         <listitem><para>First Failure Position: the position for the first object to be repaired.</para></listitem>
364                                         <listitem><para>Current Position.</para></listitem>
365                                     </itemizedlist>
366                                 </entry>
367                             </row>
368                             <row>
369                                 <entry>
370                                     <para>Statistics</para>
371                                 </entry>
372                                 <entry>
373                                     <itemizedlist>
374                                         <listitem><para><literal>Checked</literal> total number of objects scanned.</para></listitem>
375                                         <listitem><para><literal>Updated</literal> total number of objects repaired.</para></listitem>
376                                         <listitem><para><literal>Failed</literal> total number of objects that failed to be repaired.</para></listitem>
377                                         <listitem><para><literal>No Scrub</literal> total number of objects marked <literal>LDISKFS_STATE_LUSTRE_NOSCRUB and skipped</literal>.</para></listitem>
378                                         <listitem><para><literal>IGIF</literal> total number of objects IGIF scanned.</para></listitem>
379                                         <listitem><para><literal>Prior Updated</literal> how many objects have been repaired which are triggered by parallel RPC.</para></listitem>
380                                         <listitem><para><literal>Success Count</literal> total number of completed OI_scrub runs on the device.</para></listitem>
381                                         <listitem><para><literal>Run Time</literal> how long the scrub has run, tally from the time of scanning from the beginning of the specified MDT device, not include the paused/failure time among checkpoints.</para></listitem>
382                                         <listitem><para><literal>Average Speed</literal> calculated by dividing <literal>Checked</literal> by <literal>run_time</literal>.</para></listitem>
383                                         <listitem><para><literal>Real-Time Speed</literal> the speed since last checkpoint if the OI_scrub is running.</para></listitem>
384                                         <listitem><para><literal>Scanned</literal> total number of objects under /lost+found that have been scanned.</para></listitem>
385                                         <listitem><para><literal>Repaired</literal> total number of objects under /lost+found that have been recovered.</para></listitem>
386                                         <listitem><para><literal>Failed</literal> total number of objects under /lost+found failed to be scanned or failed to be recovered.</para></listitem>
387                                     </itemizedlist>
388                                 </entry>
389                             </row>
390                         </tbody>
391                     </tgroup>
392                 </informaltable>
393             </section>
394         </section>
395         <section condition='l24'>
396             <title>LFSCK status of namespace via <literal>procfs</literal></title>
397             <section >
398                 <title>Synopsis</title>
399                 <screen>lctl get_param -n mdd.<replaceable>FSNAME</replaceable>-<replaceable>MDT_device</replaceable>.lfsck_namespace
400                 </screen>
401             </section>
402             <section>
403                 <title>Description</title>
404                 <para>The <literal>namespace</literal> component is responsible for checking and repairing FID-in-Dirent and LinkEA consistency. The <literal>procfs</literal> interface for this component is in the MDD layer, named <literal>lfsck_namespace</literal>. To show the status of this component <literal>lctl get_param</literal> should be used as described in the synopsis.</para>
405             </section>
406             <section>
407                 <title>Output</title>
408                 <informaltable frame="all">
409                     <tgroup cols="2">
410                         <colspec colname="c1" colwidth="3*"/>
411                         <colspec colname="c2" colwidth="7*"/>
412                         <thead>
413                             <row>
414                                 <entry>
415                                     <para><emphasis role="bold">Information</emphasis></para>
416                                 </entry>
417                                 <entry>
418                                     <para><emphasis role="bold">Detail</emphasis></para>
419                                 </entry>
420                             </row>
421                         </thead>
422                         <tbody>
423                             <row>
424                                 <entry>
425                                     <para>General Information</para>
426                                 </entry>
427                                 <entry>
428                                     <itemizedlist>
429                                         <listitem><para>Name: <literal>lfsck_namespace</literal></para></listitem>
430                                         <listitem><para>LFSCK namespace magic.</para></listitem>
431                                         <listitem><para>LFSCK namespace version..</para></listitem>
432                                         <listitem><para>Status: one of the status - <literal>init</literal>, <literal>scanning-phase1</literal>, <literal>scanning-phase2</literal>, <literal>completed</literal>, <literal>failed</literal>, <literal>stopped</literal>, <literal>paused</literal>, or <literal>crashed</literal>.</para></listitem>
433                                         <listitem><para>Flags: including - <literal>scanned-once</literal> (the first cycle scanning has been
434                                                   completed), <literal>inconsistent</literal> (one
435                                                   or more inconsistent FID-in-Dirent or LinkEA
436                                                   entries have been discovered),
437                                                   <literal>upgrade</literal> (from Lustre software
438                                                   release 1.8 IGIF format.)</para></listitem>
439                                         <listitem><para>Parameters: including <literal>dryrun</literal>, <literal>all_targets</literal> and <literal>failout</literal>.</para></listitem>
440                                         <listitem><para>Time Since Last Completed.</para></listitem>
441                                         <listitem><para>Time Since Latest Start.</para></listitem>
442                                         <listitem><para>Time Since Last Checkpoint.</para></listitem>
443                                         <listitem><para>Latest Start Position: the position the checking began most recently.</para></listitem>
444                                         <listitem><para>Last Checkpoint Position.</para></listitem>
445                                         <listitem><para>First Failure Position: the position for the first object to be repaired.</para></listitem>
446                                         <listitem><para>Current Position.</para></listitem>
447                                     </itemizedlist>
448                                 </entry>
449                             </row>
450                             <row>
451                                 <entry>
452                                     <para>Statistics</para>
453                                 </entry>
454                                 <entry>
455                                     <itemizedlist>
456                                         <listitem><para><literal>Checked Phase1</literal> total number of objects scanned during <literal>scanning-phase1</literal>.</para></listitem>
457                                         <listitem><para><literal>Checked Phase2</literal> total number of objects scanned during <literal>scanning-phase2</literal>.</para></listitem>
458                                         <listitem><para><literal>Updated Phase1</literal> total number of objects repaired during <literal>scanning-phase1</literal>.</para></listitem>
459                                         <listitem><para><literal>Updated Phase2</literal> total number of objects repaired during <literal>scanning-phase2</literal>.</para></listitem>
460                                         <listitem><para><literal>Failed Phase1</literal> total number of objets that failed to be repaired during <literal>scanning-phase1</literal>.</para></listitem>
461                                         <listitem><para><literal>Failed Phase2</literal> total number of objets that failed to be repaired during <literal>scanning-phase2</literal>.</para></listitem>
462                                         <listitem><para><literal>Dirs</literal> total number of directories scanned.</para></listitem>
463                                         <listitem><para><literal>M-linked</literal> total number of multiple-linked objects that have been scanned.</para></listitem>
464                                         <listitem><para><literal>Nlinks Repaired</literal> total number of objects with nlink attributes that have been repaired.</para></listitem>
465                                         <listitem><para><literal>Lost_found</literal> total number of objects that have had a name entry added back to the namespace.</para></listitem>
466                                         <listitem><para><literal>Success Count</literal> the total number of completed LFSCK runs on the device.</para></listitem>
467                                         <listitem><para><literal>Run Time Phase1</literal> the duration of the LFSCK run during <literal>scanning-phase1</literal>. Excluding the time spent paused between checkpoints.</para></listitem>
468                                         <listitem><para><literal>Run Time Phase2</literal> the duration of the LFSCK run during <literal>scanning-phase2</literal>. Excluding the time spent paused between checkpoints.</para></listitem>
469                                         <listitem><para><literal>Average Speed Phase1</literal> calculated by dividing <literal>checked_phase1</literal> by <literal>run_time_phase1</literal>.</para></listitem>
470                                         <listitem><para><literal>Average Speed Phase2</literal> calculated by dividing <literal>checked_phase2</literal> by <literal>run_time_phase1</literal>.</para></listitem>
471                                         <listitem><para><literal>Real-Time Speed Phase1</literal> the speed since the last checkpoint if the LFSCK is running <literal>scanning-phase1</literal>.</para></listitem>
472                                         <listitem><para><literal>Real-Time Speed Phase2</literal> the speed since the last checkpoint if the LFSCK is running <literal>scanning-phase2</literal>.</para></listitem>
473                                     </itemizedlist>
474                                 </entry>
475                             </row>
476                         </tbody>
477                     </tgroup>
478                 </informaltable>
479             </section>
480         </section>
481         <section condition='l26'>
482             <title>LFSCK status of layout via <literal>procfs</literal></title>
483             <section >
484                 <title>Synopsis</title>
485                 <screen>lctl get_param -n mdd.<replaceable>FSNAME</replaceable>-<replaceable>MDT_device</replaceable>.lfsck_layout
486 lctl get_param -n obdfilter.<replaceable>FSNAME</replaceable>-<replaceable>OST_device</replaceable>.lfsck_layout
487                 </screen>
488             </section>
489             <section>
490                 <title>Description</title>
491                 <para>The <literal>layout</literal> component is responsible for checking and repairing MDT-OST inconsistency. The <literal>procfs</literal> interface for this component is in the MDD layer, named <literal>lfsck_layout</literal>, and in the OBD layer, named <literal>lfsck_layout</literal>. To show the status of this component <literal>lctl get_param</literal> should be used as described in the synopsis.</para>
492             </section>
493             <section>
494                 <title>Output</title>
495                 <informaltable frame="all">
496                     <tgroup cols="2">
497                         <colspec colname="c1" colwidth="3*"/>
498                         <colspec colname="c2" colwidth="7*"/>
499                         <thead>
500                             <row>
501                                 <entry>
502                                     <para><emphasis role="bold">Information</emphasis></para>
503                                 </entry>
504                                 <entry>
505                                     <para><emphasis role="bold">Detail</emphasis></para>
506                                 </entry>
507                             </row>
508                         </thead>
509                         <tbody>
510                             <row>
511                                 <entry>
512                                     <para>General Information</para>
513                                 </entry>
514                                 <entry>
515                                     <itemizedlist>
516                                         <listitem><para>Name: <literal>lfsck_layout</literal></para></listitem>
517                                         <listitem><para>LFSCK namespace magic.</para></listitem>
518                                         <listitem><para>LFSCK namespace version..</para></listitem>
519                                         <listitem><para>Status: one of the status - <literal>init</literal>, <literal>scanning-phase1</literal>, <literal>scanning-phase2</literal>, <literal>completed</literal>, <literal>failed</literal>, <literal>stopped</literal>, <literal>paused</literal>, <literal>crashed</literal>, <literal>partial</literal>, <literal>co-failed</literal>, <literal>co-stopped</literal>, or <literal>co-paused</literal>.</para></listitem>
520                                         <listitem><para>Flags: including - <literal>scanned-once</literal> (the first cycle scanning has been
521                                                   completed), <literal>inconsistent</literal> (one
522                                                   or more MDT-OST inconsistencies
523                                                   have been discovered),
524                                                   <literal>incomplete</literal> (some MDT or OST did not participate in the LFSCK or failed to finish the LFSCK) or <literal>crashed_lastid</literal> (the lastid files on the OST crashed and needs to be rebuilt).</para></listitem>
525                                         <listitem><para>Parameters: including <literal>dryrun</literal>, <literal>all_targets</literal> and <literal>failout</literal>.</para></listitem>
526                                         <listitem><para>Time Since Last Completed.</para></listitem>
527                                         <listitem><para>Time Since Latest Start.</para></listitem>
528                                         <listitem><para>Time Since Last Checkpoint.</para></listitem>
529                                         <listitem><para>Latest Start Position: the position the checking began most recently.</para></listitem>
530                                         <listitem><para>Last Checkpoint Position.</para></listitem>
531                                         <listitem><para>First Failure Position: the position for the first object to be repaired.</para></listitem>
532                                         <listitem><para>Current Position.</para></listitem>
533                                     </itemizedlist>
534                                 </entry>
535                             </row>
536                             <row>
537                                 <entry>
538                                     <para>Statistics</para>
539                                 </entry>
540                                 <entry>
541                                     <itemizedlist>
542                                         <listitem><para><literal>Success Count:</literal> the total number of completed LFSCK runs on the device.</para></listitem>
543                                         <listitem><para><literal>Repaired Dangling:</literal> total number of MDT-objects with dangling reference have been repaired in the scanning-phase1.</para></listitem>
544                                         <listitem><para><literal>Repaired Unmatched Pairs</literal> total number of unmatched MDT and OST-object paris have been repaired in the scanning-phase1</para></listitem>
545                                         <listitem><para><literal>Repaired Multiple Referenced</literal> total number of OST-objects with multiple reference have been repaired in the scanning-phase1.</para></listitem>
546                                         <listitem><para><literal>Repaired Orphan</literal> total number of orphan OST-objects have been repaired in the scanning-phase2.</para></listitem>
547                                         <listitem><para><literal>Repaired Inconsistent Owner</literal> total number.of OST-objects with incorrect owner information have been repaired in the scanning-phase1.</para></listitem>
548                                         <listitem><para><literal>Repaired Others</literal> total number of.other inconsistency repaired in the scanning phases. </para></listitem>
549                                         <listitem><para><literal>Skipped</literal> Number of skipped objects.</para></listitem>
550                                         <listitem><para><literal>Failed Phase1</literal> total number of objects that failed to be repaired during <literal>scanning-phase1</literal>.</para></listitem>
551                                         <listitem><para><literal>Failed Phase2</literal> total number of objects that failed to be repaired during <literal>scanning-phase2</literal>.</para></listitem>
552                                         <listitem><para><literal>Checked Phase1</literal> total number of objects scanned during <literal>scanning-phase1</literal>.</para></listitem>
553                                         <listitem><para><literal>Checked Phase2</literal> total number of objects scanned during <literal>scanning-phase2</literal>.</para></listitem>
554                                         <listitem><para><literal>Run Time Phase1</literal> the duration of the LFSCK run during <literal>scanning-phase1</literal>. Excluding the time spent paused between checkpoints.</para></listitem>
555                                         <listitem><para><literal>Run Time Phase2</literal> the duration of the LFSCK run during <literal>scanning-phase2</literal>. Excluding the time spent paused between checkpoints.</para></listitem>
556                                         <listitem><para><literal>Average Speed Phase1</literal> calculated by dividing <literal>checked_phase1</literal> by <literal>run_time_phase1</literal>.</para></listitem>
557                                         <listitem><para><literal>Average Speed Phase2</literal> calculated by dividing <literal>checked_phase2</literal> by <literal>run_time_phase1</literal>.</para></listitem>
558                                         <listitem><para><literal>Real-Time Speed Phase1</literal> the speed since the last checkpoint if the LFSCK is running <literal>scanning-phase1</literal>.</para></listitem>
559                                         <listitem><para><literal>Real-Time Speed Phase2</literal> the speed since the last checkpoint if the LFSCK is running <literal>scanning-phase2</literal>.</para></listitem>
560                                     </itemizedlist>
561                                 </entry>
562                             </row>
563                         </tbody>
564                     </tgroup>
565                 </informaltable>
566             </section>
567         </section>
568     </section>
569     <section>
570         <title>LFSCK adjustment interface</title>
571         <section condition='l26'>
572             <title>Rate control</title>
573             <section>
574                 <title>Synopsis</title>
575                 <screen>lctl set_param mdd.${FSNAME}-${MDT_device}.lfsck_speed_limit=N
576 lctl set_param obdfilter.${FSNAME}-${OST_device}.lfsck_speed_limit=N</screen>
577             </section>
578             <section>
579                 <title>Description</title>
580                 <para>Change the LFSCK upper speed limit.</para>
581             </section>
582             <section>
583                 <title>Values</title>
584                 <informaltable frame="all">
585                     <tgroup cols="2">
586                         <colspec colname="c1" colwidth="3*"/>
587                         <colspec colname="c2" colwidth="7*"/>
588                         <tbody>
589                             <row>
590                                 <entry>
591                                     <para>0</para>
592                                 </entry>
593                                 <entry>
594                                     <para>No speed limit (run at maximum speed.)</para>
595                                 </entry>
596                             </row>
597                             <row>
598                                 <entry>
599                                     <para>positive integer</para>
600                                 </entry>
601                                 <entry>
602                                     <para>Maximum number of objects to scan per second.</para>
603                                 </entry>
604                             </row>
605                         </tbody>
606                     </tgroup>
607                 </informaltable>
608             </section>
609         </section>
610         <section>
611             <title>Mount options</title>
612             <section>
613                 <title>Synopsis</title>
614                 <screen>lctl set_param osd_ldiskfs.${FSNAME}-${MDT_device}.auto_scrub=N
615                 </screen>
616             </section>
617             <section>
618                 <title>Description</title>
619                 <para>Typically, the MDT will detect restoration from a file-level backup during mount. For convenience an mount option <literal>noscrub</literal> is provided for MDTs. <literal>noscrub</literal> prevents the OI Scrub starting automatically when the MDT is mounted. The administrator can start LFSCK manually after the MDT is mounted with <literal>lctl</literal>. Manually starting LFSCK after mounting provides finer control over the starting conditions.</para>
620             </section>
621             <section>
622                 <title>Values</title>
623                 <informaltable frame="all">
624                     <tgroup cols="2">
625                         <colspec colname="c1" colwidth="3*"/>
626                         <colspec colname="c2" colwidth="7*"/>
627                         <tbody>
628                             <row>
629                                 <entry>
630                                     <para>0</para>
631                                 </entry>
632                                 <entry>
633                                     <para>Do not start OI Scrub automatically.</para>
634                                 </entry>
635                             </row>
636                             <row>
637                                 <entry>
638                                     <para>positive integer</para>
639                                 </entry>
640                                 <entry>
641                                     <para>Manually start OI Scrub if needed.</para>
642                                 </entry>
643                             </row>
644                         </tbody>
645                     </tgroup>
646                 </informaltable>
647             </section>
648         </section>
649     </section>
650     </section>
651 </chapter>