Hard drives commonly encounter the issue of bad sectors, which can lead to the loss of data and a decline in performance. There are several methods to detect bad sectors in a RAID.
Through Read Commands
One method to find bad sectors is to simply read from the drive during normal use. If the drive encounters any errors while it is reading, it can mark the initial offending sector and take appropriate action at a later time.
Scanning for Bad Blocks
Another approach is to scan for bad blocks on the drives within the RAID array. This involves reading the disk’s surface to identify any sectors that are no longer reliable for data storage. Various disk scanning utilities are available that can perform such scans, and they typically generate a report indicating the location of any bad blocks found.
RAID Scrubbing
RAID controllers often provide a feature called RAID scrubbing. It is a process that verifies the integrity and consistency of the data stored on the RAID array. If inconsistencies or errors are detected, it can indicate the presence of bad sectors. The controller may attempt to repair the data by using the redundant information.
Drawbacks of the Above Approaches
However, the above three methods have a couple of drawbacks. When the host issues a single read command, it usually does so to multiple sectors. When there is an uncorrectable error (UNC) on the read command, the error will only report the logical block address (LBA) of the first occurrence of the UNC. So, if there are multiple bad sectors in the command, the drive will only report the first bad sector. Subsequent bad sectors in the command will be ignored by the host and drive.
The above methods are also affected by the host’s command timeout limit. When the drive’s internal command timeout limit is longer than the host’s, the host may terminate a command with a reset before the drive finishes the command. In such a scenario, the drive will not record any bad sectors detected. SMART Attribute 197 (Current Pending Sector Count) will not be incremented. And bad sectors will not be reallocated when new data is written to them.
Self-Test: The Comprehensive Way to Detect Bad SectorsÂ
These drawbacks are not present when performing a Self-Test. A Self-Test involves a comprehensive examination of the drive’s surface, scanning for bad sectors and potential errors. Since there is no limit to the number of errors reported per command, the drive can continue to detect one error after another without missing any bad sectors. This makes the Self-Tests a comprehensive, if somewhat time-consuming, way of finding entire clusters of bad sectors.
Therefore, the comprehensive approach to detect and repair bad sectors is to first run a Self-Test to identify bad sector locations. If any bad sectors are detected, you should perform RAID Scrubbing to repair the bad sectors.
In a data dependent world, the ULINK DA Drive Analyzer AI algorithms disrupt drive failure prediction with 7-8 times more effectiveness than traditional systems.
QNAP and ULINK Release DA Drive Analyzer, AI-powered Drive Failure Prediction Tool for NASÂ
Photo Credit: 9parusnikov
Recent Comments