* reconstructing raid5 with bad sectors @ 2003-08-04 17:08 dean gaudet 2003-08-04 18:14 ` Ross Vandegrift 0 siblings, 1 reply; 3+ messages in thread From: dean gaudet @ 2003-08-04 17:08 UTC (permalink / raw) To: linux-raid i have a 4 disk array which (due to power problems) has bad sectors on two of the disks. as far as i can tell the bad sectors are not in overlapping stripes of the raid -- so in theory every stripe has 3 components still available. but the kernel doesn't like this situation because it considers a disk to be either all good or all bad :) is there an offline tool which can reconstruct such an array? or even an offline tool which already has the parity calculation code and such which i could extend to support such reconstruction? i considered copying the two bad disks with "dd conv=noerror,sync", which would stop the kernel from marking the drives as bad, but that seems a bit less than ideal because i really would like to reconstruct the bad stripes using the 3 valid copies and not include an all-zeroes copy created by dd. -dean ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: reconstructing raid5 with bad sectors 2003-08-04 17:08 reconstructing raid5 with bad sectors dean gaudet @ 2003-08-04 18:14 ` Ross Vandegrift 2003-08-04 18:36 ` dean gaudet 0 siblings, 1 reply; 3+ messages in thread From: Ross Vandegrift @ 2003-08-04 18:14 UTC (permalink / raw) To: dean gaudet; +Cc: linux-raid On Mon, Aug 04, 2003 at 10:08:15AM -0700, dean gaudet wrote: > is there an offline tool which can reconstruct such an array? or even an > offline tool which already has the parity calculation code and such which > i could extend to support such reconstruction? > > i considered copying the two bad disks with "dd conv=noerror,sync", which > would stop the kernel from marking the drives as bad, but that seems a bit > less than ideal because i really would like to reconstruct the bad stripes > using the 3 valid copies and not include an all-zeroes copy created by dd. dd_rescue sounds like your friend - it'll let you make raw backups of the partitions, but instead of quitting on errors, it'll keep going until it passes the bad areas. You'll probably need a few disks to use as dd_rescue targets, but once you have images of the needed partitions, rebuild should work fine (assuming of course, that you're correct in saying the errors never overlap). -- Ross Vandegrift ross@willow.seitz.com A Pope has a Water Cannon. It is a Water Cannon. He fires Holy-Water from it. It is a Holy-Water Cannon. He Blesses it. It is a Holy Holy-Water Cannon. He Blesses the Hell out of it. It is a Wholly Holy Holy-Water Cannon. He has it pierced. It is a Holey Wholly Holy Holy-Water Cannon. He makes it official. It is a Canon Holey Wholly Holy Holy-Water Cannon. Batman and Robin arrive. He shoots them. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: reconstructing raid5 with bad sectors 2003-08-04 18:14 ` Ross Vandegrift @ 2003-08-04 18:36 ` dean gaudet 0 siblings, 0 replies; 3+ messages in thread From: dean gaudet @ 2003-08-04 18:36 UTC (permalink / raw) To: Ross Vandegrift; +Cc: linux-raid On Mon, 4 Aug 2003, Ross Vandegrift wrote: > On Mon, Aug 04, 2003 at 10:08:15AM -0700, dean gaudet wrote: > > is there an offline tool which can reconstruct such an array? or even an > > offline tool which already has the parity calculation code and such which > > i could extend to support such reconstruction? > > > > i considered copying the two bad disks with "dd conv=noerror,sync", which > > would stop the kernel from marking the drives as bad, but that seems a bit > > less than ideal because i really would like to reconstruct the bad stripes > > using the 3 valid copies and not include an all-zeroes copy created by dd. > > dd_rescue sounds like your friend - it'll let you make raw backups of > the partitions, but instead of quitting on errors, it'll keep going > until it passes the bad areas. You'll probably need a few disks to use > as dd_rescue targets, but once you have images of the needed partitions, > rebuild should work fine (assuming of course, that you're correct in saying > the errors never overlap). hmm i don't see what dd_rescue does which "dd conv=noerror,sync" doesn't do. i did use "dd conv=noerror,sync" to copy the dead disks to other new disks -- and with that i can bring up the array (in degraded mode because i don't want reconstruction to occur). but the problem is that this doesn't help me recover my data from the stripes which had errors. i.e. my sitation is like this, for some stripes i've got: { good, good, unreadable, good } dd or dd_rescue create this situation: { good, good, all zeros, good } which doesn't help recovery... knowing which sectors are unreadable in the first case i can recover the entire stripe by redoing the parity calculation -- which would let me write out the proper data to a new disk. this is basically what the online raid recovery does, but the online recovery only supports "good/bad" on a per-disk granularity, rather than on a per-stripe granularity. -dean ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-08-04 18:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-08-04 17:08 reconstructing raid5 with bad sectors dean gaudet 2003-08-04 18:14 ` Ross Vandegrift 2003-08-04 18:36 ` dean gaudet
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).