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="lustretroubleshooting">
2 <title xml:id="lustretroubleshooting.title">Lustre File System Troubleshooting</title>
3 <para>This chapter provides information about troubleshooting a Lustre file system, submitting a
4 bug to the Jira bug tracking system, and Lustre file system performance tips. It includes the
5 following sections:</para>
8 <para><xref linkend="dbdoclet.50438198_11171"/></para>
11 <para><xref linkend="dbdoclet.reporting_lustre_problem"/></para>
14 <para><xref linkend="dbdoclet.50438198_93109"/></para>
17 <section xml:id="dbdoclet.50438198_11171">
18 <title><indexterm><primary>troubleshooting</primary></indexterm>
19 <indexterm><primary>lustre</primary><secondary>troubleshooting</secondary><see>troubleshooting</see></indexterm>
20 <indexterm><primary>lustre</primary><secondary>errors</secondary><see>troubleshooting</see></indexterm>
21 <indexterm><primary>errors</primary><see>troubleshooting</see></indexterm>
22 Lustre Error Messages</title>
23 <para>Several resources are available to help troubleshoot an issue in a Lustre file system.
24 This section describes error numbers, error messages and logs.</para>
26 <title><indexterm><primary>troubleshooting</primary><secondary>error numbers</secondary></indexterm>Error Numbers</title>
27 <para>Error numbers are generated by the Linux operating system and are located in
28 <literal>/usr/include/asm-generic/errno.h</literal>. The Lustre software does not use all
29 of the available Linux error numbers. The exact meaning of an error number depends on where
30 it is used. Here is a summary of the basic errors that Lustre file system users may
32 <informaltable frame="all">
34 <colspec colname="c1" colwidth="33*"/>
35 <colspec colname="c2" colwidth="33*"/>
36 <colspec colname="c3" colwidth="33*"/>
40 <para><emphasis role="bold">Error Number</emphasis></para>
43 <para><emphasis role="bold">Error Name</emphasis></para>
46 <para><emphasis role="bold">Description</emphasis></para>
56 <literal> -EPERM </literal>
59 <para> Permission is denied.</para>
65 <literal> -ENOENT </literal>
68 <para> The requested file or directory does not exist.</para>
76 <literal> -EINTR </literal>
79 <para> The operation was interrupted (usually CTRL-C or a killing process).</para>
87 <literal> -EIO </literal>
90 <para> The operation failed with a read or write error.</para>
98 <literal> -ENODEV </literal>
101 <para> No such device is available. The server stopped or failed over.</para>
109 <literal> -EINVAL </literal>
112 <para> The parameter contains an invalid value.</para>
120 <literal> -ENOSPC </literal>
123 <para> The file system is out-of-space or out of inodes. Use <literal>lfs df</literal> (query the amount of file system space) or <literal>lfs df -i</literal> (query the number of inodes).</para>
131 <literal> -EROFS </literal>
134 <para> The file system is read-only, likely due to a detected error.</para>
142 <literal> -EIDRM </literal>
145 <para> The UID/GID does not match any known UID/GID on the MDS. Update etc/hosts and etc/group on the MDS to add the missing user or group.</para>
153 <literal> -ENOTCONN </literal>
156 <para> The client is not connected to this server.</para>
164 <literal> -ETIMEDOUT </literal>
167 <para> The operation took too long and timed out.</para>
175 <literal> -EDQUOT </literal>
178 <para> The operation exceeded the user disk quota and was aborted.</para>
185 <section xml:id="dbdoclet.50438198_40669">
186 <title><indexterm><primary>troubleshooting</primary><secondary>error messages</secondary></indexterm>Viewing Error Messages</title>
187 <para>As Lustre software code runs on the kernel, single-digit error codes display to the
188 application; these error codes are an indication of the problem. Refer to the kernel console
189 log (dmesg) for all recent kernel messages from that node. On the node,
190 <literal>/var/log/messages</literal> holds a log of all messages for at least the past
192 <para>The error message initiates with "LustreError" in the console log and provides a short description of:</para>
195 <para>What the problem is</para>
198 <para>Which process ID had trouble</para>
201 <para>Which server node it was communicating with, and so on.</para>
204 <para>Lustre logs are dumped to <literal>/proc/sys/lnet/debug_path</literal>.</para>
205 <para>Collect the first group of messages related to a problem, and any messages that precede "LBUG" or "assertion failure" errors. Messages that mention server nodes (OST or MDS) are specific to that server; you must collect similar messages from the relevant server console logs.</para>
206 <para>Another Lustre debug log holds information for a short period of time for action by the
207 Lustre software, which, in turn, depends on the processes on the Lustre node. Use the
208 following command to extract debug logs on each of the nodes, run</para>
209 <screen>$ lctl dk <replaceable>filename</replaceable></screen>
211 <para>LBUG freezes the thread to allow capture of the panic stack. A system reboot is needed to clear the thread.</para>
215 <section xml:id="dbdoclet.reporting_lustre_problem">
217 <primary>troubleshooting</primary>
218 <secondary>reporting bugs</secondary>
219 </indexterm><indexterm>
220 <primary>reporting bugs</primary>
221 <see>troubleshooting</see>
222 </indexterm>Reporting a Lustre File System Bug</title>
223 <para>If you cannot resolve a problem by troubleshooting your Lustre file
224 system, other options are:<itemizedlist>
226 <para>Post a question to the <link xmlns:xlink="http://www.w3.org/1999/xlink"
227 xlink:href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">lustre-discuss</link>
228 email list or search the archives for information about your issue.</para>
231 <para>Submit a ticket to the <link xmlns:xlink="http://www.w3.org/1999/xlink"
232 xlink:href="https://jira.whamcloud.com/secure/Dashboard.jspa">Jira</link><abbrev><superscript>*</superscript></abbrev>
233 bug tracking and project management tool used for the Lustre project.
234 If you are a first-time user, you'll need to open an account by
235 clicking on <emphasis role="bold">Sign up</emphasis> on the
238 </itemizedlist> To submit a Jira ticket, follow these steps:<orderedlist>
240 <para>To avoid filing a duplicate ticket, search for existing
241 tickets for your issue.
242 <emphasis role="italic">For search tips, see
243 <xref xmlns:xlink="http://www.w3.org/1999/xlink"
244 linkend="dbdoclet.searching_jira"/>.</emphasis></para>
247 <para>To create a ticket, click <emphasis role="bold">+Create Issue</emphasis> in the
248 upper right corner. <emphasis role="italic">Create a separate ticket for each issue you
249 wish to submit.</emphasis></para>
252 <para>In the form displayed, enter the following information:<itemizedlist>
254 <para><emphasis role="italic">Project</emphasis> - Select <emphasis role="bold"
255 >Lustre</emphasis> or <emphasis role="bold">Lustre Documentation</emphasis> or
256 an appropriate project.</para>
259 <para><emphasis role="italic">Issue type</emphasis> - Select <emphasis role="bold"
260 >Bug</emphasis>.</para>
263 <para><emphasis role="italic">Summary</emphasis> - Enter a short description of the
264 issue. Use terms that would be useful for someone searching for a similar issue. A
265 LustreError or ASSERT/panic message often makes a good summary.</para>
268 <para><emphasis role="italic">Affects version(s)</emphasis> - Select your Lustre
272 <para><emphasis role="italic">Environment</emphasis> - Enter your kernel with
273 version number.</para>
276 <para><emphasis role="italic">Description</emphasis> - Include a detailed
277 description of <emphasis role="italic">visible symptoms</emphasis> and, if
278 possible, <emphasis role="italic">how the problem is produced</emphasis>. Other
279 useful information may include <emphasis role="italic">the behavior you expect to
280 see</emphasis> and <emphasis role="italic">what you have tried so far to
281 diagnose the problem</emphasis>.</para>
284 <para><emphasis role="italic">Attachments</emphasis> - Attach log sources such as
285 Lustre debug log dumps (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
286 linkend="dbdoclet.50438274_15874"/>), syslogs, or console logs. <emphasis
287 role="italic"><emphasis role="bold">Note:</emphasis></emphasis> Lustre debug
288 logs must be processed using <code>lctl df</code> prior to attaching to a Jira
289 ticket. For more information, see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
290 linkend="dbdoclet.50438274_62472"/>. </para>
292 </itemizedlist>Other fields in the form are used for project tracking and are irrelevant
293 to reporting an issue. You can leave these in their default state.</para>
295 </orderedlist></para>
296 <section xml:id="dbdoclet.searching_jira">
297 <title>Searching Jira<superscript>*</superscript>for Duplicate Tickets</title>
298 <para>Before submitting a ticket, always search the Jira bug tracker for
299 an existing ticket for your issue. This avoids duplicating effort and
300 may immediately provide you with a solution to your problem. </para>
301 <para>To do a search in the Jira bug tracker, select the
302 <emphasis role="bold">Issues</emphasis> tab and click on
303 <emphasis role="bold">New filter</emphasis>. Use the filters provided
304 to select criteria for your search. To search for specific text, enter
305 the text in the "Contains text" field and click the magnifying glass
307 <para>When searching for text such as an ASSERTION or LustreError
308 message, you can remove NIDs, pointers, and other installation-specific
309 and possibly version-specific text from your search string such as line
310 numbers by following the example below.</para>
311 <para><emphasis role="italic">Original error message:</emphasis></para>
312 <para><code>"(filter_io_26.c:</code>
313 <emphasis role="bold">791</emphasis><code>:filter_commitrw_write())
314 ASSERTION(oti->oti_transno<=obd->obd_last_committed) failed:
315 oti_transno </code><emphasis role="bold">752</emphasis>
316 <code>last_committed </code><emphasis role="bold">750</emphasis>
317 <code>"</code></para>
318 <para><emphasis role="italic">Optimized search string</emphasis></para>
319 <para><code>filter_commitrw_write ASSERTION oti_transno
320 obd_last_committed failed:</code></para>
323 <section xml:id="dbdoclet.50438198_93109">
325 <primary>troubleshooting</primary>
326 <secondary>common problems</secondary>
327 </indexterm>Common Lustre File System Problems</title>
328 <para>This section describes how to address common issues encountered with
329 a Lustre file system.</para>
331 <title>OST Object is Missing or Damaged</title>
332 <para>If the OSS fails to find an object or finds a damaged object,
333 this message appears:</para>
334 <para><screen>OST object missing or damaged (OST "ost1", object 98148, error -2)</screen></para>
335 <para>If the reported error is -2 (<literal>-ENOENT</literal>, or
336 "No such file or directory"), then the object is no longer
337 present on the OST, even though a file on the MDT is referencing it.
338 This can occur either because the MDT and OST are out of sync, or
339 because an OST object was corrupted and deleted by e2fsck.</para>
340 <para>If you have recovered the file system from a disk failure by using
341 e2fsck, then unrecoverable objects may have been deleted or moved to
342 /lost+found in the underlying OST filesystem. Because files on the MDT
343 still reference these objects, attempts to access them produce this
345 <para>If you have restored the filesystem from a backup of the raw MDT
346 or OST partition, then the restored partition is very likely to be out
347 of sync with the rest of your cluster. No matter which server partition
348 you restored from backup, files on the MDT may reference objects which
349 no longer exist (or did not exist when the backup was taken); accessing
350 those files produces this error.</para>
351 <para>If neither of those descriptions is applicable to your situation,
352 then it is possible that you have discovered a programming error that
353 allowed the servers to get out of sync.
354 Please submit a Jira ticket (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
355 linkend="dbdoclet.reporting_lustre_problem"/>).</para>
356 <para>If the reported error is anything else (such as -5,
357 "<literal>I/O error</literal>"), it likely indicates a storage
358 device failure. The low-level file system returns this error if it is
359 unable to read from the storage device.</para>
360 <para><emphasis role="bold">Suggested Action</emphasis></para>
361 <para>If the reported error is -2, you can consider checking in
362 <literal>lost+found/</literal> on your raw OST device, to see if the
363 missing object is there. However, it is likely that this object is
364 lost forever, and that the file that references the object is now
365 partially or completely lost. Restore this file from backup, or
366 salvage what you can using <literal>dd conv=noerror</literal>and
367 delete it using the <literal>unlink</literal> command.</para>
368 <para>If the reported error is anything else, then you should
369 immediately inspect this server for storage problems.</para>
372 <title>OSTs Become Read-Only</title>
373 <para>If the SCSI devices are inaccessible to the Lustre file system
374 at the block device level, then <literal>ldiskfs</literal> remounts
375 the device read-only to prevent file system corruption. This is a normal
376 behavior. The status in <literal>/proc/fs/lustre/health_check</literal>
377 also shows "not healthy" on the affected nodes.</para>
378 <para>To determine what caused the "not healthy" condition:</para>
381 <para>Examine the consoles of all servers for any error indications</para>
384 <para>Examine the syslogs of all servers for any LustreErrors or <literal>LBUG</literal></para>
387 <para>Check the health of your system hardware and network. (Are the disks working as expected, is the network dropping packets?)</para>
390 <para>Consider what was happening on the cluster at the time. Does this relate to a specific user workload or a system load condition? Is the condition reproducible? Does it happen at a specific time (day, week or month)?</para>
393 <para>To recover from this problem, you must restart Lustre services using these file systems. There is no other way to know that the I/O made it to disk, and the state of the cache may be inconsistent with what is on disk.</para>
396 <title>Identifying a Missing OST</title>
397 <para>If an OST is missing for any reason, you may need to know what files are affected. Although an OST is missing, the files system should be operational. From any mounted client node, generate a list of files that reside on the affected OST. It is advisable to mark the missing OST as 'unavailable' so clients and the MDS do not time out trying to contact it.</para>
400 <para>Generate a list of devices and determine the OST's device number. Run:</para>
401 <screen>$ lctl dl </screen>
402 <para>The lctl dl command output lists the device name and number, along with the device UUID and the number of references on the device.</para>
405 <para>Deactivate the OST (on the OSS at the MDS). Run:</para>
406 <screen>$ lctl --device <replaceable>lustre_device_number</replaceable> deactivate</screen>
407 <para>The OST device number or device name is generated by the lctl dl command.</para>
408 <para>The <literal>deactivate</literal> command prevents clients from creating new objects on the specified OST, although you can still access the OST for reading.</para>
410 <para>If the OST later becomes available it needs to be reactivated, run:</para>
411 <screen># lctl --device <replaceable>lustre_device_number</replaceable> activate</screen>
415 <para>Determine all files that are striped over the missing OST, run:</para>
416 <screen># lfs find -O {OST_UUID} /mountpoint</screen>
417 <para>This returns a simple list of filenames from the affected file system.</para>
420 <para>If necessary, you can read the valid parts of a striped file, run:</para>
421 <screen># dd if=filename of=new_filename bs=4k conv=sync,noerror</screen>
424 <para>You can delete these files with the <literal>unlink</literal> command.</para>
425 <screen># unlink filename {filename ...} </screen>
427 <para>When you run the <literal>unlink</literal> command, it may
428 return an error that the file could not be found, but the file
429 on the MDS has been permanently removed.</para>
433 <para>If the file system cannot be mounted, currently there is no way
434 that parses metadata directly from an MDS. If the bad OST does not
435 start, options to mount the file system are to provide a loop device
436 OST in its place or replace it with a newly-formatted OST. In that case,
437 the missing objects are created and are read as zero-filled.</para>
439 <section xml:id="dbdoclet.repair_ost_lastid">
440 <title>Fixing a Bad LAST_ID on an OST</title>
441 <para>Each OST contains a <literal>LAST_ID</literal> file, which holds
442 the last object (pre-)created by the MDS
443 <footnote><para>The contents of the <literal>LAST_ID</literal>
444 file must be accurate regarding the actual objects that exist
445 on the OST.</para></footnote>.
446 The MDT contains a <literal>lov_objid</literal> file, with values
447 that represent the last object the MDS has allocated to a file.</para>
448 <para>During normal operation, the MDT keeps pre-created (but unused)
449 objects on the OST, and normally <literal>LAST_ID</literal> should be
450 larger than <literal>lov_objid</literal>. Any small difference in the
451 values is a result of objects being precreated on the OST to improve
452 MDS file creation performance. These precreated objects are not yet
453 allocated to a file, since they are of zero length (empty).</para>
454 <para>However, in the case where <literal>lov_objid</literal> is
455 larger than <literal>LAST_ID</literal>, it indicates the MDS has
456 allocated objects to files that do not exist on the OST. Conversely,
457 if <literal>lov_objid</literal> is significantly less than
458 <literal>LAST_ID</literal> (by at least 20,000 objects) it indicates
459 the OST previously allocated objects at the request of the MDS (which
460 likely contain data) but it doesn't know about them.</para>
461 <para condition='l25'>Since Lustre 2.5 the MDS and OSS will resync the
462 <literal>lov_objid</literal> and <literal>LAST_ID</literal> files
463 automatically if they become out of sync. This may result in some
464 space on the OSTs becoming unavailable until LFSCK is next run, but
465 avoids issues with mounting the filesystem.</para>
466 <para condition='l26'>Since Lustre 2.6 the LFSCK will repair the
467 <literal>LAST_ID</literal> file on the OST automatically based on
468 the objects that exist on the OST, in case it was corrupted.</para>
469 <para>In situations where there is on-disk corruption of the OST, for
470 example caused by the disk write cache being lost, or if the OST
471 was restored from an old backup or reformatted, the
472 <literal>LAST_ID</literal> value may become inconsistent and result
473 in a message similar to:</para>
474 <screen>"myth-OST0002: Too many FIDs to precreate,
475 OST replaced or reformatted: LFSCK will clean up"</screen>
476 <para>A related situation may happen if there is a significant
477 discrepancy between the record of previously-created objects on the
478 OST and the previously-allocated objects on the MDT, for example if
479 the MDT has been corrupted, or restored from backup, which would cause
480 significant data loss if left unchecked. This produces a message
482 <screen>"myth-OST0002: too large difference between
483 MDS LAST_ID [0x1000200000000:0x100048:0x0] (1048648) and
484 OST LAST_ID [0x1000200000000:0x2232123:0x0] (35856675), trust the OST"</screen>
485 <para>In such cases, the MDS will advance the <literal>lov_objid</literal>
486 value to match that of the OST to avoid deleting existing objects,
487 which may contain data. Files on the MDT that reference these objects
488 will not be lost. Any unreferenced OST objects will be attached to
489 the <literal>.lustre/lost+found</literal> directory the next time
490 LFSCK <literal>layout</literal> check is run.</para>
493 <title><indexterm><primary>troubleshooting</primary><secondary>'Address already in use'</secondary></indexterm>Handling/Debugging "<literal>Bind: Address already in use</literal>" Error</title>
494 <para>During startup, the Lustre software may report a <literal>bind: Address already in
495 use</literal> error and reject to start the operation. This is caused by a portmap service
496 (often NFS locking) that starts before the Lustre file system and binds to the default port
497 988. You must have port 988 open from firewall or IP tables for incoming connections on the
498 client, OSS, and MDS nodes. LNet will create three outgoing connections on available,
499 reserved ports to each client-server pair, starting with 1023, 1022 and 1021.</para>
500 <para>Unfortunately, you cannot set sunprc to avoid port 988. If you receive this error, do the following:</para>
503 <para>Start the Lustre file system before starting any service that uses sunrpc.</para>
506 <para>Use a port other than 988 for the Lustre file system. This is configured in
507 <literal>/etc/modprobe.d/lustre.conf</literal> as an option to the LNet module. For
509 <screen>options lnet accept_port=988</screen>
514 <para>Add modprobe ptlrpc to your system startup scripts before the service that uses
515 sunrpc. This causes the Lustre file system to bind to port 988 and sunrpc to select a
516 different port.</para>
520 <para>You can also use the <literal>sysctl</literal> command to mitigate the NFS client from grabbing the Lustre service port. However, this is a partial workaround as other user-space RPC servers still have the ability to grab the port.</para>
524 <title><indexterm><primary>troubleshooting</primary><secondary>'Error -28'</secondary></indexterm>Handling/Debugging Error "- 28"</title>
525 <para>A Linux error -28 (<literal>ENOSPC</literal>) that occurs during
526 a write or sync operation indicates that an existing file residing
527 on an OST could not be rewritten or updated because the OST was full,
528 or nearly full. To verify if this is the case, run on a client:</para>
531 UUID bytes Used Available Use% Mounted on
532 myth-MDT0000_UUID 12.9G 1.5G 10.6G 12% /myth[MDT:0]
533 myth-OST0000_UUID 3.6T 3.1T 388.9G 89% /myth[OST:0]
534 myth-OST0001_UUID 3.6T 3.6T 64.0K 100% /myth[OST:1]
535 myth-OST0002_UUID 3.6T 3.1T 394.6G 89% /myth[OST:2]
536 myth-OST0003_UUID 5.4T 5.0T 267.8G 95% /myth[OST:3]
537 myth-OST0004_UUID 5.4T 2.9T 2.2T 57% /myth[OST:4]
539 filesystem_summary: 21.6T 17.8T 3.2T 85% /myth
541 <para>To address this issue, you can expand the disk space on the OST,
542 or use the <literal>lfs_migrate</literal> command to migrate (move)
543 files to a less full OST. For details on both of these options
544 see <xref linkend="dbdoclet.adding_new_ost" /></para>
545 <para condition='l26'>In some cases, there may be processes holding
546 files open that are consuming a significant amount of space (e.g.
547 runaway process writing lots of data to an open file that has been
548 deleted). It is possible to get a list of all open file handles in the
549 filesystem from the MDS:
551 mds# lctl get_param mdt.*.exports.*.open_files
552 mdt.myth-MDT0000.exports.192.168.20.159@tcp.open_files=
553 [0x200003ab4:0x435:0x0]
554 [0x20001e863:0x1c1:0x0]
555 [0x20001e863:0x1c2:0x0]
559 These file handles can be converted into pathnames on any client via
560 the <literal>lfs fid2path</literal> command (as root):
562 client# lfs fid2path /myth [0x200003ab4:0x435:0x0] [0x20001e863:0x1c1:0x0] [0x20001e863:0x1c2:0x0]
563 lfs fid2path: cannot find '[0x200003ab4:0x435:0x0]': No such file or directory
569 In some cases, if the file has been deleted from the filesystem,
570 <literal>fid2path</literal> will return an error that the file is
571 not found. You can use the client NID
572 (<literal>192.168.20.159@tcp</literal> in the above example) to
573 determine which node the file is open on, and <literal>lsof</literal>
574 to find and kill the process that is holding the file open:
577 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
578 logger 13806 mythtv 0r REG 35,632494 1901048576384 144115440203858997 /myth/logs/job.1283929.log (deleted)
581 <para>A Linux error -28 (<literal>ENOSPC</literal>) that occurs when
582 a new file is being created may indicate that the MDT has run out
583 of inodes and needs to be made larger. Newly created files are not
584 written to full OSTs, while existing files continue to reside on
585 the OST where they were initially created. To view inode information
586 on the MDT, run on a client:</para>
589 UUID Inodes IUsed IFree IUse% Mounted on
590 myth-MDT0000_UUID 1910263 1910263 0 100% /myth[MDT:0]
591 myth-OST0000_UUID 947456 360059 587397 89% /myth[OST:0]
592 myth-OST0001_UUID 948864 233748 715116 91% /myth[OST:1]
593 myth-OST0002_UUID 947456 549961 397495 89% /myth[OST:2]
594 myth-OST0003_UUID 1426144 477595 948549 95% /myth[OST:3]
595 myth-OST0004_UUID 1426080 465248 1420832 57% /myth[OST:4]
597 filesystem_summary: 1910263 1910263 0 100% /myth
599 <para>Typically, the Lustre software reports this error to your
600 application. If the application is checking the return code from
601 its function calls, then it decodes it into a textual error message
602 such as <literal>No space left on device</literal>. The numeric
603 error message may also appear in the system log.</para>
604 <para>For more information about the <literal>lfs df</literal> command,
605 see <xref linkend="dbdoclet.checking_free_space"/>.</para>
606 <para>You can also use the <literal>lctl get_param</literal> command to
607 monitor the space and object usage on the OSTs and MDTs from any
609 <screen>lctl get_param {osc,mdc}.*.{kbytes,files}{free,avail,total}
612 <para>You can find other numeric error codes along with a short name
613 and text description in <literal>/usr/include/asm/errno.h</literal>.
618 <title>Triggering Watchdog for PID NNN</title>
619 <para>In some cases, a server node triggers a watchdog timer and this causes a process stack to be dumped to the console along with a Lustre kernel debug log being dumped into <literal>/tmp</literal> (by default). The presence of a watchdog timer does NOT mean that the thread OOPSed, but rather that it is taking longer time than expected to complete a given operation. In some cases, this situation is expected.</para>
620 <para>For example, if a RAID rebuild is really slowing down I/O on an OST, it might trigger watchdog timers to trip. But another message follows shortly thereafter, indicating that the thread in question has completed processing (after some number of seconds). Generally, this indicates a transient problem. In other cases, it may legitimately signal that a thread is stuck because of a software error (lock inversion, for example).</para>
621 <screen>Lustre: 0:0:(watchdog.c:122:lcw_cb()) </screen>
622 <para>The above message indicates that the watchdog is active for pid 933:</para>
623 <para>It was inactive for 100000ms:</para>
624 <screen>Lustre: 0:0:(linux-debug.c:132:portals_debug_dumpstack()) </screen>
625 <para>Showing stack for process:</para>
626 <screen>933 ll_ost_25 D F896071A 0 933 1 934 932 (L-TLB)
627 f6d87c60 00000046 00000000 f896071a f8def7cc 00002710 00001822 2da48cae
628 0008cf1a f6d7c220 f6d7c3d0 f6d86000 f3529648 f6d87cc4 f3529640 f8961d3d
629 00000010 f6d87c9c ca65a13c 00001fff 00000001 00000001 00000000 00000001</screen>
630 <para>Call trace:</para>
631 <screen>filter_do_bio+0x3dd/0xb90 [obdfilter]
632 default_wake_function+0x0/0x20
633 filter_direct_io+0x2fb/0x990 [obdfilter]
634 filter_preprw_read+0x5c5/0xe00 [obdfilter]
635 lustre_swab_niobuf_remote+0x0/0x30 [ptlrpc]
636 ost_brw_read+0x18df/0x2400 [ost]
637 ost_handle+0x14c2/0x42d0 [ost]
638 ptlrpc_server_handle_request+0x870/0x10b0 [ptlrpc]
639 ptlrpc_main+0x42e/0x7c0 [ptlrpc]
644 <primary>troubleshooting</primary>
645 <secondary>timeouts on setup</secondary>
646 </indexterm>Handling Timeouts on Initial Lustre File System Setup</title>
647 <para>If you come across timeouts or hangs on the initial setup of your Lustre file system,
648 verify that name resolution for servers and clients is working correctly. Some distributions
649 configure <literal>/etc/hosts</literal> so the name of the local machine (as reported by the
650 'hostname' command) is mapped to local host (127.0.0.1) instead of a proper IP
652 <para>This might produce this error:</para>
653 <screen>LustreError:(ldlm_handle_cancel()) received cancel for unknown lock cookie
654 0xe74021a4b41b954e from nid 0x7f000001 (0:127.0.0.1)
658 <title>Handling/Debugging "LustreError: xxx went back in time"</title>
659 <para>Each time the Lustre software changes the state of the disk file system, it records a
660 unique transaction number. Occasionally, when committing these transactions to the disk, the
661 last committed transaction number displays to other nodes in the cluster to assist the
662 recovery. Therefore, the promised transactions remain absolutely safe on the disappeared
664 <para>This situation arises when:</para>
667 <para>You are using a disk device that claims to have data written to disk before it
668 actually does, as in case of a device with a large cache. If that disk device crashes or
669 loses power in a way that causes the loss of the cache, there can be a loss of
670 transactions that you believe are committed. This is a very serious event, and you
671 should run e2fsck against that storage before restarting the Lustre file system.</para>
674 <para>As required by the Lustre software, the shared storage used for failover is
675 completely cache-coherent. This ensures that if one server takes over for another, it
676 sees the most up-to-date and accurate copy of the data. In case of the failover of the
677 server, if the shared storage does not provide cache coherency between all of its ports,
678 then the Lustre software can produce an error.</para>
681 <para>If you know the exact reason for the error, then it is safe to proceed with no further action. If you do not know the reason, then this is a serious issue and you should explore it with your disk vendor.</para>
682 <para>If the error occurs during failover, examine your disk cache settings. If it occurs after a restart without failover, try to determine how the disk can report that a write succeeded, then lose the Data Device corruption or Disk Errors.</para>
685 <title>Lustre Error: "<literal>Slow Start_Page_Write</literal>"</title>
686 <para>The slow <literal>start_page_write</literal> message appears when the operation takes an extremely long time to allocate a batch of memory pages. Use these pages to receive network traffic first, and then write to disk.</para>
689 <title>Drawbacks in Doing Multi-client O_APPEND Writes</title>
690 <para>It is possible to do multi-client <literal>O_APPEND</literal> writes to a single file, but there are few drawbacks that may make this a sub-optimal solution. These drawbacks are:</para>
693 <para> Each client needs to take an <literal>EOF</literal> lock on all the OSTs, as it is difficult to know which OST holds the end of the file until you check all the OSTs. As all the clients are using the same <literal>O_APPEND</literal>, there is significant locking overhead.</para>
696 <para> The second client cannot get all locks until the end of the writing of the first client, as the taking serializes all writes from the clients.</para>
699 <para> To avoid deadlocks, the taking of these locks occurs in a known, consistent order. As a client cannot know which OST holds the next piece of the file until the client has locks on all OSTS, there is a need of these locks in case of a striped file.</para>
705 <primary>troubleshooting</primary>
706 <secondary>slowdown during startup</secondary>
707 </indexterm>Slowdown Occurs During Lustre File System Startup</title>
708 <para>When a Lustre file system starts, it needs to read in data from the disk. For the very
709 first mdsrate run after the reboot, the MDS needs to wait on all the OSTs for object
710 pre-creation. This causes a slowdown to occur when the file system starts up.</para>
711 <para>After the file system has been running for some time, it contains more data in cache and hence, the variability caused by reading critical metadata from disk is mostly eliminated. The file system now reads data from the cache.</para>
714 <title><indexterm><primary>troubleshooting</primary><secondary>OST out of memory</secondary></indexterm>Log Message <literal>'Out of Memory</literal>' on OST</title>
715 <para>When planning the hardware for an OSS node, consider the memory usage of several
716 components in the Lustre file system. If insufficient memory is available, an 'out of
717 memory' message can be logged.</para>
718 <para>During normal operation, several conditions indicate insufficient RAM on a server node:</para>
721 <para> kernel "<literal>Out of memory</literal>" and/or "<literal>oom-killer</literal>" messages</para>
724 <para> Lustre "<literal>kmalloc of 'mmm' (NNNN bytes) failed...</literal>" messages</para>
727 <para> Lustre or kernel stack traces showing processes stuck in "<literal>try_to_free_pages</literal>"</para>
730 <para>For information on determining the MDS memory and OSS memory requirements, see <xref linkend="dbdoclet.50438256_26456"/>.</para>
733 <title>Setting SCSI I/O Sizes</title>
734 <para>Some SCSI drivers default to a maximum I/O size that is too small for good Lustre file
735 system performance. we have fixed quite a few drivers, but you may still find that some
736 drivers give unsatisfactory performance with the Lustre file system. As the default value is
737 hard-coded, you need to recompile the drivers to change their default. On the other hand,
738 some drivers may have a wrong default set.</para>
739 <para>If you suspect bad I/O performance and an analysis of Lustre file system statistics
740 indicates that I/O is not 1 MB, check
741 <literal>/sys/block/<replaceable>device</replaceable>/queue/max_sectors_kb</literal>. If
742 the <literal>max_sectors_kb</literal> value is less than 1024, set it to at least 1024 to
743 improve performance. If changing <literal>max_sectors_kb</literal> does not change the I/O
744 size as reported by the Lustre software, you may want to examine the SCSI driver