Google Answers Logo
View Question
Q: Raid 5 XFS FC2 recover disk failure ( No Answer,   0 Comments )
Subject: Raid 5 XFS FC2 recover disk failure
Category: Computers > Hardware
Asked by: mattma-ga
List Price: $100.00
Posted: 13 Nov 2006 09:16 PST
Expires: 26 Nov 2006 15:44 PST
Question ID: 782377
Raid 5 XFS FC2 recover disk failure

I have a Raid 5 xfs setup with 2 disk gone bad at the same time. I can
assemble the array successfully,

mdadm -Afv /dev/md0 -f /dev/hd[ab]1

but I get xfs IO read errors rather quickly when I start to go into
the mounted array.

running xfs_repair on the xfs raid array proved unsuccessful because
xfs_repair aborts upon an io error.

xfs_repair -v /dev/md0

So installed a blank hard drive and made a disk image with dd

dd bs=256b conv=noerror if=/dev/hdb1 of=/dev/hdd1

(the original array was composed of /dev/hd[abc]1. /dev/hdd1 is the new blank disk

dd encountered 1 read error but completed successfully (or so it
seems). However, for some reason, dd doesn't copy the superblock info.

After the dd, I run

mdadm -Av /dev/md0 /dev/hd[ad]1

which gets a no raid superblock found message.

So then I built the array with one of the bad disks

mdadm -Afv /dev/md0 -f /dev/hd[ab]1

and then hot added the new dd'd disk

mdadm -a /dev/md0 /dev/hdd1

This marked /dev/hdd1 as a spare but the info can't be rebuilt because
hdb1 will throw up an io error and the raid array will mark hdb1 as
faulty rather quickly.

What I need is to get /dev/hdd1 be an *exact* image of /dev/hdb1 then
theoretically, I can assemble the array with hda1 and hdd1 and then
run xfs_repair on the array and hopefully recover most of the data.

So how can I modify the superblock into manually to make mdadm think
the /dev/hdd1 is a disk in the array?

Am I going down the right path or is there another method I should be trying?

I read somewhere that someone used strace to digure out the location
of the superblock and used the "skip" parameter on dd to get the
superblock into on the new disk.

www dot nabble dot com (slash) Re:-need-help-with-raid6-recovery-p1754352.html

(i apologize for the links - this forum isn't letting me post links yet)

Even though I'm a fairly proficient java developer, I'm hoping I don't
have to resort to writing java to rebuild the info like this guy did!

www dot freesoftwaremagazine dot com (slash) articles/recovery_raid?page=0%2C1

At this point, I have successfully dd'd the image of the bad drive
onto a new drive of the same brand and model number.  WHen I fdisk the
new drive, I see a raid array partition on it.  However, when I swap
the bad drive with the new replica, and try to assemble the array with

mdadm -Afv /dev/md0 -f /dev/hd[ab]1 does not

I get "invalid raid superblock" and "bad magic number expected ... got
0000" messages.

If I can get the replica disk to really be a replica and join with the
array then I can run xfs_repair on it and get most of my data back.

I'll pay $100 for anyone who can help me get most of my array back.
There is no answer at this time.

There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  

Google Home - Answers FAQ - Terms of Service - Privacy Policy