Software spotlight: SpinRite
SpinRite is a disk utility who's purpose is greatly misunderstood. It was sometimes advertised as a data recovery tool, which is a bit misleading. It has a number of functions that can be confusing to someone not familiar with how hard drives operate, and many of its functions are only applicable to MFM/RLL/ARLL hard drives.
One of their earlier advertisements can be seen here: https://books.google.com/books?id=S1EEAAAAMBAJ&pg=PA54
What it does on an MFM/RLL/ARLL drive:
- Refreshes the low level format without re-loading software
- Determines and changes optimal sector interleave
What it does on all drives:
- Pattern tests to detect bad/weak sectors
- Automatically relocates data from weak sectors
- Generally stress tests the drive hardware
What it does NOT do:
- It does not repair physical drive damage
- It does not test at the same analog level that a manufacturer could
- It can not recover data from very badly damage sectors
- It does not prevent a failing drive from destroying itself.
"MFM" and "RLL" hard drives (more properly known as ST412/506 interface drives) have no intelligence built in to the read/write system. The Data In and Data Out lines communicate by sending raw flux transitions similar to a floppy drive. The signal represents exactly what is underneath the heads - no buffering, no caching, no translation, no error correction. All of that falls on the controller card or host software.
The drives themselves have no concept of "good" or "bad" sectors.
When errors crop up, IBM PC hard disk controllers can not do much about them. DOS will simply retry the read operation a few times before issuing the famous "Error Reading Drive C: Abort, Retry, Fail?".
Sectors fail for a variety of reasons. The most common is a head crash - where a drive is bumped and the head comes in to contact with the surface, scratching it. Dust or contaminants inside the drive can likewise damage the disk surface.
Minor alignment issues from heat expansion and power issues can cause a sector to be written incorrectly during normal use, even though there is no physical damage. Similarly, crosstalk on the read/write cable or power glitches can cause a read/write failure even though there is no damage.
Magnetic formatting information can weaken over time. Some people say this isn't possible, but I have seen it myself. In theory if a magnetic surface is not up to spec, it can lose magnetic strength over time. There may be other factors at work, and may indicate a media flaw, but unlike damage when it is re-low level formatted, the error disappears.
Most drives, even today, are not manufactured perfectly. A few defects are considered acceptable. Since MFM/RLL drives have no "smarts", such defects are not hidden. Instead, errors found during manufacturing testing were printed on a label, where the user must tell their formatting program to avoid them.
In IDE/SCSI/SATA drives, the drive's firmware automatically maps around bad sectors. Manufacturer-time errors are completely hidden. New errors are re-mapped the next time the sector is written. A freshly wiped/re-certified IDE/SCSI/SATA drive will always appear to the operating system as if it were error free. On an MFM/RLL drive, all errors are visible to BIOS and the OS.
What DOES SpinRite do that is useful?
SpinRite's tests are a good stress test to help ensure a good drive will continue working. This includes controller reliability tests, speed checking, head seeking tests, and positioning the head over every cylinder.
Detects new errors:
SpinRite will pattern test each sector, and if a sector is determined to be faulty, it will automatically mark it as bad and any data will be relocated. Standard DOS/BIOS disk testers automatically retry any read failure, and therefore may miss problem sectors if the retry succeeds. SpinRite bypasses DOS/BIOS, so it can detect these intermittent errors.
There was a very common odd issue that moving an MFM/RLL drive and its 8-bit controller from an XT system to an AT system can make the optimal interleave SLOWER. The drive will work, but much more slowly until the interleave is changed. (For example, an XT may have an optimal interleave of 3 but an AT will expect 5) SpinRite both automatically finds the new optimal sector interleave and changes the interleave without having to re-load all of the software. Interleave does not apply to SCSI/IDE/SATA drives.
Refresh the low level format:
This eliminates non-physical read errors caused by thermal alignment, power issues, or controller glitches. The same can be accomplished by re-low level formatting the drive, but with SpinRite there is no need to reload the drive's contents. You might think that such errors should not be possible, but I have seen such errors occur numerous times, even on "modern" IDE/SATA hard drives. SCSI/IDE/SATA drives can not typically be low-level formatted by the user.
What does SpinRite NOT do:
Repair Physical damage:
SpinRite does not bring failing drives back to life or make them live longer. However, it can give that appearence. Drives that are not really "failing", but have instead gained some bad sectors, can make the OS or software sit and spin, throw endless errors, or otherwise appear hopeless during normal use. Once the bad sectors are re-mapped the drive may be fine and the software may work perfectly again.
SpinRite will retry and work with the controller to coax any readable data out of a bad or weak sector. Truly bad sectors will remain bad, and SpinRite will mark them as such. It does not recover data deleted by the OS or file system. In some cases, it may be easier to run recovery or backup tools after SpinRite has re-mapped bad sectors, but it is generally advisable to run such tools first.
Fix partition/file system problems:
SpinRite will detect some issues, but partition or file system level repair must usually be left to tools like The Norton Utilities.
Manufacturers use a direct analog signal test at the factory to produce bad track lists. SpinRite can not test at that level, as everything must go through your MFM/RLL controller card. SpinRite may return sectors that the manufacture says are bad to active use. However, if they pass thorough pattern testing, then it is usually not a major problem.
Guarantee that re-located data will still be readable:
On a badly failing drive, SpinRite has no good way to ensure a relocated sector will stay readable. It does verify that relocated sectors wrote successfully, but these are usually to areas it has not yet refreshed or pattern tested. If things go south after writing, it can make recovery attempts more complicated. Relocation may also overwrite deleted data in the unused file system space.
Relocate MBR, Boot Sector, FAT, or system files:
SpinRite can not relocate sectors on MFM/RLL drives that are not within the FAT file system. This includes the MBR, boot sector, other non-DOS partitions, and the FAT itself. It will not relocate bad sectors found within system files, as that can render earlier versions of DOS unbootable.
Low-level IDE/SCSI/SATA drives:
SpinRite can not refresh the low-level format on IDE, SCSI, or SATA drives. These are formatted at the factory. Bad sector mapping is handled internally by the drive's firmware. SpinRite's surface testing MAY trigger a drive's firmware to internally re-map faulty sectors. Fortunately, integrated electronics makes these drives somewhat more resistant to developing unrecoverable non-physical errors. The integrated electronics also eliminate any need to change the drive's sector interleave.
Anything with solid state drives:
SpinRite should not be used on solid state media (SSD, USB flash drives, CompactFlash cards, and so on). Unlike magnetic hard drives, solid state drives have limited number of writes, and specific sectors may not even be stored in the same physical location after each write. Personally, I see these limits as a major shortcoming of SSD media.
Is SpinRite at all useful on SCSI/IDE/SATA drives?
- Low-level functions are not possible
- Pattern testing can find problematic sectors and force them to internally re-map.
- Forcing a re-map can make it easier to back up data.
- Makes you feel good that all sectors test good.
- Do NOT use pattern testing on SSDs!
Pattern testing and stress testing can still be useful on SCSI/IDE/SATA drives. Some drives may already have built in diagnostics that run while the drive is idle. But in practice, I have found simply wiping the drives with tools like MAXLLF or Linux "dd" is enough to re-map any bad sectors and return a drive that is not really failing back to use.
SpinRite's surface testing can trigger SCSI/IDE/SATA to internally re-map bad sectors. The drive's firmware will seamlessly substitute a "spare" good sector at the bad sector's former sector address. As such, SpinRite should never need to relocate data by itself within a file system partition.
Modern OSes can royally shit themselves when they encounter a disk error. They assume the hardware they are running on is perfect. As such, a way to test and repair separate from an installed OS is still handy. In some cases, repairing disk errors first may be the only easy way to further retrieve information from a system.
SCSI/IDE/SATA will not usually re-map a bad sector until the sector is re-written. Manually hunting down and wiping a file with a bad sector can be difficult or impossible, especially when the OS itself is misbehaving. Having an automatic way to find and eliminate bad sectors can be handy.
While I have not tested it, I believe the latest version of SpinRite does have some facilities for dealing with IDE/SATA drives at the firmware level. A current supported version of SpinRite is actually still sold through grc.com, but that version has long since stopped supporting earlier "vintage" PCs.
How and when would one use SpinRite:
To summarize, after formatting and setting up a MFM/RLL hard drive, SpinRite is a good way to stress test the drive and detect weak sectors that the formatting missed.
SpinRite is also useful as a periodic stress test to gauge the health of a drive and detect any minor new weak or bad sectors. If you are worried that weak sectors might incorrectly return to use, you may choose to suppress low-level formatting and/or disable returning tested sectors to active use.
SpinRite is not a data recovery tool. If a drive is failing, you should back it up first. This is especially important nowdays, as a +30 year old hard drive may start up and appear to work at first, but may eat itself up when put under significant stress.
If you have obtained an MFM/RLL drive you wish to use in a vintage system, you should treat it as a "new" drive. Recover any data from it first (if you use a different controller it may appear unformatted), then low-level format, high-level format and install software, then follow up with SpinRite.
Pattern testing and stress testing can still be useful on IDE/SCSI/SATA drives. But in practice, I have found simply wiping the drives with tools like MAXLLF or Linux "dd" is enough to re-map any bad sectors and return a drive that is not really failing back to use.
Simply do not use SpinRite with SSD or Flash drives.
In conclusion, SpinRite was a handy tool on MFM/RLL drives if you knew how it worked and what its limits were. It has only very limited uses on modern hard drives.