* forcing a read on a known bad block
@ 2006-04-11 21:57 dean gaudet
2006-04-11 22:15 ` Patrik Jonsson
2006-04-11 22:37 ` [RAID] " Julian Cowley
0 siblings, 2 replies; 4+ messages in thread
From: dean gaudet @ 2006-04-11 21:57 UTC (permalink / raw)
To: linux-raid
hey Neil...
i've been wanting to test out the reconstruct-on-read-error code... and
i've had two chances to do so, but haven't be able to force md to read the
appropriate block to trigger the code.
i had two disks with SMART Current_Pending_Sector > 0 (which indicates
pending read error) and i did SMART long self-tests to find out where the
bad block was (it should show the LBA in the SMART error log)...
one disk was in a raid1 -- and so it was kind of random which of the two
disks would be read from if i tried to seek to that LBA and read... in
theory with O_DIRECT i should have been able to randomly get the right
disk, but that seems a bit clunky. unfortunately i didn't think of the
O_DIRECT trick until after i'd given up and decided to just resync the
whole disk proactively.
the other disk was in a raid5 ... 5 disk raid5, so 20% chance of the bad
block being in parity. i copied the kernel code to be sure, and sure
enough the bad block was in parity... just bad luck :) so i can't force a
read there any way that i know of...
anyhow this made me wonder if there's some other existing trick to force
such reads/reconstructions to occur... or perhaps this might be a useful
future feature.
on the raid5 disk i actually tried reading the LBA directly from the
component device and it didn't trigger the read error, so now i'm a bit
skeptical of the SMART log and/or my computation of the seek offset in the
partition... but the above question is still interesting.
-dean
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: forcing a read on a known bad block
2006-04-11 21:57 forcing a read on a known bad block dean gaudet
@ 2006-04-11 22:15 ` Patrik Jonsson
2006-04-11 22:37 ` [RAID] " Julian Cowley
1 sibling, 0 replies; 4+ messages in thread
From: Patrik Jonsson @ 2006-04-11 22:15 UTC (permalink / raw)
To: dean gaudet; +Cc: linux-raid
[-- Attachment #1: Type: text/plain, Size: 896 bytes --]
hi dean,
dean gaudet wrote:
>
> the other disk was in a raid5 ... 5 disk raid5, so 20% chance of the bad
> block being in parity. i copied the kernel code to be sure, and sure
> enough the bad block was in parity... just bad luck :) so i can't force a
> read there any way that i know of...
well, for raid5 you can use 'echo repair > /sys/block/mdx/md/sync_action'
This does a 'simulated reconstruction' and has triggered this for me in
the past. (For some reason 'check' instead of 'repair' did not, even
though it should have tried to read all the blocks then, too...)
That said, I have one disk in an 8-disk raid5 that says 'current pending
sector 1', and another that says 'offline uncorrectable 1', and they
have been doing so for months. Neither SMART extended tests or full
raid5 resyncs have either failed or fixed this, so I don't know what's
up with that...
cheers,
/Patrik
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RAID] forcing a read on a known bad block
2006-04-11 21:57 forcing a read on a known bad block dean gaudet
2006-04-11 22:15 ` Patrik Jonsson
@ 2006-04-11 22:37 ` Julian Cowley
2006-04-12 5:18 ` Luca Berra
1 sibling, 1 reply; 4+ messages in thread
From: Julian Cowley @ 2006-04-11 22:37 UTC (permalink / raw)
To: dean gaudet; +Cc: linux-raid
On Tue, 11 Apr 2006, dean gaudet wrote:
> anyhow this made me wonder if there's some other existing trick to force
> such reads/reconstructions to occur... or perhaps this might be a useful
> future feature.
For testing RAID, what would be really nice is if there were a virtual
disk device where one could simulate bad sectors (read or write),
non-responsive disks, etc. It would be virtual in the same sort way
that /dev/full simulates a full disk.
This would be an ideal project for Xen.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RAID] forcing a read on a known bad block
2006-04-11 22:37 ` [RAID] " Julian Cowley
@ 2006-04-12 5:18 ` Luca Berra
0 siblings, 0 replies; 4+ messages in thread
From: Luca Berra @ 2006-04-12 5:18 UTC (permalink / raw)
To: linux-raid
On Tue, Apr 11, 2006 at 12:37:53PM -1000, Julian Cowley wrote:
>On Tue, 11 Apr 2006, dean gaudet wrote:
>>anyhow this made me wonder if there's some other existing trick to force
>>such reads/reconstructions to occur... or perhaps this might be a useful
>>future feature.
>
>For testing RAID, what would be really nice is if there were a virtual
>disk device where one could simulate bad sectors (read or write),
>non-responsive disks, etc. It would be virtual in the same sort way
>that /dev/full simulates a full disk.
>
either use the MD "faulty" personality, or the device-mapper "error"
target.
L.
--
Luca Berra -- bluca@comedia.it
Communication Media & Services S.r.l.
/"\
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-12 5:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-11 21:57 forcing a read on a known bad block dean gaudet
2006-04-11 22:15 ` Patrik Jonsson
2006-04-11 22:37 ` [RAID] " Julian Cowley
2006-04-12 5:18 ` Luca Berra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).