When I run into a a hard drive that may be failing, I scan it using ViVARD, which reliably lets me know if the drive needs replacing.
How do these sorts of tools work? How can they tell a bad sector from a good sector?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Modern hard drives implement a system in firmware called SMART. This system collects statistics on the drive performance, and automatically avoids data loss by moving data away from bad sectors.
Diagnostic tools query the hard drive's SMART software to build a health check report.
Bad sectors are detected upon accessing the hard disk and are avoided and relocated by the SMART system.
I do not know ViVARD so this is a general answer.
SMART is a part of most modern drives. It registers when the hard drive sees a bad sector, when the seek or spin up time is more than normal. These are all indicators that the hard drive is failing.
The way the hard drive salvages a failing sector is due to error correcting codes (usually this is Reed-Solomon) that can rescue if a few bits are wrong. If many bits are wrong the hard drive tries salvaging by reading the sector over and over again. When it finally get it right, it saves it to one of the spare sectors.
The hard drive reallocates sectors with read errors to a set of spare sectors that are reserved for this. The OS usually does not see this, but sees the whole drive as having no errors. Only when there are no more sectors to reallocate to (or the sector cannot be salvaged) will the OS see the broken sectors.
But it is possible to bypass the error correcting (I believe it is different for each model - maybe ViVARD does this?). This way you can read the actual data on the drive. By reading this you will be able to see which sectors have errors - even if the OS sees no errors.
Use S.M.A.R.T. The hard drive manufacturers should have a software download for it on their web site. When you use SMART - run a full scan.
If I were to write such a diagnostic program, my program would go through the drive sector-by-sector with the following procedure:
Of course, that's just the naive version. I suspect there are algorithms used today to make this general process more efficient. Additionally, there are different patterns that tools use for the "known new data", and different levels of repetition.