Solved "Bad Sector" False Positives: Bad blocks caused by write errors?

soldier9599

New member
Local time
1:43 PM
Messages
8
"Bad Sector" False Positives: Bad blocks caused by write errors?

Are bad sectors always irreversible hardware problems? How do programs test for bad sectors, and could it be possible for soft data errors to come up as damaged blocks even if they are physically just fine?

I recently had a drive come into my possession that had completely failed within the laptop it was used. The Windows 7 system failed at every boot, CHKDSK (run from installation media) would spend days on end trying to make repairs, and reformatting and reinstalling Windows was unsuccessful. So the first thing I did with this disk was plug it into my desktop and run a surface test in Paragon Hard Disk Manager. It found tons of bad sectors and I was convinced the drive was trashed. The weird thing was there were two partitions, and only one partition had errors, so I suspected maybe it wasn't purely a hardware problem.

To test this hypothesis, I wiped the entire drive to zeros and told it to verify every bit. There were no errors! I then ran another surface test on extreme mode and found no bad blocks! I then formatted the drive to NTFS and scanned the file system in Paragon with slightly enigmatic results. It came back saying there are no bad blocks and listed no problems in the log, but for some reason it said there were "minor problems." As expected, viewing it in any file manager (showing hidden) shows nothing, and dir in cmd comes up as "file not found," but strangely the file system test said that there were 11 directories and 27 files. I ran CHKDSK and Windows told me that it found no errors. I could run another surface test, but I'm worried that if I keep testing and testing I might encourage this drive to move closer to the end of its life.

Were the bad blocks I found simply caused by write errors or temporary data damage? Is it possible that most of the ills of this drive were fixed by the wipe? Or is it more likely that this is only temporarily masking the real problem, and I will very soon see problems again? I know it's impossible for you to know for sure, but I'm wondering what your experiences would lead you to predict.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Desktop + HP DV6 Laptop
OS
Arch Linux x64
CPU
Intel i7 4790K
Motherboard
Asus Z97-WS
Memory
G.Skill Trident X 2 x 8 GB
Graphics Card(s)
Asus GTX 780 Direct CU II
Sound Card
Lexicon Omega
Monitor(s) Displays
Viewsonic VP2770-LED
Screen Resolution
2560 x 1440
Hard Drives
Software: Samsung 840 EVO 1 TB SSD
Data: Samsung HD204UI 2 TB 5400RPM HDD
Video: Hitachi Deskstar 7K3000 3 TB 7200RPM HDD
Backup: WD 1 TB 5400RPM HDD
PSU
SeaSonic X-1050
Case
NZXT Source 530
Cooling
Corsair H110 (case fans: 3 Noctua NF-A14 PWM + 2 NZXT 120mm)
Keyboard
Logitech MK700
Mouse
Logitech M705
Are bad sectors always irreversible hardware problems? How do programs test for bad sectors, and could it be possible for soft data errors to come up as damaged blocks even if they are physically just fine?


There are two types of bad blocks - physical and logical. Physical bad sectors are surface defects which can't be repaired. Logical bad sectors are those which are physically good but the ECC ( Error Correction Code ) of that sector became corrupted and hence OS can't read data from it. Logical bad sectors can be repaired by low level formatting the drive or writing zeros to the surface.

Although physical bad sectors can't be repaired by performing a low level format, all modern hard drives incorporates a technique called "Sector Remapping" to repair bad sectors. All hard drives will have a hidden area of reserved sectors ( sector reserve pool ). When the disk controller detects a bad sector, it will mark the physical address of that sector as bad in an internal table named "G-List" ( Growing Defect List ) and allocate a good sector from the pool to replace it's logical address. This process is called "Remapping" and is transparent to the user and OS.

Usually the remapping process is happened like this ;

1. Disk Controller performs a media scan to verify sectors when the disk is in idle stage ( Background Media Scan ). If a sector is identified as bad or unstable, it's physical address will be marked on an internal list called "Current Pending Sectors". Usually the total number of pending sectors can be viewed in the SMART log.

2. When the next time this pending sector is accessed by OS (usually a write operation), disk controller will move the data stored in that sector to a spare one and the sector will be marked as bad in the "G-List".


So when you perform a zero wipe, following will happen.

1. Logical sectors will be repaired ( ECC code will be reset ).

2. Performing zero write to physically bad sectors which are marked to be pending will force the remapping. Since the logical address of bad sectors are remapped, it will look like the defects are repaired to the user.



For more info, please refer - Bad Sector Remapping - Data Recovery | 0800 072 3282

Although the disk may looks like working after the zero wipe, i won't suggest to use it as the disk may be unstable and hence it may fail again soon.
 
Last edited:

My Computer

Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
To add onto to the detailed explanation that Anshad Edavana gave, I'll add that "bad sectors" are labeled as such by the HDD's firmware/controller whenever it finds that it cannot properly write to a given sector. Problems with reading from a sector will not trigger a bad sector reallocation, only problems with writing to a sector will trigger it.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
N/A (custom-built)
OS
Windows 7 Ultimate x64 SP1
CPU
Intel Core i7 2700K @ 3.5GHz (TurboBoost disabled)
Motherboard
ASUS P8Z68-V/GEN3
Memory
16GB (4x4GB) Kingston HyperX DDR3 1600MHz @ 1333MHz
Graphics Card(s)
Nvidia EVGA GeForce GTX 1060 6GB
Sound Card
Realtek High Definition Audio (motherboard integrated)
Monitor(s) Displays
NEC Multisync EX231W
Screen Resolution
1920x1080 @ 60Hz via DVI-D
Hard Drives
2x Western Digital 1TB SATA3 Caviar Black Internal HDD // 1x WD 500GB USB 3.0 "My Passport Essential" External HDD // 1x WD 1TB USB 3.0 "My Passport Essential" External HDD // 2x WD 2TB USB 3.0 "My Passport Essential" External HDD
PSU
Corsair Professional Series Gold AX850
Case
Antec 300
Cooling
Air-cooling
Keyboard
Steelseries 6Gv2
Mouse
Steelseries Sensei RAW Glossy, Logitech M500
Internet Speed
DSL (AT&T)
Antivirus
Microsoft Security Essentials
Browser
Pale Moon, Mozilla Firefox 12, Opera 12, Chromium, IE9
Other Info
Virtual Machines (VirtualBox):
* Japanese Windows XP Professional SP3
* Japanese Windows 7 Professional SP1
Thank you for your help. So if bad sectors are only found by trying to write to them, does this mean that during a surface test the software tries rewriting every block back and forth? Or is it simply going through the G-List and reporting the bad sectors (why would it take so many hours then)? If it's the latter, that would suggest bad sectors are undetectable unless the drive had already attempted to write to them at some point before the scan.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Desktop + HP DV6 Laptop
OS
Arch Linux x64
CPU
Intel i7 4790K
Motherboard
Asus Z97-WS
Memory
G.Skill Trident X 2 x 8 GB
Graphics Card(s)
Asus GTX 780 Direct CU II
Sound Card
Lexicon Omega
Monitor(s) Displays
Viewsonic VP2770-LED
Screen Resolution
2560 x 1440
Hard Drives
Software: Samsung 840 EVO 1 TB SSD
Data: Samsung HD204UI 2 TB 5400RPM HDD
Video: Hitachi Deskstar 7K3000 3 TB 7200RPM HDD
Backup: WD 1 TB 5400RPM HDD
PSU
SeaSonic X-1050
Case
NZXT Source 530
Cooling
Corsair H110 (case fans: 3 Noctua NF-A14 PWM + 2 NZXT 120mm)
Keyboard
Logitech MK700
Mouse
Logitech M705
Hi

The are several ways to detect bad sectors. In normal operation, a bad sector can be found and remapped during a write operation. In addition to that, all modern hard drives will perform a background media scan when the drive is in idle stage to detect bad blocks.

Refer page 43 of http://www.seagate.com/staticfiles/...rprise/savvio/Savvio 15K.1/SAS/100407739c.pdf

Code:
[B]Background Media Scan[/B]

Background Media Scan (BMS) is a self-initiated media scan. BMS is defined in the T10 document SPC-4 
available from the T10 committee. BMS performs sequential reads across the entire pack of the media while 
the drive is idle.


[B]Media Pre-Scan[/B]

Media Pre-Scan is a feature that allows the drive to repair media errors that would otherwise have been found 
by the host system during critical data accesses early in the drive’s life. The default setting for Media Pre-Scan 
is enabled on standard products. Media Pre-Scan checks each write command to determine if the destination 
LBAs have been scanned by BMS. If the LBAs have been verified, the drive proceeds with the normal write 
command. If the LBAs have not been verified by BMS, Pre-Scan will convert the write to a write verify to certify 
that the data was properly written to the disc.

"Background Medium Scan" and "Medium Pre-Scan" are there to detect bad sectors at early stages and remap them silently . Every had drive will develop bad sectors over time and use and most of them will get reallocated automatically. Every time when a sector or a group of sectors got remapped, the disk controller will increase the "Reallocated Sector Count" and "Reallocated Event Count" which can be viewed on the SMART log.

Code:
[B]Reallocation Event Count[/B]

Count of remap operations. The raw value of this attribute shows the total count of attempts to transfer data from reallocated sectors to a spare area. Both successful & unsuccessful attempts are counted

[B]Reallocated Sectors Count[/B]

Count of reallocated sectors. When the hard drive finds a read/write/verification error, it marks that sector as "reallocated" and transfers data to a special reserved area (spare area). This process is also known as remapping, and reallocated sectors are called "remaps". The raw value normally represents a count of the bad sectors that have been found and remapped.


If RAW values of these SMART attributes are high, it means the disk surface had large number of bad sectors but they are now reallocated. The drive is dying slowly and it is not reliable to save important data on it.

So if bad sectors are only found by trying to write to them, does this mean that during a surface test the software tries rewriting every block back and forth? Or is it simply going through the G-List and reporting the bad sectors (why would it take so many hours then)? If it's the latter, that would suggest bad sectors are undetectable unless the drive had already attempted to write to them at some point before the scan.


You need either firmware repair tools ( which will cost a fortune ) or manufacturer's repair tools ( propitiatory tools which are not available for buying ) to access and view "G-List" and "P-List".Even if you have the tools to access the lists, the sectors listed on them are already remapped so there is no point in doing so.

A surface test performed by a software tool can be either read test, write test or a combination of two. For example, there is freeware tool "HDDScan" which detects bad sectors by performing only read test of all sectors. The commercial tool "HDD Sentinel" has options to perform either read test or write test.

From it's user guide on Hard Disk Sentinel | Hard Disk health, performance and temperature monitoring using SMART technology

Read + WRITE + read test (refresh data area) - Reads stored data from each blocks, writes back the contents and finally reads the information and compare with original contents. By the extensive test, an additional write cycle is used before writing back the contents to improve the efficiency of the error correction (drive regeneration)


In most case a read test is enough to detect bad sectors but if there are weak sectors ( unstable ), a write test can only find them. Writing zeros to the entire disk surface is one of the oldest technique to find unstable sectors.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
Thanks, Anshad. This has been very informative.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Desktop + HP DV6 Laptop
OS
Arch Linux x64
CPU
Intel i7 4790K
Motherboard
Asus Z97-WS
Memory
G.Skill Trident X 2 x 8 GB
Graphics Card(s)
Asus GTX 780 Direct CU II
Sound Card
Lexicon Omega
Monitor(s) Displays
Viewsonic VP2770-LED
Screen Resolution
2560 x 1440
Hard Drives
Software: Samsung 840 EVO 1 TB SSD
Data: Samsung HD204UI 2 TB 5400RPM HDD
Video: Hitachi Deskstar 7K3000 3 TB 7200RPM HDD
Backup: WD 1 TB 5400RPM HDD
PSU
SeaSonic X-1050
Case
NZXT Source 530
Cooling
Corsair H110 (case fans: 3 Noctua NF-A14 PWM + 2 NZXT 120mm)
Keyboard
Logitech MK700
Mouse
Logitech M705
Back
Top