# Drive Errors in dmesg

## El_Presidente_Pufferfish

I recently found these messages repeating in dmesg.

```
Jan  4 10:34:35 [kernel] [155659.644510] ata5.00: qc timeout (cmd 0xa0)

Jan  4 10:34:35 [kernel] [155659.644533] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

Jan  4 10:34:35 [kernel] [155659.644550] ata5.00: cmd a0/00:00:00:00:00/00:00:00:00:00/a0 tag 0

Jan  4 10:34:35 [kernel] [155659.644553]          cdb 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00

Jan  4 10:34:35 [kernel] [155659.644556]          res 51/24:03:00:00:00/00:00:00:00:00/a0 Emask 0x5 (timeout)

Jan  4 10:34:35 [kernel] [155659.644565] ata5.00: status: { DRDY ERR }

Jan  4 10:34:40 [kernel] [155664.079803] ata5: soft resetting link

Jan  4 10:35:00 [kernel] [155683.964875] ata5.00: configured for PIO0

Jan  4 10:35:04 [kernel] [155683.964902] ata5: EH complete
```

How can I find out what device corresponds to ata5?

EDIT - dmesg shows the following

```

[    3.586360] ata5: PATA max UDMA/133 cmd 0x1f0 ctl 0x3f6 bmdma 0xf000 irq 14

[    3.740344] ata5.00: ATAPI: _NEC DVD_RW ND-2510A, 2.18, max UDMA/33

[    3.740355] ata5: nv_mode_filter: 0x739f&0x701f->0x701f, BIOS=0x7000 (0xc0000000) ACPI=0x701f (60:600:0x13)

[    3.746292] ata5.00: configured for UDMA/33
```

So it's my DVD-ROM, not a hard drive.  Are these errors anything I can ignore, or is it time to get a new DVD-ROM?

When I saw those messages I immediately checked the SMART information on my hard drives and found this on the third drive.

```
# smartctl -a /dev/sdc

smartctl version 5.38 [i686-pc-linux-gnu] Copyright (C) 2002-8 Bruce Allen

Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===

Model Family:     SAMSUNG SpinPoint T166 series

Device Model:     SAMSUNG HD501LJ

Serial Number:    S0MUJ1FPB23742

Firmware Version: CR100-12

User Capacity:    500,107,862,016 bytes

Device is:        In smartctl database [for details use: -P show]

ATA Version is:   8

ATA Standard is:  ATA-8-ACS revision 3b

Local Time is:    Sun Jan  4 11:17:13 2009 EST

SMART support is: Available - device has SMART capability.

SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===

SMART overall-health self-assessment test result: PASSED

General SMART Values:

Offline data collection status:  (0x00)   Offline data collection activity

               was never started.

               Auto Offline Data Collection: Disabled.

Self-test execution status:      (   0)   The previous self-test routine completed

               without error or no self-test has ever 

               been run.

Total time to complete Offline 

data collection:        (9033) seconds.

Offline data collection

capabilities:           (0x5b) SMART execute Offline immediate.

               Auto Offline data collection on/off support.

               Suspend Offline collection upon new

               command.

               Offline surface scan supported.

               Self-test supported.

               No Conveyance Self-test supported.

               Selective Self-test supported.

SMART capabilities:            (0x0003)   Saves SMART data before entering

               power-saving mode.

               Supports SMART auto save timer.

Error logging capability:        (0x01)   Error logging supported.

               General Purpose Logging supported.

Short self-test routine 

recommended polling time:     (   2) minutes.

Extended self-test routine

recommended polling time:     ( 154) minutes.

SCT capabilities:           (0x003f)   SCT Status supported.

               SCT Feature Control supported.

               SCT Data Table supported.

SMART Attributes Data Structure revision number: 16

Vendor Specific SMART Attributes with Thresholds:

ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE

  1 Raw_Read_Error_Rate     0x000f   100   100   051    Pre-fail  Always       -       0

  3 Spin_Up_Time            0x0007   100   100   015    Pre-fail  Always       -       7168

  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       241

  5 Reallocated_Sector_Ct   0x0033   253   253   010    Pre-fail  Always       -       0

  7 Seek_Error_Rate         0x000f   253   253   051    Pre-fail  Always       -       0

  8 Seek_Time_Performance   0x0025   253   253   015    Pre-fail  Offline      -       0

  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       6544

 10 Spin_Retry_Count        0x0033   253   253   051    Pre-fail  Always       -       0

 11 Calibration_Retry_Count 0x0012   253   253   000    Old_age   Always       -       0

 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       185

 13 Read_Soft_Error_Rate    0x000e   100   100   000    Old_age   Always       -       1991316

187 Reported_Uncorrect      0x0032   253   253   000    Old_age   Always       -       0

188 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       2

190 Airflow_Temperature_Cel 0x0022   060   051   000    Old_age   Always       -       40

194 Temperature_Celsius     0x0022   118   091   000    Old_age   Always       -       40

195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       1991316

196 Reallocated_Event_Count 0x0032   253   253   000    Old_age   Always       -       0

197 Current_Pending_Sector  0x0012   253   253   000    Old_age   Always       -       0

198 Offline_Uncorrectable   0x0030   253   253   000    Old_age   Offline      -       0

199 UDMA_CRC_Error_Count    0x003e   187   187   000    Old_age   Always       -       1762

200 Multi_Zone_Error_Rate   0x000a   253   100   000    Old_age   Always       -       0

201 Soft_Read_Error_Rate    0x000a   253   100   000    Old_age   Always       -       0

202 TA_Increase_Count       0x0032   100   100   000    Old_age   Always       -       5

SMART Error Log Version: 1

ATA Error Count: 29 (device log contains only the most recent five errors)

   CR = Command Register [HEX]

   FR = Features Register [HEX]

   SC = Sector Count Register [HEX]

   SN = Sector Number Register [HEX]

   CL = Cylinder Low Register [HEX]

   CH = Cylinder High Register [HEX]

   DH = Device/Head Register [HEX]

   DC = Device Command Register [HEX]

   ER = Error register [HEX]

   ST = Status register [HEX]

Powered_Up_Time is measured from power on, and printed as

DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,

SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 29 occurred at disk power-on lifetime: 3303 hours (137 days + 15 hours)

  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  04 51 00 00 00 00 00

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  ec 00 00 00 00 00 00 00      00:00:08.125  IDENTIFY DEVICE

  00 00 01 01 00 00 a0 00      00:00:08.125  NOP [Abort queued commands]

Error 28 occurred at disk power-on lifetime: 3287 hours (136 days + 23 hours)

  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  04 51 00 00 00 00 00

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  ec 00 00 00 00 00 00 00      00:00:08.125  IDENTIFY DEVICE

  00 00 01 01 00 00 a0 00      00:00:08.125  NOP [Abort queued commands]

Error 27 occurred at disk power-on lifetime: 3172 hours (132 days + 4 hours)

  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  84 51 08 00 00 00 40  Error: ICRC, ABRT 8 sectors at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  c8 00 08 00 00 00 40 00      00:00:13.875  READ DMA

Error 26 occurred at disk power-on lifetime: 3172 hours (132 days + 4 hours)

  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  84 51 08 00 00 00 40  Error: ICRC, ABRT 8 sectors at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  c8 00 08 00 00 00 40 00      00:00:13.750  READ DMA

Error 25 occurred at disk power-on lifetime: 3172 hours (132 days + 4 hours)

  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:

  ER ST SC SN CL CH DH

  -- -- -- -- -- -- --

  84 51 08 00 00 00 40  Error: ICRC, ABRT 8 sectors at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:

  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name

  -- -- -- -- -- -- -- --  ----------------  --------------------

  c8 00 08 00 00 00 40 00      00:00:13.688  READ DMA

  e5 00 00 00 00 00 00 00      00:00:08.188  CHECK POWER MODE

  ef 03 08 00 00 00 00 00      00:00:08.188  SET FEATURES [Set transfer mode]

  ec 00 00 00 00 00 00 00      00:00:08.188  IDENTIFY DEVICE

  00 00 01 01 00 00 a0 00      00:00:08.188  NOP [Abort queued commands]

SMART Self-test log structure revision number 1

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error

# 1  Short offline       Completed without error       00%      6544         -

# 2  Extended offline    Completed without error       00%      1033         -

SMART Selective Self-Test Log Data Structure Revision Number (0) should be 1

SMART Selective self-test log data structure revision number 0

Warning: ATA Specification requires selective self-test log data structure revision number = 1

 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS

    1        0        0  Not_testing

    2        0        0  Not_testing

    3        0        0  Not_testing

    4        0        0  Not_testing

    5        0        0  Not_testing

Selective self-test flags (0x0):

  After scanning selected spans, do NOT read-scan remainder of disk.

If Selective self-test is pending on power-up, resume after 0 minute delay.
```

Are those errors anything serious to worry about?

----------

## NeddySeagoon

El_Presidente_Pufferfish,

The

```
 13 Read_Soft_Error_Rate    0x000e   100   100   000    Old_age   Always       -       1991316

195 Hardware_ECC_Recovered  0x001a   100   100   000    Old_age   Always       -       1991316
```

indicate that the drive is working hard to correct errors and its succeeding. Maybe the optics are dirty after 

```
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       6544 
```

You are also experiencing errors over the PATA interface

```
199 UDMA_CRC_Error_Count    0x003e   187   187   000    Old_age   Always       -       1762 
```

This means that once correct data is in a buffer (on the drive or in RAM) you sometimes cannot transfer it correctly over the interface.

It tells of a potential problem in the data path but not where. It could be the drive, cable, or motherboard. Anyway its a low number and it will mostly be corrected by retries.

Use a CD/DVD drive cleaner. Do not take the drive apart. Keep in mind that the laser is both invisible and not eye safe. If you ignore the Do not take the drive apart advice, do not power the drive while the laser is exposed.

----------

