Thanks for this. There are definitely some good ideas here. However I think I would like to do it a little bit differently. If we want to mirror a single drive in a raid5 array, I would really like to do that using the raid1 personality. e.g. suspend io remove the drive build a raid1 (with no superblock) using the drive. add that back into the array resume io. Then another drive can be added to the raid1 and synced. This allows shuffling of drives even when they haven't actually failed. To handle read failures, I would like the first step to be to re-write the failed block. I believe most (all?) drives will relocate the block if a write cannot succeed at the normal location, so this will often fix the problem. A userspace process can then notice an unacceptable failure rate and start a miror/swap process as above. This possible doesn't handle the possibility of a write failing very well, but I'm not sure what your approach does in that case. Could you explain that? It also means that if the raid1 rebuild hits a read-error it cannot cope whereas your code would just reconstruct the block from the rest of the raid5. I'll think through this some more and try to work out how I really want it to work. Thanks again for the ideas and code, NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html