On Tue, Apr 15, 2008 at 12:54 PM, David <[EMAIL PROTECTED]> wrote: > 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.
Why are you doing this background scanning, and how is it better than the ECC offered by zfs? While your solution is valid for one environment (md on linux) it may not be application, required, or desirable with zfs. If there's data on the bad blocks and you're using the disks in a mirror, raidz or raidz2 pool, any read of those blocks (or performing a scrub) would correct the problem. Of course, this won't help if you're not using a mirror or pool with parity, but you mentioned that you use md on linux now, so I assume you will be. One advantage that zfs holds over md and other raid solutions is that the data is checksummed, so you'll always know that the data you got back was what you had originally written. There's no need to check the entire mirror or parity volume ahead of time. Running a scrub will verifiy the blocks that are actually in use and works with the i/o scheduler, so should have a lower impact on performance. -B -- Brandon High [EMAIL PROTECTED] "The good is the enemy of the best." - Nietzsche _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss