# [SOLVED] Hard Drive was going out

## therijn

My Wester Digital Green WD20EARX (/dev/sdb) failed on me with the following errors:

```
[3049728.312551] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen

[3049728.312556] ata2.00: failed command: FLUSH CACHE EXT

[3049728.312563] ata2.00: cmd ea/00:00:00:00:00/00:00:00:00:00/a0 tag 0

[3049728.312563]          res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)

[3049728.312566] ata2.00: status: { DRDY }

[3049728.312570] ata2: hard resetting link

[3049738.352874] ata2: softreset failed (device not ready)

[3049738.352884] ata2: hard resetting link

[3049748.394179] ata2: softreset failed (device not ready)

[3049748.394188] ata2: hard resetting link

[3049758.945035] ata2: link is slow to respond, please be patient (ready=0)

[3049783.404857] ata2: softreset failed (device not ready)

[3049783.404868] ata2: limiting SATA link speed to 3.0 Gbps

[3049783.404873] ata2: hard resetting link

[3049788.601427] ata2: softreset failed (device not ready)

[3049788.601432] ata2: reset failed, giving up

[3049788.601434] ata2.00: disabled

[3049788.601437] ata2.00: device reported invalid CHS sector 0

[3049788.601451] ata2: EH complete

[3049788.601483] sd 1:0:0:0: [sdb] Unhandled error code

[3049788.601486] sd 1:0:0:0: [sdb]  

[3049788.601487] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK

[3049788.601489] sd 1:0:0:0: [sdb] CDB: 

[3049788.601490] Read(10): 28 00 02 81 c5 48 00 00 08 00

[3049788.601498] blk_update_request: 9 callbacks suppressed

[3049788.601500] end_request: I/O error, dev sdb, sector 42059080
```

The drive is 1,3 years old and serves /home & /opt in my always on desktop. The drive did came back after a reboot so there was still hope. I tried the following to fix this:

 Checked the SATA cable & power

 Replaced the SATA cable and changed the port

 Upgrade the BIOS to the latest & greatest

 Disabled NCQ (libata.force=3.00:noncq)

 Disabled ACPI (libata.noacpi=1)

 Set a speed limit (libata.force=3:1.5Gbps)

 Played around with the power saving options

None of the above made a substantial difference. What did help was this:

```
hdparm --please-destroy-my-drive -J 90 /dev/sdb 
```

plus a shutdown to make this change effective. This did not destroy my drive; it only changed the WD Green specific "Idle3" timeout (lucky me). Based on info like  Eric's blog and this WD community topic, my conclusion is that the default 8 second spindown was killing the disk. It's now set to 90 seconds, resulting in a stable SMART Load_Cycle_Count and no issues since. I hope this is of use.Last edited by therijn on Sat Oct 19, 2013 10:36 am; edited 1 time in total

----------

## eccerr0r

Nice.  I ended up using a DOS boot disk to do it, didn't know this was changeable with hdparm.

But yes the massive number of head unloads probably causes more stress than keeping the heads loaded, I set the timeout to around 3 minutes myself, but no idea what the best number is.  The PVR machine with the WD "Green" drive tends to constantly write stuff to disk (log files...) so I don't really expect it should have much time to unload the heads...

(My disk has 12100 hours logged on it, and already has 530000 unload cycles, didn't realize this was happening until late.  Fortunately no bad sectors yet.)

----------

