In this two-part article on “How to Deal with Bad Sectors on Your Hard Drive,” we have already looked at what bad sectors are and what causes them. We will now look at how your hard drive deals with them and what you can do to minimize the effect of bad sectors.

How Does Your Hard Drive Deal with Bad Sectors?

Some bad sectors are not permanent and can be fixed on the fly. For example, drive electronics use error detection and correction methods, such as Error Correction Code (ECC) and Partial-Response Maximum-Likelihood (PRML), to identify and repair bad sectors.

Other ways of recovering data from non-permanent bad sectors include:

  • Reading the data multiple times
  • Moving the read head slightly off-track
  • Reinitializing the head
  • Readjusting the servo systems

If the bad sector is more permanent and cannot be fixed on-the-fly, the drive typically adds the sector location to its list of sectors that are pending reallocation. The next time that the drive writes to this sector, it will write to the pending reallocation location and immediately read from it afterwards. And if the read is not successful, the sector will be reallocated to a spare sector on the drive. A permanent mapping within the drive’s reallocated sector table will be created between the old bad sector and its new spare sector location, so that any reads or writes to that bad sector will automatically be redirected to the spare sector in the future. The drive can only perform this sector reallocation process a finite number of times.

How Can You Minimize the Effect of Bad Sectors?

The best way to minimize the effect of bad sectors is to prevent them from happening in the first place:

  • Avoid dropping, shaking, or bumping your hard drive.
  • Avoid exposing your hard drive to extreme temperatures or humidity.
  • Avoid plugging your hard drive directly into an outlet. Use a surge protector to protect your hard drive from power fluctuations.

But bad sectors can happen even if you use your drive under ideal operating conditions, so we further recommend that users:

  • With RAID: Regularly perform a drive Self-Test with the SMART Complete Test option selected to identify bad sectors early on, followed by RAID scrubbing to reallocate any identified bad sectors.
  • Without RAID: Regularly backup your important data regularly to an external device or a cloud service to minimize data loss in case of bad sectors.

Doing the above can go a long way towards keeping your data safe while your drives are functioning. But all drives will eventually fail, no matter what we do to keep them healthy during their lifetime. To anticipate your drives’ ultimate demise, we recommend using ULINK’s DA Drive Analyzer, which uses AI to predict drive failures.

 

QNAP and ULINK Release DA Drive Analyzer, AI-powered Drive Failure Prediction Tool for NAS 

 

Photo Credit: kynny

 

Latest Versions

DriveMaster Release

DriveMaster 9: v9.2.1800

Test Suite Release

ULINK NVMe Protocol: v6.0 (New)
ULINK NVMe Regression: v5.0 (New)

TCG Opal Family Certification: v6.0 (New)
TCG Opal Family SSC Multiple Namespaces Protocol Test Suite: v2.0
TCG Opal Family SSC Application Note: v5.5 (New)
TCG Enterprise Application Note: v5.0
ULINK TCG/I1667 Opal Family Protocol: v10.0 (New)
ULINK TCG Enterprise Protocol: v5.0

ULINK SATA/ATA Protocol: v9.0
ULINK SATA/ATA Regression: v9.0 (New)
SATA-IO Device Digital: v4.0
SATA-IO Host Digital: v3.0

ULINK SAS/SCSI Protocol: v4.5
ULINK SAS/SCSI Regression: v5.0 (New)

Test Reporter

v4.4.1 (New)