How to Fix a Broken Sector of Your Hard Drive

First you should really backup the whole drive. Because unreadable sectors mean that the drive will fail soon:
("Add. Sense: Unrecovered read error - auto reallocate failed
sd 0:0:0:0: [sda] CDB:  ... end_request: I/O error, dev sda, sector 3459933711 ...").

You may be able to solve the issue temporarily but you should expect the drive to fail completely at any moment. So ddrescue to another disk of the same size. First, only rescue good parts:
ddrescue -n olddew newdev ~/logfile

Then try to rescue the rest:
ddrescue olddew newdev ~/logfile

Then try to manually read the sector with hdparm. In your example, the marked sector above. This probably won't work.
hdparm --read-sector 3459933711
Then you can overwrite the sector with zeros so it won't cause repeated hangs:
hdparm --write-sector 3459933711

And now you order a replacement drive and wait for the drive to fail entirely.

No comments:

Post a Comment

I appreciate comments. Feel free to write anything you wish. Selected comments and questions will be published.