• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

bad sectors reallocated corrupt data?

fede2222

n00b
Joined
Mar 4, 2013
Messages
12
Hi

I have a theorical question... I spend 3 hours finding the answer in google, but no luck

Scenario:
One sector need to be read and the sector go bad, the sector is reallocated by the HDD to the spare sectors. In some cases the reallocated info is unaltered and other cases in corrupted. I assume work this way.

If unaltered i assume that is transparent to the Operating System. The HDD controller read the data, reallocate the sector to a spare sector, write the data in the spare sector, mark the original sector as bad. The application and the Operating System is unaware of this. You only have a SMART value changed.

If corrupted, it report something to the Operating System???
NO - You need to check with reiserfsck/chkdsk/etc to detect the file with errors?. Triggered by a suspicion by an SMART Change... is the right path to go?
YES - I assume that an error will popup on your application (triggered by the Operating System) and you can act in consequence. reiserfsck/chkdsk/etc?
Or.. need to identify the corrupted file via other method?

I know with a flavor of RAID or another parity this is not a worry.. but i want to know for other systems/situation

Thanks.
 
If it is corrupted (after timing out) an error will be reported to the OS on the failed read. The CurrentPendingSectors count in SMART will go up for each sector that can not be read.

If the sector is weak but can be read or is a CurrentPendingSector but is overwritten the sector will be reallocated.
 
If it is corrupted (after timing out) an error will be reported to the OS on the failed read. The CurrentPendingSectors count in SMART will go up for each sector that can not be read.

If the sector is weak but can be read or is a CurrentPendingSector but is overwritten the sector will be reallocated.

Thanks
 
For the integrity of the file I'd say nothing will tell you for sure, not even chkdsk. Only with checksums can you be sure that it's good or not.
 
This is a very interesting question, bothered me too.

As the previous poster said - I'd say checksums are the way to go.

To chime in on the SMART parameters thing, if it's a WD drive then I can tell you I've seen some weird stuff.
Example: windows won't start (or it's slow).
MHDD (a neat hdd tool) while scanning shows 2 errors and one high latency warning. SMART Pending sectors count = 2. Realocated sectors=0.

I run the WD diagnostic tool and it says it can't repair the drive.
So I backup the drive with dd_rescue, erase the disk using bios functions with MHDD.
I then shutdown the computer, re-run the scan - all clear! WD diag also says all clear.
I run a few passes of badblocks in r/w mode - again, no problems. Realocated sectors = 0. Pending sectors = 0. Go figure.

However, the first boot after restoring the drive's image usually triggers chkdsk and there's an assload of errors (funnily enough usually it's either firefox or avast files).
And I do always wonder afterwards - did I break files or not?
Chkdsk writes to the system log so you can try to review the waterfall of messages and find out if there's something about your important files there.

Does anyone know of a tool that would run in the background, build a database that maps files to their checksums and periodically scans the files and checks for bit-rot related checksum mismatches? (assuming 'static' files like photos, movies).
 
For the integrity of the file I'd say nothing will tell you for sure, not even chkdsk. Only with checksums can you be sure that it's good or not.

I assume chkdksk or the similar fylesystem tool.. but like you i didn't know for sure

In Windows the "/R" command (look at "chkdsk /?") says something like: Find the bad sectors and recover readable data. Don't know if scan all disk, realloacted sectors, or have some integrity to check to validate the "recovered" sector

This is a very interesting question, bothered me too.

As the previous poster said - I'd say checksums are the way to go.

To chime in on the SMART parameters thing, if it's a WD drive then I can tell you I've seen some weird stuff.
Example: windows won't start (or it's slow).
MHDD (a neat hdd tool) while scanning shows 2 errors and one high latency warning. SMART Pending sectors count = 2. Realocated sectors=0.

I run the WD diagnostic tool and it says it can't repair the drive.
So I backup the drive with dd_rescue, erase the disk using bios functions with MHDD.
I then shutdown the computer, re-run the scan - all clear! WD diag also says all clear.
I run a few passes of badblocks in r/w mode - again, no problems. Realocated sectors = 0. Pending sectors = 0. Go figure.

I have the same behaviour one time. The problem was the PSU in my case. When the HDD need to read if insufficient power it trigger the timeout of a "bad sector", and because that i have pending sectors. Then change the PSU, do a full read/write to the entire surface and 0 to pending and realloacted.

However, the first boot after restoring the drive's image usually triggers chkdsk and there's an assload of errors (funnily enough usually it's either firefox or avast files).
And I do always wonder afterwards - did I break files or not?
Chkdsk writes to the system log so you can try to review the waterfall of messages and find out if there's something about your important files there.

If the problem was the PSU (like me), yes the files are corrupted, because the integritry check didn't validate that, however the disk was fine. If not your case... dont know.. :confused:

Does anyone know of a tool that would run in the background, build a database that maps files to their checksums and periodically scans the files and checks for bit-rot related checksum mismatches? (assuming 'static' files like photos, movies).

I will like to know too...
In my personal data i use ZFS (Freenas) for photos, documents, etc for maximum integrity and UnRaid for Movies, Series, etc, one bit bad is not the end of the world in that
But i want to know first for the knowledge, and second because the data of friends, family, etc or other when i need to repair their computers, etc
 
Back
Top