Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


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

04 Sep 2014   #1
soldier9599

Arch Linux x64
 
 
"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 System SpecsSystem Spec
.
05 Sep 2014   #2
Anshad Edavana

Windows 7 Ultimate x64
 
 

Quote:
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.
My System SpecsSystem Spec
05 Sep 2014   #3
King Arthur

Windows 7 Ultimate x64 SP1
 
 

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 System SpecsSystem Spec
.

06 Sep 2014   #4
soldier9599

Arch Linux x64
 
 

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 System SpecsSystem Spec
07 Sep 2014   #5
Anshad Edavana

Windows 7 Ultimate x64
 
 

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/s...100407739c.pdf

Code:
Background Media Scan

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.


Media Pre-Scan

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:
Reallocation Event Count

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

Reallocated Sectors Count

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.

Quote:

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

Quote:
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 System SpecsSystem Spec
11 Sep 2014   #6
soldier9599

Arch Linux x64
 
 

Thanks, Anshad. This has been very informative.
My System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
IE & Chrome: "__.exe contained a virus and was deleted." FALSE REPORT
Hi all. I searched through the forum & didn't find any reports like this. A client's employee needed my help remotely via Teamviewer the last 24 hours. Old, old, old Pentium 4 PC running Win 7 32-bit; 512MB RAM (wth?) :cry: The system is old, and was running even slower than it usually does...
System Security
GFWL Giving "False Positive" Error Message
Hi I'm getting an error message everytime I start my game, although there is nothing wrong!! I just close the message and play my game. Is there a way to get rid of this nuisance?
Gaming
Should "false" Positives Be Ignored?
I just installed an update for a video recorder that I use (GETFlv) and Comodo popped an alert for the Trojware.Win32.Spy.Banker.Gen@1. Most of what I found Googling are non-English returns, but one I found from Virus Total indicated that only 4 out of 43 scanners balked on this program, and each...
System Security
"Check Disk for Errors" & "hard drive needs to be formatted" errors
I'm getting a lot of "Check Disk for Errors" and "this hard drive needs to be formatted before it can be used" error messages when plugging my external usb hard drives into my home pc which uses windows 7. I don't get any of these messages when I plug the same hard drives in at any of a number of...
Hardware & Devices
a-square false positives?
I am wondering about some of a-squares findings on my latest scan. Things like winamp and win7codecs muc surely be clean:
System Security


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:12.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App