[smartmontools-support] disk not reallocating bad sectors

Jürgen Bausa Juergen.Bausa at web.de
Sat Oct 23 17:24:59 CEST 2021


My disk (4TB WD red, WDC WD40EFRX-68N32N0) has some bad/pending sectors:

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   199   198   051    Pre-fail  Always       -       107
  3 Spin_Up_Time            0x0027   165   164   021    Pre-fail  Always       -       6708
  4 Start_Stop_Count        0x0032   095   095   000    Old_age   Always       -       5236
  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   055   055   000    Old_age   Always       -       33036
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       42
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       26
193 Load_Cycle_Count        0x0032   187   187   000    Old_age   Always       -       39445
194 Temperature_Celsius     0x0022   112   100   000    Old_age   Always       -       38
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       1
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      -       2

Error 26 occurred at disk power-on lifetime: 32969 hours (1373 days + 17 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
  -- -- -- -- -- -- --
  40 51 01 28 7a f5 e0  Error: UNC at LBA = 0x00f57a28 = 16087592

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  20 00 01 28 7a f5 e0 00   5d+22:52:59.057  READ SECTOR(S)
  ec 00 01 00 00 00 40 00   5d+22:52:59.054  IDENTIFY DEVICE
  b0 d5 01 09 4f c2 00 00   5d+22:52:37.745  SMART READ LOG
  b0 d5 01 06 4f c2 00 00   5d+22:52:37.744  SMART READ LOG
  b0 d5 01 01 4f c2 00 00   5d+22:52:37.742  SMART READ LOG


I follwed the "BadBlockHowto" and found out that there are 8 sectors not readable, starting
with the one mentioned above. For this I used the command

# hdparm --read-sector 16087592 /dev/sda

with blocks 16087591 - 16087600. Sectors 16087592 - 16087599 gave a read error, while
16087591 and 16087600 could read.

Using debugfs I found out that these sectors are not in use, which is good news.

Therefore I unmounted the device and used the following command to overwrite
sectors 16087592 till 16087599:

# hdparm --write-sector 16087592 --yes-i-know-what-i-am-doing /dev/sda

After that I was able to read them agein (as expected filled with zeros) and
in smartctl Current_Pending_Sectors went to zero. This was exactly what
I wanted to achieve.

However, next day I again got message for exactly the same pending sector. I did
the hole procedure again with exactly the same result. At first it looked good
but on the next day the error is there again.

Seems to me that the drive does not reallocate. Instead it makes a new try to
override and thinks the sector is healed now.

How can I force reallocation?


Juergen


More information about the Smartmontools-support mailing list