1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook"
3 xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US"
4 xml:id="lustretroubleshooting">
5 <title xml:id="lustretroubleshooting.title">Lustre File System Troubleshooting</title>
6 <para>This chapter provides information about troubleshooting a Lustre file system, submitting a
7 bug to the Jira bug tracking system, and Lustre file system performance tips. It includes the
8 following sections:</para>
11 <para><xref linkend="dbdoclet.50438198_11171"/></para>
14 <para><xref linkend="dbdoclet.reporting_lustre_problem"/></para>
17 <para><xref linkend="dbdoclet.50438198_93109"/></para>
20 <section xml:id="dbdoclet.50438198_11171">
21 <title><indexterm><primary>troubleshooting</primary></indexterm>
22 <indexterm><primary>lustre</primary><secondary>troubleshooting</secondary><see>troubleshooting</see></indexterm>
23 <indexterm><primary>lustre</primary><secondary>errors</secondary><see>troubleshooting</see></indexterm>
24 <indexterm><primary>errors</primary><see>troubleshooting</see></indexterm>
25 Lustre Error Messages</title>
26 <para>Several resources are available to help troubleshoot an issue in a Lustre file system.
27 This section describes error numbers, error messages and logs.</para>
29 <title><indexterm><primary>troubleshooting</primary><secondary>error numbers</secondary></indexterm>Error Numbers</title>
30 <para>Error numbers are generated by the Linux operating system and are located in
31 <literal>/usr/include/asm-generic/errno.h</literal>. The Lustre software does not use all
32 of the available Linux error numbers. The exact meaning of an error number depends on where
33 it is used. Here is a summary of the basic errors that Lustre file system users may
35 <informaltable frame="all">
37 <colspec colname="c1" colwidth="33*"/>
38 <colspec colname="c2" colwidth="33*"/>
39 <colspec colname="c3" colwidth="33*"/>
43 <para><emphasis role="bold">Error Number</emphasis></para>
46 <para><emphasis role="bold">Error Name</emphasis></para>
49 <para><emphasis role="bold">Description</emphasis></para>
59 <literal> -EPERM </literal>
62 <para> Permission is denied.</para>
68 <literal> -ENOENT </literal>
71 <para> The requested file or directory does not exist.</para>
79 <literal> -EINTR </literal>
82 <para> The operation was interrupted (usually CTRL-C or a killing process).</para>
90 <literal> -EIO </literal>
93 <para> The operation failed with a read or write error.</para>
101 <literal> -ENODEV </literal>
104 <para> No such device is available. The server stopped or failed over.</para>
112 <literal> -EINVAL </literal>
115 <para> The parameter contains an invalid value.</para>
123 <literal> -ENOSPC </literal>
126 <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>
134 <literal> -EROFS </literal>
137 <para> The file system is read-only, likely due to a detected error.</para>
145 <literal> -EIDRM </literal>
148 <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>
156 <literal> -ENOTCONN </literal>
159 <para> The client is not connected to this server.</para>
167 <literal> -ETIMEDOUT </literal>
170 <para> The operation took too long and timed out.</para>
178 <literal> -EDQUOT </literal>
181 <para> The operation exceeded the user disk quota and was aborted.</para>
188 <section xml:id="dbdoclet.50438198_40669">
189 <title><indexterm><primary>troubleshooting</primary><secondary>error messages</secondary></indexterm>Viewing Error Messages</title>
190 <para>As Lustre software code runs on the kernel, single-digit error codes display to the
191 application; these error codes are an indication of the problem. Refer to the kernel console
192 log (dmesg) for all recent kernel messages from that node. On the node,
193 <literal>/var/log/messages</literal> holds a log of all messages for at least the past
195 <para>The error message initiates with "LustreError" in the console log and provides a short description of:</para>
198 <para>What the problem is</para>
201 <para>Which process ID had trouble</para>
204 <para>Which server node it was communicating with, and so on.</para>
207 <para>Lustre logs are dumped to the pathname stored in the parameter
208 <literal>lnet.debug_path</literal>.</para>
209 <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>
210 <para>Another Lustre debug log holds information for a short period of time for action by the
211 Lustre software, which, in turn, depends on the processes on the Lustre node. Use the
212 following command to extract debug logs on each of the nodes, run</para>
213 <screen>$ lctl dk <replaceable>filename</replaceable></screen>
215 <para>LBUG freezes the thread to allow capture of the panic stack. A system reboot is needed to clear the thread.</para>
219 <section xml:id="dbdoclet.reporting_lustre_problem">
221 <primary>troubleshooting</primary>
222 <secondary>reporting bugs</secondary>
223 </indexterm><indexterm>
224 <primary>reporting bugs</primary>
225 <see>troubleshooting</see>
226 </indexterm>Reporting a Lustre File System Bug</title>
227 <para>If you cannot resolve a problem by troubleshooting your Lustre file
228 system, other options are:<itemizedlist>
230 <para>Post a question to the <link xmlns:xlink="http://www.w3.org/1999/xlink"
231 xlink:href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">lustre-discuss</link>
232 email list or search the archives for information about your issue.</para>
235 <para>Submit a ticket to the <link xmlns:xlink="http://www.w3.org/1999/xlink"
236 xlink:href="https://jira.whamcloud.com/">Jira</link>
237 <abbrev><superscript>*</superscript></abbrev>
238 bug tracking and project management tool used for the Lustre project.
239 If you are a first-time user, you'll need to open an account by
240 clicking on <emphasis role="bold">Sign up</emphasis> on the
243 </itemizedlist> To submit a Jira ticket, follow these steps:<orderedlist>
245 <para>To avoid filing a duplicate ticket, search for existing
246 tickets for your issue.
247 <emphasis role="italic">For search tips, see
248 <xref xmlns:xlink="http://www.w3.org/1999/xlink"
249 linkend="dbdoclet.searching_jira"/>.</emphasis></para>
252 <para>To create a ticket, click <emphasis role="bold">+Create Issue</emphasis> in the
253 upper right corner. <emphasis role="italic">Create a separate ticket for each issue you
254 wish to submit.</emphasis></para>
257 <para>In the form displayed, enter the following information:<itemizedlist>
259 <para><emphasis role="italic">Project</emphasis> - Select <emphasis role="bold"
260 >Lustre</emphasis> or <emphasis role="bold">Lustre Documentation</emphasis> or
261 an appropriate project.</para>
264 <para><emphasis role="italic">Issue type</emphasis> - Select <emphasis role="bold"
265 >Bug</emphasis>.</para>
268 <para><emphasis role="italic">Summary</emphasis> - Enter a short description of the
269 issue. Use terms that would be useful for someone searching for a similar issue. A
270 LustreError or ASSERT/panic message often makes a good summary.</para>
273 <para><emphasis role="italic">Affects version(s)</emphasis> - Select your Lustre
277 <para><emphasis role="italic">Environment</emphasis> - Enter your kernel with
278 version number.</para>
281 <para><emphasis role="italic">Description</emphasis> - Include a detailed
282 description of <emphasis role="italic">visible symptoms</emphasis> and, if
283 possible, <emphasis role="italic">how the problem is produced</emphasis>. Other
284 useful information may include <emphasis role="italic">the behavior you expect to
285 see</emphasis> and <emphasis role="italic">what you have tried so far to
286 diagnose the problem</emphasis>.</para>
289 <para><emphasis role="italic">Attachments</emphasis> - Attach log sources such as
290 Lustre debug log dumps (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
291 linkend="dbdoclet.50438274_15874"/>), syslogs, or console logs. <emphasis
292 role="italic"><emphasis role="bold">Note:</emphasis></emphasis> Lustre debug
293 logs must be processed using <code>lctl df</code> prior to attaching to a Jira
294 ticket. For more information, see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
295 linkend="dbdoclet.50438274_62472"/>. </para>
297 </itemizedlist>Other fields in the form are used for project tracking and are irrelevant
298 to reporting an issue. You can leave these in their default state.</para>
300 </orderedlist></para>
301 <section xml:id="dbdoclet.searching_jira">
302 <title>Searching Jira<superscript>*</superscript>for Duplicate Tickets</title>
303 <para>Before submitting a ticket, always search the Jira bug tracker for
304 an existing ticket for your issue. This avoids duplicating effort and
305 may immediately provide you with a solution to your problem. </para>
306 <para>To do a search in the Jira bug tracker, select the
307 <emphasis role="bold">Issues</emphasis> tab and click on
308 <emphasis role="bold">New filter</emphasis>. Use the filters provided
309 to select criteria for your search. To search for specific text, enter
310 the text in the "Contains text" field and click the magnifying glass
312 <para>When searching for text such as an ASSERTION or LustreError
313 message, you can remove NIDs, pointers, and other installation-specific
314 and possibly version-specific text from your search string such as line
315 numbers by following the example below.</para>
316 <para><emphasis role="italic">Original error message:</emphasis></para>
317 <para><code>"(filter_io_26.c:</code>
318 <emphasis role="bold">791</emphasis><code>:filter_commitrw_write())
319 ASSERTION(oti->oti_transno<=obd->obd_last_committed) failed:
320 oti_transno </code><emphasis role="bold">752</emphasis>
321 <code>last_committed </code><emphasis role="bold">750</emphasis>
322 <code>"</code></para>
323 <para><emphasis role="italic">Optimized search string</emphasis></para>
324 <para><code>filter_commitrw_write ASSERTION oti_transno
325 obd_last_committed failed:</code></para>
328 <section xml:id="dbdoclet.50438198_93109">
330 <primary>troubleshooting</primary>
331 <secondary>common problems</secondary>
332 </indexterm>Common Lustre File System Problems</title>
333 <para>This section describes how to address common issues encountered with
334 a Lustre file system.</para>
336 <title>OST Object is Missing or Damaged</title>
337 <para>If the OSS fails to find an object or finds a damaged object,
338 this message appears:</para>
339 <para><screen>OST object missing or damaged (OST "ost1", object 98148, error -2)</screen></para>
340 <para>If the reported error is -2 (<literal>-ENOENT</literal>, or
341 "No such file or directory"), then the object is no longer
342 present on the OST, even though a file on the MDT is referencing it.
343 This can occur either because the MDT and OST are out of sync, or
344 because an OST object was corrupted and deleted by e2fsck.</para>
345 <para>If you have recovered the file system from a disk failure by using
346 e2fsck, then unrecoverable objects may have been deleted or moved to
347 /lost+found in the underlying OST filesystem. Because files on the MDT
348 still reference these objects, attempts to access them produce this
350 <para>If you have restored the filesystem from a backup of the raw MDT
351 or OST partition, then the restored partition is very likely to be out
352 of sync with the rest of your cluster. No matter which server partition
353 you restored from backup, files on the MDT may reference objects which
354 no longer exist (or did not exist when the backup was taken); accessing
355 those files produces this error.</para>
356 <para>If neither of those descriptions is applicable to your situation,
357 then it is possible that you have discovered a programming error that
358 allowed the servers to get out of sync.
359 Please submit a Jira ticket (see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
360 linkend="dbdoclet.reporting_lustre_problem"/>).</para>
361 <para>If the reported error is anything else (such as -5,
362 "<literal>I/O error</literal>"), it likely indicates a storage
363 device failure. The low-level file system returns this error if it is
364 unable to read from the storage device.</para>
365 <para><emphasis role="bold">Suggested Action</emphasis></para>
366 <para>If the reported error is -2, you can consider checking in
367 <literal>lost+found/</literal> on your raw OST device, to see if the
368 missing object is there. However, it is likely that this object is
369 lost forever, and that the file that references the object is now
370 partially or completely lost. Restore this file from backup, or
371 salvage what you can using <literal>dd conv=noerror</literal>and
372 delete it using the <literal>unlink</literal> command.</para>
373 <para>If the reported error is anything else, then you should
374 immediately inspect this server for storage problems.</para>
377 <title>OSTs Become Read-Only</title>
378 <para>If the SCSI devices are inaccessible to the Lustre file system
379 at the block device level, then <literal>ldiskfs</literal> remounts
380 the device read-only to prevent file system corruption. This is a normal
381 behavior. The status in the parameter <literal>health_check</literal>
382 also shows "not healthy" on the affected nodes.</para>
383 <para>To determine what caused the "not healthy" condition:</para>
386 <para>Examine the consoles of all servers for any error indications</para>
389 <para>Examine the syslogs of all servers for any LustreErrors or <literal>LBUG</literal></para>
392 <para>Check the health of your system hardware and network. (Are the disks working as expected, is the network dropping packets?)</para>
395 <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>
398 <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>
401 <title>Identifying a Missing OST</title>
402 <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>
405 <para>Generate a list of devices and determine the OST's device number. Run:</para>
406 <screen>$ lctl dl </screen>
407 <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>
410 <para>Deactivate the OST (on the OSS at the MDS). Run:</para>
411 <screen>$ lctl --device <replaceable>lustre_device_number</replaceable> deactivate</screen>
412 <para>The OST device number or device name is generated by the lctl dl command.</para>
413 <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>
415 <para>If the OST later becomes available it needs to be reactivated, run:</para>
416 <screen># lctl --device <replaceable>lustre_device_number</replaceable> activate</screen>
420 <para>Determine all files that are striped over the missing OST, run:</para>
421 <screen># lfs find -O {OST_UUID} /mountpoint</screen>
422 <para>This returns a simple list of filenames from the affected file system.</para>
425 <para>If necessary, you can read the valid parts of a striped file, run:</para>
426 <screen># dd if=filename of=new_filename bs=4k conv=sync,noerror</screen>
429 <para>You can delete these files with the <literal>unlink</literal> command.</para>
430 <screen># unlink filename {filename ...} </screen>
432 <para>When you run the <literal>unlink</literal> command, it may
433 return an error that the file could not be found, but the file
434 on the MDS has been permanently removed.</para>
438 <para>If the file system cannot be mounted, currently there is no way
439 that parses metadata directly from an MDS. If the bad OST does not
440 start, options to mount the file system are to provide a loop device
441 OST in its place or replace it with a newly-formatted OST. In that case,
442 the missing objects are created and are read as zero-filled.</para>
444 <section xml:id="dbdoclet.repair_ost_lastid">
445 <title>Fixing a Bad LAST_ID on an OST</title>
446 <para>Each OST contains a <literal>LAST_ID</literal> file, which holds
447 the last object (pre-)created by the MDS
448 <footnote><para>The contents of the <literal>LAST_ID</literal>
449 file must be accurate regarding the actual objects that exist
450 on the OST.</para></footnote>.
451 The MDT contains a <literal>lov_objid</literal> file, with values
452 that represent the last object the MDS has allocated to a file.</para>
453 <para>During normal operation, the MDT keeps pre-created (but unused)
454 objects on the OST, and normally <literal>LAST_ID</literal> should be
455 larger than <literal>lov_objid</literal>. Any small difference in the
456 values is a result of objects being precreated on the OST to improve
457 MDS file creation performance. These precreated objects are not yet
458 allocated to a file, since they are of zero length (empty).</para>
459 <para>However, in the case where <literal>lov_objid</literal> is
460 larger than <literal>LAST_ID</literal>, it indicates the MDS has
461 allocated objects to files that do not exist on the OST. Conversely,
462 if <literal>lov_objid</literal> is significantly less than
463 <literal>LAST_ID</literal> (by at least 20,000 objects) it indicates
464 the OST previously allocated objects at the request of the MDS (which
465 likely contain data) but it doesn't know about them.</para>
466 <para condition='l25'>Since Lustre 2.5 the MDS and OSS will resync the
467 <literal>lov_objid</literal> and <literal>LAST_ID</literal> files
468 automatically if they become out of sync. This may result in some
469 space on the OSTs becoming unavailable until LFSCK is next run, but
470 avoids issues with mounting the filesystem.</para>
471 <para condition='l26'>Since Lustre 2.6 the LFSCK will repair the
472 <literal>LAST_ID</literal> file on the OST automatically based on
473 the objects that exist on the OST, in case it was corrupted.</para>
474 <para>In situations where there is on-disk corruption of the OST, for
475 example caused by the disk write cache being lost, or if the OST
476 was restored from an old backup or reformatted, the
477 <literal>LAST_ID</literal> value may become inconsistent and result
478 in a message similar to:</para>
479 <screen>"myth-OST0002: Too many FIDs to precreate,
480 OST replaced or reformatted: LFSCK will clean up"</screen>
481 <para>A related situation may happen if there is a significant
482 discrepancy between the record of previously-created objects on the
483 OST and the previously-allocated objects on the MDT, for example if
484 the MDT has been corrupted, or restored from backup, which would cause
485 significant data loss if left unchecked. This produces a message
487 <screen>"myth-OST0002: too large difference between
488 MDS LAST_ID [0x1000200000000:0x100048:0x0] (1048648) and
489 OST LAST_ID [0x1000200000000:0x2232123:0x0] (35856675), trust the OST"</screen>
490 <para>In such cases, the MDS will advance the <literal>lov_objid</literal>
491 value to match that of the OST to avoid deleting existing objects,
492 which may contain data. Files on the MDT that reference these objects
493 will not be lost. Any unreferenced OST objects will be attached to
494 the <literal>.lustre/lost+found</literal> directory the next time
495 LFSCK <literal>layout</literal> check is run.</para>
498 <title><indexterm><primary>troubleshooting</primary><secondary>'Address already in use'</secondary></indexterm>Handling/Debugging "<literal>Bind: Address already in use</literal>" Error</title>
499 <para>During startup, the Lustre software may report a <literal>bind: Address already in
500 use</literal> error and reject to start the operation. This is caused by a portmap service
501 (often NFS locking) that starts before the Lustre file system and binds to the default port
502 988. You must have port 988 open from firewall or IP tables for incoming connections on the
503 client, OSS, and MDS nodes. LNet will create three outgoing connections on available,
504 reserved ports to each client-server pair, starting with 1023, 1022 and 1021.</para>
505 <para>Unfortunately, you cannot set sunprc to avoid port 988. If you receive this error, do the following:</para>
508 <para>Start the Lustre file system before starting any service that uses sunrpc.</para>
511 <para>Use a port other than 988 for the Lustre file system. This is configured in
512 <literal>/etc/modprobe.d/lustre.conf</literal> as an option to the LNet module. For
514 <screen>options lnet accept_port=988</screen>
519 <para>Add modprobe ptlrpc to your system startup scripts before the service that uses
520 sunrpc. This causes the Lustre file system to bind to port 988 and sunrpc to select a
521 different port.</para>
525 <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>
529 <title><indexterm><primary>troubleshooting</primary><secondary>'Error -28'</secondary></indexterm>Handling/Debugging Error "- 28"</title>
530 <para>A Linux error -28 (<literal>ENOSPC</literal>) that occurs during
531 a write or sync operation indicates that an existing file residing
532 on an OST could not be rewritten or updated because the OST was full,
533 or nearly full. To verify if this is the case, run on a client:</para>
536 UUID bytes Used Available Use% Mounted on
537 myth-MDT0000_UUID 12.9G 1.5G 10.6G 12% /myth[MDT:0]
538 myth-OST0000_UUID 3.6T 3.1T 388.9G 89% /myth[OST:0]
539 myth-OST0001_UUID 3.6T 3.6T 64.0K 100% /myth[OST:1]
540 myth-OST0002_UUID 3.6T 3.1T 394.6G 89% /myth[OST:2]
541 myth-OST0003_UUID 5.4T 5.0T 267.8G 95% /myth[OST:3]
542 myth-OST0004_UUID 5.4T 2.9T 2.2T 57% /myth[OST:4]
544 filesystem_summary: 21.6T 17.8T 3.2T 85% /myth
546 <para>To address this issue, you can expand the disk space on the OST,
547 or use the <literal>lfs_migrate</literal> command to migrate (move)
548 files to a less full OST. For details on both of these options
549 see <xref linkend="lustremaint.adding_new_ost" /></para>
550 <para condition='l26'>In some cases, there may be processes holding
551 files open that are consuming a significant amount of space (e.g.
552 runaway process writing lots of data to an open file that has been
553 deleted). It is possible to get a list of all open file handles in the
554 filesystem from the MDS:
556 mds# lctl get_param mdt.*.exports.*.open_files
557 mdt.myth-MDT0000.exports.192.168.20.159@tcp.open_files=
558 [0x200003ab4:0x435:0x0]
559 [0x20001e863:0x1c1:0x0]
560 [0x20001e863:0x1c2:0x0]
564 These file handles can be converted into pathnames on any client via
565 the <literal>lfs fid2path</literal> command (as root):
567 client# lfs fid2path /myth [0x200003ab4:0x435:0x0] [0x20001e863:0x1c1:0x0] [0x20001e863:0x1c2:0x0]
568 lfs fid2path: cannot find '[0x200003ab4:0x435:0x0]': No such file or directory
574 In some cases, if the file has been deleted from the filesystem,
575 <literal>fid2path</literal> will return an error that the file is
576 not found. You can use the client NID
577 (<literal>192.168.20.159@tcp</literal> in the above example) to
578 determine which node the file is open on, and <literal>lsof</literal>
579 to find and kill the process that is holding the file open:
582 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
583 logger 13806 mythtv 0r REG 35,632494 1901048576384 144115440203858997 /myth/logs/job.1283929.log (deleted)
586 <para>A Linux error -28 (<literal>ENOSPC</literal>) that occurs when
587 a new file is being created may indicate that the MDT has run out
588 of inodes and needs to be made larger. Newly created files are not
589 written to full OSTs, while existing files continue to reside on
590 the OST where they were initially created. To view inode information
591 on the MDT, run on a client:</para>
594 UUID Inodes IUsed IFree IUse% Mounted on
595 myth-MDT0000_UUID 1910263 1910263 0 100% /myth[MDT:0]
596 myth-OST0000_UUID 947456 360059 587397 89% /myth[OST:0]
597 myth-OST0001_UUID 948864 233748 715116 91% /myth[OST:1]
598 myth-OST0002_UUID 947456 549961 397495 89% /myth[OST:2]
599 myth-OST0003_UUID 1426144 477595 948549 95% /myth[OST:3]
600 myth-OST0004_UUID 1426080 465248 1420832 57% /myth[OST:4]
602 filesystem_summary: 1910263 1910263 0 100% /myth
604 <para>Typically, the Lustre software reports this error to your
605 application. If the application is checking the return code from
606 its function calls, then it decodes it into a textual error message
607 such as <literal>No space left on device</literal>. The numeric
608 error message may also appear in the system log.</para>
609 <para>For more information about the <literal>lfs df</literal> command,
610 see <xref linkend="file_striping.checking_free_space"/>.</para>
611 <para>You can also use the <literal>lctl get_param</literal> command to
612 monitor the space and object usage on the OSTs and MDTs from any
614 <screen>lctl get_param {osc,mdc}.*.{kbytes,files}{free,avail,total}
617 <para>You can find other numeric error codes along with a short name
618 and text description in <literal>/usr/include/asm/errno.h</literal>.
623 <title>Triggering Watchdog for PID NNN</title>
624 <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>
625 <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>
626 <screen>Lustre: 0:0:(watchdog.c:122:lcw_cb()) </screen>
627 <para>The above message indicates that the watchdog is active for pid 933:</para>
628 <para>It was inactive for 100000ms:</para>
629 <screen>Lustre: 0:0:(linux-debug.c:132:portals_debug_dumpstack()) </screen>
630 <para>Showing stack for process:</para>
631 <screen>933 ll_ost_25 D F896071A 0 933 1 934 932 (L-TLB)
632 f6d87c60 00000046 00000000 f896071a f8def7cc 00002710 00001822 2da48cae
633 0008cf1a f6d7c220 f6d7c3d0 f6d86000 f3529648 f6d87cc4 f3529640 f8961d3d
634 00000010 f6d87c9c ca65a13c 00001fff 00000001 00000001 00000000 00000001</screen>
635 <para>Call trace:</para>
636 <screen>filter_do_bio+0x3dd/0xb90 [obdfilter]
637 default_wake_function+0x0/0x20
638 filter_direct_io+0x2fb/0x990 [obdfilter]
639 filter_preprw_read+0x5c5/0xe00 [obdfilter]
640 lustre_swab_niobuf_remote+0x0/0x30 [ptlrpc]
641 ost_brw_read+0x18df/0x2400 [ost]
642 ost_handle+0x14c2/0x42d0 [ost]
643 ptlrpc_server_handle_request+0x870/0x10b0 [ptlrpc]
644 ptlrpc_main+0x42e/0x7c0 [ptlrpc]
649 <primary>troubleshooting</primary>
650 <secondary>timeouts on setup</secondary>
651 </indexterm>Handling Timeouts on Initial Lustre File System Setup</title>
652 <para>If you come across timeouts or hangs on the initial setup of your Lustre file system,
653 verify that name resolution for servers and clients is working correctly. Some distributions
654 configure <literal>/etc/hosts</literal> so the name of the local machine (as reported by the
655 'hostname' command) is mapped to local host (127.0.0.1) instead of a proper IP
657 <para>This might produce this error:</para>
658 <screen>LustreError:(ldlm_handle_cancel()) received cancel for unknown lock cookie
659 0xe74021a4b41b954e from nid 0x7f000001 (0:127.0.0.1)
662 <section remap="h3" xml:id="went_back_in_time">
663 <title>Handling/Debugging "LustreError: xxx went back in time"</title>
664 <para>Each time the MDS or OSS modifies the state of the MDT or OST disk
665 filesystem for a client, it records a per-target increasing transaction
666 number for the operation and returns it to the client along with the
667 reply to that operation. Periodically, when the server commits these
668 transactions to disk, the <literal>last_committed</literal> transaction
669 number is returned to the client to allow it to discard pending operations
670 from memory, as they will no longer be needed for recovery in case of
671 server failure.</para>
672 <para>In some cases error messages similar to the following have
673 been observed after a server was restarted or failed over:</para>
675 LustreError: 3769:0:(import.c:517:ptlrpc_connect_interpret())
676 testfs-ost12_UUID went back in time (transno 831 was previously committed,
677 server now claims 791)!
679 <para>This situation arises when:</para>
682 <para>You are using a disk device that claims to have data written
683 to disk before it actually does, as in case of a device with a large
684 cache. If that disk device crashes or loses power in a way that
685 causes the loss of the cache, there can be a loss of transactions
686 that you believe are committed. This is a very serious event, and
687 you should run e2fsck against that storage before restarting the
688 Lustre file system.</para>
691 <para>As required by the Lustre software, the shared storage used
692 for failover is completely cache-coherent. This ensures that if one
693 server takes over for another, it sees the most up-to-date and
694 accurate copy of the data. In case of the failover of the server,
695 if the shared storage does not provide cache coherency between all
696 of its ports, then the Lustre software can produce an error.</para>
699 <para>If you know the exact reason for the error, then it is safe to
700 proceed with no further action. If you do not know the reason, then this
701 is a serious issue and you should explore it with your disk vendor.</para>
702 <para>If the error occurs during failover, examine your disk cache
703 settings. If it occurs after a restart without failover, try to
704 determine how the disk can report that a write succeeded, then lose the
705 Data Device corruption or Disk Errors.</para>
708 <title>Lustre Error: "<literal>Slow Start_Page_Write</literal>"</title>
709 <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>
712 <title>Drawbacks in Doing Multi-client O_APPEND Writes</title>
713 <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>
716 <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>
719 <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>
722 <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>
728 <primary>troubleshooting</primary>
729 <secondary>slowdown during startup</secondary>
730 </indexterm>Slowdown Occurs During Lustre File System Startup</title>
731 <para>When a Lustre file system starts, it needs to read in data from the disk. For the very
732 first mdsrate run after the reboot, the MDS needs to wait on all the OSTs for object
733 pre-creation. This causes a slowdown to occur when the file system starts up.</para>
734 <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>
737 <title><indexterm><primary>troubleshooting</primary><secondary>OST out of memory</secondary></indexterm>Log Message <literal>'Out of Memory</literal>' on OST</title>
738 <para>When planning the hardware for an OSS node, consider the memory usage of several
739 components in the Lustre file system. If insufficient memory is available, an 'out of
740 memory' message can be logged.</para>
741 <para>During normal operation, several conditions indicate insufficient RAM on a server node:</para>
744 <para> kernel "<literal>Out of memory</literal>" and/or "<literal>oom-killer</literal>" messages</para>
747 <para> Lustre "<literal>kmalloc of 'mmm' (NNNN bytes) failed...</literal>" messages</para>
750 <para> Lustre or kernel stack traces showing processes stuck in "<literal>try_to_free_pages</literal>"</para>
753 <para>For information on determining the MDS memory and OSS memory
754 requirements, see <xref linkend="dbdoclet.mds_oss_memory"/>.</para>
757 <title>Setting SCSI I/O Sizes</title>
758 <para>Some SCSI drivers default to a maximum I/O size that is too small for good Lustre file
759 system performance. we have fixed quite a few drivers, but you may still find that some
760 drivers give unsatisfactory performance with the Lustre file system. As the default value is
761 hard-coded, you need to recompile the drivers to change their default. On the other hand,
762 some drivers may have a wrong default set.</para>
763 <para>If you suspect bad I/O performance and an analysis of Lustre file system statistics
764 indicates that I/O is not 1 MB, check
765 <literal>/sys/block/<replaceable>device</replaceable>/queue/max_sectors_kb</literal>. If
766 the <literal>max_sectors_kb</literal> value is less than 1024, set it to at least 1024 to
767 improve performance. If changing <literal>max_sectors_kb</literal> does not change the I/O
768 size as reported by the Lustre software, you may want to examine the SCSI driver
774 vim:expandtab:shiftwidth=2:tabstop=8: