linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 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

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).