It often goes like this. Your PC is acting weird, sluggish. You can’t put your finger on it. Someone, maybe in an online forum, suggests you may have hard disk problems. The term bad sectors is used. Windows Event Viewer may refer to a bad block. It is then suggested to look at the disk’s S.M.A.R.T. data. Which is a good idea. But what to look for? We’ll have a look at bad blocks or sectors, reallocated sectors count, pending sectors and reallocation event count in this post. I’ll discuss a utility to repair bad sectors and how repair influences the bad sector count etc..
There are a few SMART items (or attributes) that are particularly important to estimate the condition of the health of a hard disk and they all are related: Reallocated Sectors (or reallocated sector count), Pending Sectors and Reallocation Event Count.
There are many (and many are free) tools available that allow you to view SMART data. Many of them rely on thresholds set by the disk manufacturer to estimate a hard disk’s (or SSD) condition and to predict failure. However, I feel it’s best to look at raw SMART data.
|Attribute ID and name||The current normalized value for the attribute. 1 generally is worst, 253 best.||Worst normalized value that was ever detected. 1 generally is worst, 253 best.||The critical value. Once the value is reached the attribute ‘fails’. Note however that not all attributes are ‘pre-fail’ attributes.||The RAW data. So for example, for the attribute ‘Reallocated Sector Count’, the value would display actual number of reallocated sectors.|
These are the typical columns shows in a SMART utility. Most of these use the ‘Value’, ‘Worst’ and ‘Threshold’ columns to predict failure. In essence if the value is lower than the threshold the tool will alert you. However, when it comes to dealing with bad sectors I deem it wiser to look at the RAW data for the reallocated sectors attribute.
How hard disks deal with bad sectors
Whether you installed a SMART monitoring tool or not, a hard disk (or Solid State Drive) is constantly monitoring it’s own condition. When it hits a sector it can’t read, even after trying over and over again, it will make a note of that. If it can eventually read the sector it may even decide that the sector is too unreliable and replace it with a spare sector. It will make a note of that too.
If the hard disk successfully swaps the bad sector for a good one (out of it’s pool of spares or reserve sectors), the Reallocated Sectors Count is increased. All modern hard disks keep spare sectors to handle events like these. Also, the Reallocation Event Count is increased. The process is also known as ‘sector remapping’.
A hard disk can decide to reallocate a bad sector IF it can eventually do a successful read. If it can not read the data, the sector becomes a ‘Pending Sector’ and the associated SMART value is increased.
As far as the OS is concerned, bad sectors that were reallocated are invisible. It will automatically be redirected to a spare sector by the hard disk.
As it is a defect that occurs after the hard disk was manufactured it is also known as a ‘grown defect’ which is kept in the ‘grown defects list’. Unless you have very specialized hardware/software there is no way for an end user to ‘reset’ this list. It is a quite common search on Google where people want to fix or repair the reallocated sector count.
Pending sectors are those sectors the hard disk can not read, even after trying various error correction and error recovery procedures. It will remain a pending sector until something is done about it.
A pending sector is reallocated when it is given up on. The signal for the hard disk to give up on the sector is a write command to this specific sector. The SMART attribute’s RAW value is lowered (less pending sectors), Reallocated sectors is increased as well as the event counter.
Pending sectors are still visible to the operating system. So for example it can still attempt to read data in a bad sector that is pending reallocation.
You can fix or repair the pending sector count by ‘repairing’ the bad sectors. For each sector being remapped the pending sector count will decrease by one.
Each time the hard disk is busy handling the reallocation of a bad sector, the event counter is increased. Under circumstances the value can differ from the Reallocated Sector counter. It depends on how the disk manufacturer counts. It is for example possible that a pending sector actually can be written to and the disk decides to keep it in service. The event will increase, the reallocated sector count does not. The sector is also removed from the pending sector count.
Repairing bad sectors on a hard disk
For starters, you can not really repair a bad sector. If there is a physical condition that prevents a sector to be written to or read from, no software can really repair that.
Basically, the whole reallocation mechanism is nothing more than hiding bad sectors. In it’s addressing tables, the disk’s firmware makes a note, if someone (the operating system) wants to use sector X, use sector Y instead.
But you can help the disk discover bad sectors and force them to reallocate bad sectors. This is basically what all hard disk repair tools do.
Read only surface scan
By reading all sectors on a hard disk a hard disk repair tool allows the disk to discover bad sectors. Under circumstances the disk may already decide to remap marginal sectors. Sectors that can not be read at all become ‘pending’. The operating system can still see and try to access these sectors (typically it would become sluggish when trying to).
Read/write surface scan
Several methods can be employed. A utility could read/write all sectors (read contents, write original content. It’s some times referred to as ‘refreshing’ the disk surface. Or, a faster option would be to read all sectors and only write to problematic sectors to force reallocation of those.
As far as the operating system is concerned, the problematic sectors that caused it to hang, have disappeared.
When should you be worried?
Are reallocated sectors acceptable and should I even worry about repairing a hard disk? There is no definite answer to these questions.
You could say that a hard disk reallocating bad sectors is ‘working as designed’. A modern disk does maintain a pool of spare sectors so that it can take bad sectors out of service and remap those. And to a certain point I agree. I will give you two examples (anecdotal, I know):
- One of my hard disks that was member of a RAID 0 was dropped from the array. When investigating the disk I found that 2 sectors were reallocated. The disk remained in service until it was replaced because it was too small. Years later the number of reallocated sectors hadn’t changed.
- One of my ThinkPad laptops has a hard disk with 5 reallocated sectors since years already. This value has always remained stable.
On the other hand, I wouldn’t accept a disk with hundreds or even over 20 reallocated sectors, even if this number remains stable. I would not accept a single remapped sector on a new disk!
But, what’s more important is that you monitor the disk to see if more pending and/or reallocated sectors appear over the next few weeks. I recommend HD Sentinel for that. Running a few surface scans may also reveal if the situation is stable or not.
If a disk is actively ‘remapping’ then you should treat this as a data recovery scenario! As more and more sectors go bad, and the disk is deteriorating, it is important to pull the data of the disk s quickly as possible. The tool you’re using should be able to handle read errors gracefully (example: iRecover).
If the number of reallocated sectors or pending sectors keeps increasing then this is an indication something is structurally wrong with the disk. It’s not so much the actual number, it’s the trend that can tell us more.
And of course, at the first sign of trouble, always create a backup (and before that).
Bad sectors vs. bad clusters
Many file systems employ their own mechanism to deal with read and write errors. NTFS for example keeps track of clusters that it can not read from in the so called $BadClus file. Once bad sectors have been reallocated, the clusters remain flagged as bad.
You can then use Chkdsk to re-evaluate the bad clusters by specifying /B switch, so chkdsk /b [enter].