* Raid5 with 2 bad drives
@ 2005-02-22 16:43 Matthias Julius
2005-02-22 17:03 ` Gordon Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Julius @ 2005-02-22 16:43 UTC (permalink / raw)
To: linux-raid
Hi,
I have a raid5 out of 4 drives where 2 drives failed and were
removed. Since it happened during backup I would very much like to
reactivate the array to rescue as much data as there are intact.
When I try to assemble the array with mdadm it tells me that there are
not enough devices. Is there a way to convince mdadm to use the
faulty drive to get a working array?
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Raid5 with 2 bad drives
2005-02-22 16:43 Raid5 with 2 bad drives Matthias Julius
@ 2005-02-22 17:03 ` Gordon Henderson
2005-02-23 0:40 ` Matthias Julius
0 siblings, 1 reply; 5+ messages in thread
From: Gordon Henderson @ 2005-02-22 17:03 UTC (permalink / raw)
To: Matthias Julius; +Cc: linux-raid
On Tue, 22 Feb 2005, Matthias Julius wrote:
> Hi,
>
> I have a raid5 out of 4 drives where 2 drives failed and were
> removed. Since it happened during backup I would very much like to
> reactivate the array to rescue as much data as there are intact.
>
> When I try to assemble the array with mdadm it tells me that there are
> not enough devices. Is there a way to convince mdadm to use the
> faulty drive to get a working array?
Try something like:
mdadm --assemble /dev/mdY /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 \
--run --force
Substitute the mdY and the /dev/sd?? for your devices as appropriate..
As for getting the data off, you have to be carefull you don't hit the bad
blocks again.. You might be able to mount it read-only, then tar up the
filesystem, directory at a time, hoping you don't hit a bad-block inside a
file.
Gordon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Raid5 with 2 bad drives
2005-02-22 17:03 ` Gordon Henderson
@ 2005-02-23 0:40 ` Matthias Julius
2005-02-23 6:23 ` Mike Hardy
0 siblings, 1 reply; 5+ messages in thread
From: Matthias Julius @ 2005-02-23 0:40 UTC (permalink / raw)
To: linux-raid
Gordon Henderson <gordon@drogon.net> writes:
> Try something like:
>
> mdadm --assemble /dev/mdY /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 \
> --run --force
--force did the trick. I could have thought of that one myself.
Thanks.
As for not hitting the bad blocks again: Is there a way to find out to
which file they belong with ext3/xfs on LVM on RAID5? That would be
helpfull.
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Raid5 with 2 bad drives
2005-02-23 0:40 ` Matthias Julius
@ 2005-02-23 6:23 ` Mike Hardy
2005-02-23 13:35 ` Matthias Julius
0 siblings, 1 reply; 5+ messages in thread
From: Mike Hardy @ 2005-02-23 6:23 UTC (permalink / raw)
To: Matthias Julius; +Cc: linux-raid
I posted a raid5 parity calculator implemented in perl a while back (a
couple weeks?) that is capable of taking your disk geometry, the RAID
LBA you're interested in, and finding the disk sector it belongs to.
I honestly don't remember if it can go the other way, but I'm not sure
why it couldn't? Its possible that bad blocks may simply be in the
parity chunk of the stripe too. Once you've got the RAID LBA you can use
the methods in the BadBlockHowto to find the file
Either way, the math isn't too hard, and the script isn't very
complicated, but doing that math is the only way I know of to relate the
bits of data you've got to the file.
-Mike
Matthias Julius wrote:
> Gordon Henderson <gordon@drogon.net> writes:
>
>
>>Try something like:
>>
>> mdadm --assemble /dev/mdY /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 \
>> --run --force
>
>
> --force did the trick. I could have thought of that one myself.
> Thanks.
>
> As for not hitting the bad blocks again: Is there a way to find out to
> which file they belong with ext3/xfs on LVM on RAID5? That would be
> helpfull.
>
> Matthias
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Raid5 with 2 bad drives
2005-02-23 6:23 ` Mike Hardy
@ 2005-02-23 13:35 ` Matthias Julius
0 siblings, 0 replies; 5+ messages in thread
From: Matthias Julius @ 2005-02-23 13:35 UTC (permalink / raw)
To: linux-raid
Mike Hardy <mhardy@h3c.com> writes:
> I posted a raid5 parity calculator implemented in perl a while back (a
> couple weeks?) that is capable of taking your disk geometry, the RAID
> LBA you're interested in, and finding the disk sector it belongs to.
>
> I honestly don't remember if it can go the other way, but I'm not sure
> why it couldn't? Its possible that bad blocks may simply be in the
> parity chunk of the stripe too. Once you've got the RAID LBA you can
> use the methods in the BadBlockHowto to find the file
That helps. Although there is a typo in line 139. See diff below.
When I know the RAID LBA how do I find out to which LV it belongs and
which sector it is in there? But, I guess I better ask that on a LVM
list.
Matthias
--- raid5calc.orig 2005-02-23 08:26:43.721332354 -0500
+++ raid5calc 2005-02-23 08:30:12.673100526 -0500
@@ -136,7 +136,7 @@
# Testing only -
# Check to see if the result I got is the same as what is in the block
open (DEVICE, "<" . $component{"device"})
- || die "Unable to open device " . $compoent{"device"} . ": " . $! . "\n";
+ || die "Unable to open device " . $component{"device"} . ": " . $! . "\n";
seek(DEVICE, $device_offset, 0)
|| die "Unable to seek to " . $device_offset . " device " . $xor_devices{$i} . ": " . $! . "\n";
read(DEVICE, $data, ($sectors_per_chunk * 512))
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-02-23 13:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-22 16:43 Raid5 with 2 bad drives Matthias Julius
2005-02-22 17:03 ` Gordon Henderson
2005-02-23 0:40 ` Matthias Julius
2005-02-23 6:23 ` Mike Hardy
2005-02-23 13:35 ` Matthias Julius
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).