I have a flash drive and I found that some files on it were
corrupted. When I recopied them from a backup, these files were
corrupted again, sometimes immediately, but sometimes only after a few
days or weeks.
Some folks have suggested I simply "buy a new one". But I think that
this might be more or less the nature of flash memory, similar to dead
pixels on an LCD display. So I'm thinking that a better way might be to
mark bad clusters and keep using the drive.
I tried "chkdsk /R" and the result is "Windows has checked the file
system and found no problems". Then I tried the old Windows 98
scandisk, and tried Write/Read test. I know that I shortened the flash
memory's life by doing this? Again no error was detected.
I filled the disk with files exactly 32768 bytes long - the size of
a FAT cluster on this drive - with random data content. I then checked
the CRC for these files. I also overwrite these files with inverted
data a few times and checked the CRC again. I found a few files where
this failed from time to time, so I changed the attributes of these
files to read-only and hidden. As long as no mechanism moves these
files, this then prevents those bad clusters from being used again.
Is this a reasonable approach?
|
Let me put it this way: "buy a new one".
Your approach might be reasonable, sort of, but I don't agree with
some of the assumptions you've made that lead you down this path.
And I can pretty much guarantee that it simply won't work on many
newer flash drives.
Continue reading
How do I fix bad sectors on a flash drive?
Tech Questions?
Get Answers! -
Ask Leo! ... by Leo Notenboom
Leo's Answers Newsletter -
Ask Leo! in your inbox every week.

Source: How do I fix bad sectors on a flash drive?