Christopfer,
thanks forSome more questions:
Your wrote: This is intentional. It does have a "file scanner" to that will attempt to read and then save affected files to a new location. .
1) What does the the file scanner do exactly? If it can read the file after some retries, does it it the file to another location? Is this transparent for access to the Pool and does it copy it to another file name? What happens to pool integrity?
2) What happpens, when the scanner cannot read the file? Will it use information of a duplicated disk?
3) What happenes, when the pool tries to read from a duplicated file and one version of the file is not readable? Does it use the other disk and reduplicates the file by writing to it again? Maybe the scanning should be in DrivePool instead of the scanner? Is there an integrity check in drivepool which compares the duplicated file for binary identity? If yes, DrivePool could scan the drives and in case of read errors, just rewrite the file. In case of inkonsistencies (readable but binary different), it should either stop access to the fiel and let the use decide which file version to use, or just use any of the versions and overwrite the other. If there is more then one additional copy of the file, it could use the contents which is on the majority of drives.
4) Why is writing to a file remove the ability to recover it? It should only write successfully read data, i.e. a sector is not readable and let's say the scanner can read it after 20 tries, then it should write this sector immediately to force remapping. It should never write a sector which it can't read and which belongs to a file.
5) Basically there are two kinds of bad sectors: those in files and those in freespace. Bad sectors in free space can be overwritten immediately with zeros, for those in files you have to wait until you can read it or read it from a duplicated version and then write it.
6) To you point who to find exactly the sector: From the clustermap you should now which files belongs to which clusters or sectors. Then either just rewrite data in the specific position in the file via file system or use the microsoft defragmentation api.