Re: Re-map disk sectors in userspace when rewriting after read errors
From: Robin Hill <hidden>
Date: 2009-09-18 08:28:51
On Fri Sep 18, 2009 at 11:17:27AM +0300, Majed B. wrote:
I've re-read this thread and I was wondering if: echo check > /sys/block/$array/md/sync_action would help me (and possibly Matthias) in any way. I have a RAID5 array of 8 disks running degraded on 7. One of the 7 has bad sectors and the one that is not in the array also had bad sectors. I zeroed the one out of the array (with dd) and then cloned the one with bad sectors in the array to it using dd_rescue. Later, I reassembled the array using the cloned disk instead of the original. So now, I'm sure I still have inconsistencies, but would doing the action above force a correction? Also, would that work on a degraded array?
All the 'check' action does is validate that the checksum matches the
data. By doing this, it will also be doing a full read check on the
array (though I'm not certain what action is taken on read failures).
The 'repair' action will also rewrite any checksums which don't match
the data.
All of this requires a non-degraded array, so I suspect the 'check' and
'repair' actions will get ignored altogether on a degraded array (and
certainly won't actually work). As the array is degraded, you _can't_
have any RAID inconsistencies. You may have some filesystem
inconsistencies (a fsck is definitely recommended) and/or data
inconsistencies (unless you have checksums or backups to compare against
then you're stuck on finding these though).
Cheers,
Robin
--
___
( ' } | Robin Hill [off-list ref] |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" | Attachments
- (unnamed) [application/pgp-signature] 198 bytes