Fixing non-fake SDs
Some question about non-fake SDs that are getting weak. For instance:
Data OK: 58.41 GB (122484302 sectors)
Data LOST: 1.52 MB (3122 sectors)
Corrupted: 1.52 MB (3122 sectors)
Slightly changed: 0.00 Byte (0 sectors)
Overwritten: 0.00 Byte (0 sectors)
Average reading speed: 4.45 MB/s
Is there any filesystem tweak that is capable to hide those bad sectors and use all the rest? Using smaller filesystems is no solution as the errors are not at begin or end of the drive.
Some filesystems support what you want, and, on those filesystems, you may find more than one way to do it. The following link shows an example for ext4: https://sysadmin.compxtreme.ro/check-and-mark-badblocks-on-ext4-partitions/
In my experience, these fixes are not worth it because this kind of failures in a real drive often means that the drive is close to the end of its lifespan. You can try to write the files again to see if the drive relocates the bad blocks.
I would rename the corrupted files to something that indicates they are not to be touched, say like "corrupted" and then set their perms to something like 000.
Then you would want to re-run f3write ; f3read several times to make sure that there are no other locations that are corrupted, as AltraMayor has stated if there is one place of corruption the disk is probably failing and you'll probably encounter more.
Is there any filesystem tweak that is capable to hide those bad sectors and use all the rest?
@Massimo-B: I have just finished and published a tool called Flakyflash for finding weak/failing data clusters on FAT-formatted flash media and marking them as bad in the FAT. It works even if the drive does not report read errors to the operating system kernel but rather silently returns corrupted data. Its principle of operation is to read each free data cluster multiple times and to compare the data across the reads. If the reads differ, then the cluster is assumed to be flaky, and the tool marks the cluster as bad in the FAT so that file system drivers will not allocate data to it.
Hi @whitslack,
Flakyflash meets the demands of some of the users of F3, so I'm open to a pull request to add a brief description and link to it in the section Other resources of the file README.rst.
Thank you for your contribution.