Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Description of my problem is quite large, so first I will give a short summary, then I will precisely describe the situation.

Short summary: manufacturer's diagnostic tools found and repaired some errors on my hard disk. As far as I understand tool's manual, these errors were bad blocks. However, smartctl (Linux tool to do SMART on hard disk) doesn't show any reallocated sectors and says that hard disk is good. First question: how is it possible? Reparation of bad blocks means reallocating sectors, right? So why don't smartctl report any reallocated sectors? Second question: I bought this disk a few months ago and I still have warranty for it. Should I demand that seller replace it for a new one or is this disk good and I could continue using it?

And now precise description:

I have Western Digital hard disk, model WDC WD5000AAKX-001CA0. Recently I noticed that sometimes my computer hangs for a few seconds (something like up to one minute). After such hangs dmesg shows errors like this:

knoppix@Microknoppix:~$ dmesg
(...)
[  504.003363] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  504.003374] ata1.00: failed command: READ DMA EXT
[  504.003383] ata1.00: cmd 25/00:00:80:07:01/00:02:00:00:00/e0 tag 0 dma 262144 in
[  504.003385]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  504.003389] ata1.00: status: { DRDY }
[  509.016652] ata1: link is slow to respond, please be patient (ready=0)
[  514.030002] ata1: soft resetting link
[  514.200386] ata1.00: configured for UDMA/133
[  514.200420] ata1: EH complete
[  546.003333] ata1: lost interrupt (Status 0x50)
[  546.003364] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  546.003371] ata1.00: failed command: READ DMA EXT
[  546.003380] ata1.00: cmd 25/00:00:80:15:06/00:02:00:00:00/e0 tag 0 dma 262144 in
[  546.003381]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  546.003386] ata1.00: status: { DRDY }
[  546.003401] ata1: soft resetting link
[  546.181205] ata1.00: configured for UDMA/133
[  546.181234] ata1: EH complete

However, smartctl says that "SMART overall-health self-assessment test result: PASSED" (I will paste complete output of smartctl few paragraphs later). Whenever I tried to make smartctl self test (with smartctl -t short or smartctl -t long) such tests were reported as aborted by host. So I downloaded bootable CD diagnostic tool for my hd - this one: http://support.wdc.com/product/download.asp?groupid=606&sid=2&lang=en

Using this tool first I did quick test and it showed error (unfortunately, I don't remember what was the error code). As far as I understand this tool performs just SMART quick self test (http://wdc.custhelp.com/app/answers/detail/search/1/a_id/940/c/130/p/227,295 says "QUICK TEST - performs SMART drive quick self-test to gather and verify the Data Lifeguard information contained on the drive.") Then I did extended test. As far as I understand, this extended test looks for bad sectors (http://wdc.custhelp.com/app/answers/detail/search/1/a_id/940/c/130/p/227,295 says "EXTENDED TEST - performs a Full Media Scan to detect bad sectors"). After some time the tool told that it found and repaired some errors.

Now I booted machine with knoppix and did "smartctl --all". Here is its output:

root@Microknoppix:/home/knoppix# smartctl --all /dev/sda
smartctl 5.43 2012-06-05 r3561 [i686-linux-3.4.9] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Caviar Blue Serial ATA
Device Model:     WDC WD5000AAKX-001CA0
Serial Number:    WD-WMAYUW952768
LU WWN Device Id: 5 0014ee 6ad1d9ef1
Firmware Version: 15.01H15
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Dec 12 03:34:39 2012 UTC
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:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
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:        ( 8160) seconds.
Offline data collection
capabilities:            (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    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:    (  83) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x3037) 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     0x002f   200   200   051    Pre-fail  Always       -       486
  3 Spin_Up_Time            0x0027   189   141   021    Pre-fail  Always       -       1525
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       587
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   098   098   000    Old_age   Always       -       1553
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       578
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       173
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       413
194 Temperature_Celsius     0x0022   097   093   000    Old_age   Always       -       46
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       5
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       5

SMART Error Log Version: 1
ATA Error Count: 2
    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 2 occurred at disk power-on lifetime: 1548 hours (64 days + 12 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 01 30 4f c2 a0  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  b0 d6 01 be 4f c2 a0 02      00:02:58.316  SMART WRITE LOG
  b0 da 01 00 4f c2 a0 02      00:02:58.259  SMART RETURN STATUS
  80 44 00 00 44 57 a0 02      00:02:58.259  [VENDOR SPECIFIC]
  b0 d6 01 be 4f c2 a0 02      00:02:58.241  SMART WRITE LOG
  80 45 00 01 44 57 a0 02      00:02:58.241  [VENDOR SPECIFIC]

Error 1 occurred at disk power-on lifetime: 1515 hours (63 days + 3 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 01 30 4f c2 a0  Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  b0 d6 01 be 4f c2 a0 02      00:02:21.841  SMART WRITE LOG
  b0 da 01 00 4f c2 a0 02      00:02:21.784  SMART RETURN STATUS
  80 44 00 00 44 57 a0 02      00:02:21.784  [VENDOR SPECIFIC]
  b0 d6 01 be 4f c2 a0 02      00:02:21.768  SMART WRITE LOG
  80 45 00 01 44 57 a0 02      00:02:21.768  [VENDOR SPECIFIC]

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Conveyance offline  Completed without error       00%      1552         -
# 2  Conveyance offline  Completed: read failure       90%      1548         787927349
# 3  Conveyance offline  Completed: read failure       90%      1515         883391611
# 4  Short offline       Completed without error       00%      1503         -
# 5  Short offline       Completed without error       00%      1503         -
# 6  Short offline       Aborted by host               80%      1502         -
# 7  Extended offline    Completed without error       00%         9         -
# 8  Short offline       Completed without error       00%         6         -
# 9  Short offline       Aborted by host               90%         6         -

SMART 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.

As you can see, on one hand one conveyance offline was completed with read failure. But, on the other hand, all attributes seems good - for instance, Reallocated_Sector_Ct is 0.

I also tried once again to cat the whole disk to /dev/null - and again I have errors in dmesg:

root@Microknoppix:/home/knoppix# nice -n 20 ionice -c 3 cat /dev/sda > /dev/null
During this cat dmesg shows such errors:
knoppix@Microknoppix:~$ dmesg
(...)
[  504.003363] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  504.003374] ata1.00: failed command: READ DMA EXT
[  504.003383] ata1.00: cmd 25/00:00:80:07:01/00:02:00:00:00/e0 tag 0 dma 262144 in
[  504.003385]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  504.003389] ata1.00: status: { DRDY }
[  509.016652] ata1: link is slow to respond, please be patient (ready=0)
[  514.030002] ata1: soft resetting link
[  514.200386] ata1.00: configured for UDMA/133
[  514.200420] ata1: EH complete
[  546.003333] ata1: lost interrupt (Status 0x50)
[  546.003364] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[  546.003371] ata1.00: failed command: READ DMA EXT
[  546.003380] ata1.00: cmd 25/00:00:80:15:06/00:02:00:00:00/e0 tag 0 dma 262144 in
[  546.003381]          res 40/00:00:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[  546.003386] ata1.00: status: { DRDY }
[  546.003401] ata1: soft resetting link
[  546.181205] ata1.00: configured for UDMA/133
[  546.181234] ata1: EH complete

I thought it can be fault of motherboard or data cable that connects disk to motherboard. So I connected another disk to my motherboard using the same cable and slot and cated it to /dev/null. It succedeed without dmesg showing any errors.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There are no reallocated sectors because they failed to reallocate.Your drive is showing 5 Offline_Uncorrectable sectors, which happens when automatic repair fails. There are obvious read failures shown in the dmesg output, SMART errors, and read failures from SMART tests. There are ways of repairing these sectors as you have mentioned in the question, but from my experience it is a very short-term fix.

Replace the drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.