[zfs-discuss] Repairing known bad disk blocks before zfs encounters them

David david at santools.com
Tue Apr 15 12:54:04 PDT 2008


I have some code that implements background media scanning so I am able to detect bad blocks well before zfs encounters them.   I need a script or something that will map the known bad block(s) to a logical block so I can force zfs to repair the bad block from redundant/parity data.

I can't find anything that isn't part of a draconian scanning/repair mechanism.   Granted the zfs architecture can map physical block X to logical block Y, Z, and other letters of the alphabet .. but I want to go backwards. 

2nd part of the question .. assuming I know /dev/dsk/c0t0d0 has an ECC error on block n, and I now have the appropriate storage pool info & offset that corresponds to that block, then how do I force the file system to repair the offending block.  

This was easy to address in LINUX assuming the filesystem was built on the /dev/md driver, because all I had to do is force a read and twiddle with the parameters to force a non-cached I/O and subsequent repair.  

It seems as if zfs's is too smart for it's own good and won't let me fix something that I know is bad, before zfs has a chance to discover it for itself.   :)
 
 
This message posted from opensolaris.org



More information about the zfs-discuss mailing list