1

I have an old Western Digital HDD which started getting some bad sectors by a bad SATA cable, after replacing the cable I tried to fill the disk with zeroes using dd utility but it kept returning I/O errors. So, I tried to use Windows' full format feature and it worked fine, no errors. I reinstalled my Linux distro on it then checked S.M.A.R.T.

status

As far as I remember, the reallocated sectors count was first set as 12256. It keeps increasing almost everytime I turn on the computer. Anyway, my questions about it are: why and how did the SATA cable ruined those sectors? what are those numbers in parentheses (2396 0)? why did Windows' full format worked but dd failed?

Also, I checked the faulty SATA cable on my other HDD (which has Windows 7 installed) and the result was the message "A disk read error occurred. Ctrl+Alt+Del to restart". I had the same I/O issue 1 month ago with another HDD which was newer than this one (with the same faulty SATA cable)

8
  • 2
    I think it's up to the firmware to reallocate a sector. The procedure may be triggered by external action but everything that follows is internal and doesn't depend on SATA cable in use. Your HDD is probably dying. Commented Nov 18, 2018 at 15:09
  • 1
    That SMART report is a little confusing to me. Maybe someone else can provide clarity. But the RAW value is typically a proprietary value that has to be interpreted by the drive firmware - so that is not the number of bad sectors and you should ignore it. It is more likely the value of 88. In addition, you are more interested in pending and unrecoverable sectors - neither of which I see in this report. If you had a bad power cable that could indicate why the start / stop count is too high. But in any case, this drive is most likely questionable and should be replaced. Commented Nov 18, 2018 at 15:45
  • @Appleoddity No, raw value it is exactly what happened. @ KamilMaciorowski One can try to enforce internal HDD firmware to replace bad sectors with specialized tools like PC3000 or DOS programs that works in real mode such as Victoria or MHDD but it isn't your case, bad sectors can be replaced by firmware if they listed in "pending or unrecoverable sectors" but parameter 5 of SMART it is a "count" showing what have been already replaced by firmware. My advise is to replace this drive ASAP, with such huge number of errors it is "one minute" from passing away.
    – Alex
    Commented Nov 18, 2018 at 15:55
  • @KamilMaciorowski I highly doubt this possibility. I haven't commented but I checked the faulty SATA cable on my other HDD (which has Windows 7 installed) and the result was the message "A disk read error occurred. Ctrl+Alt+Del to restart". Something else I haven't commented is that I had the same issue 1 month ago with another HDD which was newer than this one, but I ended up damaging it completely as I thought it was a physical issue, I disassembled it to check what was going on. Perhaps, if I had done a full format on Windows it would be (partially?) recovered Commented Nov 18, 2018 at 15:59
  • You have abnormal amount of start/stop count. If it is a server, then don't allow HDD to spin down at all, if it is a desktop, then set 270 minutes timeout before HDD going to sleep and spin down. Too often start/stop events killing hdds more than in comparison with those ones that continuously spinning. Full format wont' help. You can try to start internal firmware's long test with help smartctl, but I thing it is way too late. Take clonezlla and run it with -rescue option to save at least what is still alive on your hdd
    – Alex
    Commented Nov 18, 2018 at 16:10

1 Answer 1

4

Reallocated sector errors reported by SMART are the best ways to predict when any drive is dying. Cables don't cause reallocated sectors. Prediction? With constant use, odds are that it fails in 60 days goes up, and is 5 - 10 times more likely.

Know that your drive IS dying very very soon, and:

  • Do NOT write anything to the drive if you can help it, let alone every sector. Every time you do, the risk is that whatever is written during that operation could be lost. That means if you try to change just one byte, the drive writes much more than that. If the 512 byte sector fails and the rest of the write operation succeeds, then you've only lost that one block. But depending on how the OS reacts, much more of the write operation may also fail. If it reboots when it tries to write, all those blocks it had in memory will be lost.
  • Do NOT try to "repair it" for use. Writing to every sector is a sure way to lose most of the files. Reading however, IS generally safe, until the drive dies.
  • by Steve Gibson is the expert at reconditioning drives with his Spinwrite product. Still, there is "recover mode", that will just try to recover problem files, and then there is "repair, which attempts to fix anything it sees as the problem, and lastly, there is "recondition", which stresses each sector, and removes anything marginal from use. ONLY the first "recovery" option should ever be used on a dying drive, since the other modes will likely destroy it.
  • Stop "using" the drive to store anything new, and don't expect that data to be there the next time you boot. Get anything off of that drive that you expect to keep--back up NOW.
  • If this is a boot drive, it will likely stop being able to boot, very soon. When it does, you can still connect it as a slave drive and recover most of the files from it. I recently had a drive "go bad", which was replaced under warranty. I was able to get all but ONE non-critical insignificant file off of that drive and backed up, out of 300,000 files. The whole drive will stop working soon, and likely stop within 30 days.
7
  • I'm really unsure whether it's a physical or logical issue. Badblocks tests in read-write mode are always successful. I also found out dd works if I use oflag=direct or bs=1M Commented Nov 19, 2018 at 14:28
  • Reallocated sectors are just the result of other problems that showed up when the drive accidentally used those sectors. Bearings wear out. As they do, the alignment between platters and head can occasionally be off, just a bit. It is made worse, when rewriting the same spot, which can be more off the next time it is written. Writes will show more problems than reads. If sectors are never read, they won't ever show up as an error. Temperature is also huge factor--I've recovered drives by pulling out of a freezer, or just turning them upside down.
    – DaaBoss
    Commented Nov 20, 2018 at 18:01
  • Weird thing is that S.M.A.R.T. logs only read errors, it never logs write errors. Using hdparm utility, reading the defective sectors results in success but it takes 2/3 seconds to read. If I re-read the defective sectors, the data gets randomized. Also, in the logs, the defective sectors are not always the same. Plus, self-tests says there is an error in a non-existent LBA of the disk, the LBA sector is totally out of the disk's real size (I have checked it and it's higher than 1TB, wtf?). This leads me to think the issue is not the hard disk itself but in the firmware Commented Nov 21, 2018 at 14:40
  • So, I ended up putting the drive in the freezer four times or so, that didn't solve the issue. But then I thought about using a magnet, it worked! I have no idea why but after magnetizing the drive there are no more read failures. Though, I still think there is something botched in the drive's firmware, S.M.A.R.T. data's attributes got randomized a couple of times after freezing the drive. This is not new though, it used to get randomized very few times even before I froze the drive. But stopped after using a magnet Commented Feb 13, 2019 at 18:01
  • A MAGNET!! Are you kidding?? And, just where did you put this magnet?? Details please... I'd never bet that this would work, but.... I still expect this didn't really fix it, but... I have opened them and nudged while running... but, that was an old 20 MB years ago. If you want to REALLY "fix it", I've got a post on another SE about pulling the massively powerful magnets out of a microwave magnetron.... Try THAT.... :)
    – DaaBoss
    Commented Feb 15, 2019 at 22:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .