* Recovering RAID-5 from images
@ 2008-11-09 23:10 Stefan Heinrichsen
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Heinrichsen @ 2008-11-09 23:10 UTC (permalink / raw)
To: linux-raid
Hello,
I have a RAID-5 with 3 devices. One disked failed and I added a new one. During sync a second disc failed. This second "Disc" is a RAID-0 consisting of to 120GB IDE Discs. I handled to dump an image of both disc with ddrescue. Only a few kilobytes of the broken disk could not been read (some where in the middle of the disc).
For my recovering experiments I made an Image of the remaining disc of the RAID-5 (/dev/loop3). No I tried to assemble the both RAIDs using loopbackdevice. The RAID-0 (/dev/md0) started without any problems. But the RAID-5 is not starting. It seems like both discs are marked as spare (see below).
========= (Image of the working device of the RAID-5)========
livecd ~ # mdadm --examine /dev/loop3
/dev/loop3:
Magic : a92b4efc
Version : 00.90.00
UUID : b3081913:cee36385:187ba9cf:56150f19
Creation Time : Mon May 7 08:37:48 2007
Raid Level : raid5
Used Dev Size : 237866112 (226.85 GiB 243.57 GB)
Array Size : 475732224 (453.69 GiB 487.15 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 6
Update Time : Sat Nov 1 02:26:45 2008
State : clean
Active Devices : 1
Working Devices : 2
Failed Devices : 2
Spare Devices : 1
Checksum : 37352dcc - correct
Events : 0.670720
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 0 8 33 0 active sync /dev/sdc1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 0 0 2 faulty removed
3 3 9 0 3 spare /dev/md0
==================================
===The RAID consisting of 2 IDE Device Images====
livecd ~ # mdadm --examine /dev/md0
/dev/md0:
Magic : a92b4efc
Version : 00.90.00
UUID : b3081913:cee36385:187ba9cf:56150f19
Creation Time : Mon May 7 08:37:48 2007
Raid Level : raid5
Used Dev Size : 237866112 (226.85 GiB 243.57 GB)
Array Size : 475732224 (453.69 GiB 487.15 GB)
Raid Devices : 3
Total Devices : 3
Preferred Minor : 6
Update Time : Sat Nov 1 01:44:09 2008
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 1
Spare Devices : 1
Checksum : 3735239e - correct
Events : 0.670714
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 2 9 1 2 active sync /dev/md1
0 0 8 33 0 active sync /dev/sdc1
1 1 0 0 1 faulty removed
2 2 9 1 2 active sync /dev/md1
3 3 9 0 3 spare /dev/md0
================================
livecd ~ # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : inactive loop3[0](S) md0[2](S)
482062016 blocks
md0 : active raid0 loop2[0] loop1[1]
237866176 blocks 64k chunks
unused devices: <none>
====================================
livecd ~ # mdadm --detail /dev/md1
mdadm: md device /dev/md1 does not appear to be active.
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Recovering RAID-5 from images
@ 2008-11-10 10:06 Steve Fairbairn
0 siblings, 0 replies; 2+ messages in thread
From: Steve Fairbairn @ 2008-11-10 10:06 UTC (permalink / raw)
To: Linux-Raid; +Cc: Stefan Heinrichsen
Stefan Heinrichsen wrote:
> Hello,
>
> I have a RAID-5 with 3 devices. One disked failed and I added a new one. During sync a second disc failed. This second "Disc" is a RAID-0 consisting of to 120GB IDE Discs. I handled to dump an image of both disc with ddrescue. Only a few kilobytes of the broken disk could not been read (some where in the middle of the disc).
> For my recovering experiments I made an Image of the remaining disc of the RAID-5 (/dev/loop3). No I tried to assemble the both RAIDs using loopbackdevice. The RAID-0 (/dev/md0) started without any problems. But the RAID-5 is not starting. It seems like both discs are marked as spare (see below).
>
I'm no md/mdadm expert, but I suspect you first need to stop the
/dev/md0 and restart it as /dev/md1 (I hope you can do that). The
reason I would do this is that the examines of the array elements you
sent us show that what you have now as /dev/md0 was /dev/md1.
Then you need to force the assembly of the array with just the 2
'working' discs (/dev/loop3 && /dev/md1)
eg. (PLEASE check these with someone else before using them)...
mdadm --stop /dev/d0
mdadm --assemble /dev/md1 <component devices)
mdadm --assemble /dev/<dev> /dev/loop3 /dev/md1 --force
The --force will tell it to ignore that fact that /dev/md1 was marked as
failed and insert it anyway.
Hope this helps,
Steve.
PS. Sorry for repeat send. I forgot to include the list address.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-10 10:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-09 23:10 Recovering RAID-5 from images Stefan Heinrichsen
-- strict thread matches above, loose matches on Subject: below --
2008-11-10 10:06 Steve Fairbairn
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).