data recovery on raid5
Hello,
I have a client with a failed raid5 that is in desperate need of the data that's on the raid. The attached file holds the mdadm -E superblocks that are hopefully the keys to the puzzle. Linux-raid folks, if you can give any help here it would be much appreciated.
# mdadm -V mdadm - v1.7.0 - 11 August 2004 # uname -a Linux hazel 2.6.13-gentoo-r5 #1 SMP Sat Jan 21 13:24:15 PST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux
Here's my take:
Logfiles show that last night drive /dev/etherd/e0.4 failed and around noon today /dev/etherd/e0.0 failed. This jibes with the superblock dates and info.
My assessment is that since the last known good configuration was 0 <missing>
1 /dev/etherd/e0.0
2 /dev/etherd/e0.2
3 /dev/etherd/e0.3
then we should shoot for this. I couldn't figure out how to get there using mdadm -A since /dev/etherd/e0.0 isn't in sync with e0.2 or e0.3. If anyone can suggest a way to get this back using -A, please chime in.
The alternative is to recreate the array with this configuration hoping the data blocks will all line up properly so the filesystem can be mounted and data retrieved. It looks like the following command is the right way to do this, but not being an expert I (and the client) would like someone else to verify the sanity of this approach.
Will
mdadm -C /dev/md0 -n 4 -l 5 missing /dev/etherd/e0.[023]
do what we want?
Linux-raid folks, please reply-to-all as we're probably all not on the list.
Thanks for your help,
Sam
/dev/etherd/e0.0:
Magic : a92b4efc
Version : 00.90.00
UUID : 8fe1fe85:eeb90460:c525faab:cdaab792 Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Update Time : Fri Apr 21 12:45:07 2006
State : clean
Active Devices : 3
Working Devices : 4
Failed Devices : 1
Spare Devices : 1
Checksum : 4cc955da - correct
Events : 0.3488315
Layout : left-asymmetric
Chunk Size : 32K
Number Major Minor RaidDevice State
this 1 152 0 1 active sync /dev/etherd/e0.0
0 0 0 0 0 removed
1 1 152 0 1 active sync /dev/etherd/e0.0
2 2 152 32 2 active sync /dev/etherd/e0.2
3 3 152 48 3 active sync /dev/etherd/e0.3
4 4 152 16 0 spare /dev/etherd/e0.1
/dev/etherd/e0.2:
Magic : a92b4efc
Version : 00.90.00
UUID : 8fe1fe85:eeb90460:c525faab:cdaab792 Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Update Time : Fri Apr 21 14:03:12 2006
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 3
Spare Devices : 1
Checksum : 4cc991e9 - correct
Events : 0.3493633
Layout : left-asymmetric
Chunk Size : 32K
Number Major Minor RaidDevice State
this 2 152 32 2 active sync /dev/etherd/e0.2
0 0 0 0 0 removed
1 1 0 0 1 faulty removed
2 2 152 32 2 active sync /dev/etherd/e0.2
3 3 152 48 3 active sync /dev/etherd/e0.3
4 4 152 16 4 spare /dev/etherd/e0.1
/dev/etherd/e0.3:
Magic : a92b4efc
Version : 00.90.00
UUID : 8fe1fe85:eeb90460:c525faab:cdaab792 Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Update Time : Fri Apr 21 14:03:12 2006
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 3
Spare Devices : 1
Checksum : 4cc991fb - correct
Events : 0.3493633
Layout : left-asymmetric
Chunk Size : 32K
Number Major Minor RaidDevice State
this 3 152 48 3 active sync /dev/etherd/e0.3
0 0 0 0 0 removed
1 1 0 0 1 faulty removed
2 2 152 32 2 active sync /dev/etherd/e0.2
3 3 152 48 3 active sync /dev/etherd/e0.3
4 4 152 16 4 spare /dev/etherd/e0.1
/dev/etherd/e0.4:
Magic : a92b4efc
Version : 00.90.00
UUID : 8fe1fe85:eeb90460:c525faab:cdaab792 Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0
Update Time : Thu Apr 20 21:07:50 2006
State : clean
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Checksum : 4cc84d59 - correct
Events : 0.3482550
Layout : left-asymmetric
Chunk Size : 32K
Number Major Minor RaidDevice State
this 0 152 64 0 active sync /dev/etherd/e0.4
0 0 152 64 0 active sync /dev/etherd/e0.4 1 1 152 0 1 active sync /dev/etherd/e0.0 2 2 152 32 2 active sync /dev/etherd/e0.2 3 3 152 48 3 active sync /dev/etherd/e0.3 4 4 152 16 4 spare /dev/etherd/e0.1
Quoted 34 lines · Sam Hopkins
Hello,
I have a client with a failed raid5 that is in desperate need of the data that's on the raid. The attached file holds the mdadm -E superblocks that are hopefully the keys to the puzzle. Linux-raid folks, if you can give any help here it would be much appreciated.
# mdadm -V mdadm - v1.7.0 - 11 August 2004 # uname -a Linux hazel 2.6.13-gentoo-r5 #1 SMP Sat Jan 21 13:24:15 PST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/LinuxHere's my take:
Logfiles show that last night drive
/dev/etherd/e0.4failed and around noon today/dev/etherd/e0.0failed. This jibes with the superblock dates and info.My assessment is that since the last known good configuration was 0 <missing>
1/dev/etherd/e0.0
2/dev/etherd/e0.2
3/dev/etherd/e0.3then we should shoot for this. I couldn't figure out how to get there using mdadm -A since
/dev/etherd/e0.0isn't in sync with e0.2 or e0.3. If anyone can suggest a way to get this back using -A, please chime in.The alternative is to recreate the array with this configuration hoping the data blocks will all line up properly so the filesystem can be mounted and data retrieved. It looks like the following command is the right way to do this, but not being an expert I (and the client) would like someone else to verify the sanity of this approach.
Quoted 11 lines
Will
mdadm -C
/dev/md0-n 4 -l 5 missing /dev/etherd/e0.[023]do what we want?
Linux-raid folks, please reply-to-all as we're probably all not on the list.
Yes, I would re-create the array with 1 missing disk. mount read-only, verify your data. If things are ok, remount read-write and remember to add a new disk to fix the degrade array.
With the "missing" keyword, no resync/recovery, thus the data on disk will be intact.
--
Regards,
Mike T.
Recreate the array from the constituent drives in the order you mention, with 'missing' in place of the first drive that failed?
It won't resync because it has a missing drive.
If you created it correctly, the data will be there
If you didn't create it correctly, you can keep trying permutations of 4-disk arrays with one missing until you see your data, and you should find it.
-Mike
Quoted 174 lines · Sam Hopkins
Hello,
I have a client with a failed raid5 that is in desperate need of the data that's on the raid. The attached file holds the mdadm -E superblocks that are hopefully the keys to the puzzle. Linux-raid folks, if you can give any help here it would be much appreciated.
# mdadm -V mdadm - v1.7.0 - 11 August 2004 # uname -a Linux hazel 2.6.13-gentoo-r5 #1 SMP Sat Jan 21 13:24:15 PST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/LinuxHere's my take:
Logfiles show that last night drive
/dev/etherd/e0.4failed and around noon today/dev/etherd/e0.0failed. This jibes with the superblock dates and info.My assessment is that since the last known good configuration was 0 <missing>
1/dev/etherd/e0.0
2/dev/etherd/e0.2
3/dev/etherd/e0.3then we should shoot for this. I couldn't figure out how to get there using mdadm -A since
/dev/etherd/e0.0isn't in sync with e0.2 or e0.3. If anyone can suggest a way to get this back using -A, please chime in.The alternative is to recreate the array with this configuration hoping the data blocks will all line up properly so the filesystem can be mounted and data retrieved. It looks like the following command is the right way to do this, but not being an expert I (and the client) would like someone else to verify the sanity of this approach.
Will
mdadm -C
/dev/md0-n 4 -l 5 missing /dev/etherd/e0.[023]do what we want?
Linux-raid folks, please reply-to-all as we're probably all not on the list.
Thanks for your help,
Sam
------------------------------------------------------------------------
/dev/etherd/e0.0:Magic : a92b4efc Version : 00.90.00 UUID : 8fe1fe85:eeb90460:c525faab:cdaab792Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0Update Time : Fri Apr 21 12:45:07 2006
State : clean
Active Devices : 3
Working Devices : 4
Failed Devices : 1
Spare Devices : 1
Checksum :4cc955da- correct
Events : 0.3488315Layout : left-asymmetric
Chunk Size : 32KNumber Major Minor RaidDevice State
this 1 152 0 1 active sync/dev/etherd/e0.00 0 0 0 0 removed 1 1 152 0 1 active sync /dev/etherd/e0.0 2 2 152 32 2 active sync /dev/etherd/e0.2 3 3 152 48 3 active sync /dev/etherd/e0.3 4 4 152 16 0 spare /dev/etherd/e0.1 /dev/etherd/e0.2: Magic : a92b4efc Version : 00.90.00 UUID : 8fe1fe85:eeb90460:c525faab:cdaab792Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0Update Time : Fri Apr 21 14:03:12 2006
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 3
Spare Devices : 1
Checksum :4cc991e9- correct
Events : 0.3493633Layout : left-asymmetric
Chunk Size : 32KNumber Major Minor RaidDevice State
this 2 152 32 2 active sync/dev/etherd/e0.20 0 0 0 0 removed 1 1 0 0 1 faulty removed 2 2 152 32 2 active sync /dev/etherd/e0.2 3 3 152 48 3 active sync /dev/etherd/e0.3 4 4 152 16 4 spare /dev/etherd/e0.1 /dev/etherd/e0.3: Magic : a92b4efc Version : 00.90.00 UUID : 8fe1fe85:eeb90460:c525faab:cdaab792Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0Update Time : Fri Apr 21 14:03:12 2006
State : clean
Active Devices : 2
Working Devices : 3
Failed Devices : 3
Spare Devices : 1
Checksum :4cc991fb- correct
Events : 0.3493633Layout : left-asymmetric
Chunk Size : 32KNumber Major Minor RaidDevice State
this 3 152 48 3 active sync/dev/etherd/e0.30 0 0 0 0 removed 1 1 0 0 1 faulty removed 2 2 152 32 2 active sync /dev/etherd/e0.2 3 3 152 48 3 active sync /dev/etherd/e0.3 4 4 152 16 4 spare /dev/etherd/e0.1 /dev/etherd/e0.4: Magic : a92b4efc Version : 00.90.00 UUID : 8fe1fe85:eeb90460:c525faab:cdaab792Creation Time : Mon Jan 3 03:16:48 2005
Raid Level : raid5
Device Size : 195360896 (186.31 GiB 200.05 GB)
Raid Devices : 4
Total Devices : 5
Preferred Minor : 0Update Time : Thu Apr 20 21:07:50 2006
State : clean
Active Devices : 4
Working Devices : 5
Failed Devices : 0
Spare Devices : 1
Checksum :4cc84d59- correct
Events : 0.3482550Layout : left-asymmetric
Chunk Size : 32KNumber Major Minor RaidDevice State
this 0 152 64 0 active sync/dev/etherd/e0.40 0 152 64 0 active sync /dev/etherd/e0.4 1 1 152 0 1 active sync /dev/etherd/e0.0 2 2 152 32 2 active sync /dev/etherd/e0.2 3 3 152 48 3 active sync /dev/etherd/e0.3 4 4 152 16 4 spare /dev/etherd/e0.1
Quoted 1 line · Sam Hopkins
mdadm -C
/dev/md0-n 4 -l 5 missing /dev/etherd/e0.[023]
While it should work, a bit drastic perhaps?
I'd start with mdadm --assemble --force.
With --force, mdadm will pull the event counter of the most-recently failed drive up to current status which should give you a readable array.
After that, you could try running a check by echo'ing "check" into "sync_action".
If the check succeeds, fine, hotadd the last drive to your array and MD will start resync'ing.
If the check fails because of a bad block, you'll have to make a decision. Live with the lost blocks, or try and reconstruct from the first kicked disk.
I posted a patch this week that will allow you to forcefully get the array started with all of the disks - but beware, MD wasn't made with this in mind and will probably be confused and sometimes pick data from the first-kicked drive over data from the other drives. Only forcefully start the array with all drives if you absolutely have to...
Oh, and I'm not an expert by any means, so take everything I say with a grain of salt :-).
Quoted 7 lines · Sam Hopkins
Hello,
I have a client with a failed raid5 that is in desperate need of the data that's on the raid. The attached file holds the mdadm -E superblocks that are hopefully the keys to the puzzle. Linux-raid folks, if you can give any help here it would be much appreciated.
Have you read the archive? There were a couple of similar problems earlier this month.
take a look at 2 April 06 - "help recreating a raid5" Also "Re: help wanted - 6-disk raid5 borked: _ _ U U U U"
Quoted 3 lines
# mdadm -V mdadm - v1.7.0 - 11 August 2004
Can't hurt to upgrade mdadm
Quoted 15 lines
# uname -a Linux hazel 2.6.13-gentoo-r5 #1 SMP Sat Jan 21 13:24:15 PST 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/LinuxHere's my take:
Logfiles show that last night drive
/dev/etherd/e0.4failed and around noon today/dev/etherd/e0.0failed. This jibes with the superblock dates and info.My assessment is that since the last known good configuration was 0 <missing>
1/dev/etherd/e0.0
2/dev/etherd/e0.2
3/dev/etherd/e0.3
Quoted 4 lines
then we should shoot for this. I couldn't figure out how to get there using mdadm -A since
/dev/etherd/e0.0isn't in sync with e0.2 or e0.3. If anyone can suggest a way to get this back using -A, please chime in.
See the patch Molle provided - it seemed to work for him and took the guesswork out of the create parameters.
I personally didn't use it since Neil didn't bless it :)
Quoted 6 lines
The alternative is to recreate the array with this configuration hoping the data blocks will all line up properly so the filesystem can be mounted and data retrieved. It looks like the following command is the right way to do this, but not being an expert I (and the client) would like someone else to verify the sanity of this approach.
Quoted 6 lines
Will
mdadm -C
/dev/md0-n 4 -l 5 missing /dev/etherd/e0.[023]do what we want?
It looks right to me - but see comments below...
Also, can you take disk images of the devices (dd if=/dev/etherd/e0.0 of=/somewhere/e0.0.img) to allow for retries?
Quoted 11 lines
------------------------------------------------------------------------
/dev/etherd/e0.0:Events : 0.3488315 /dev/etherd/e0.2: Events : 0.3493633 /dev/etherd/e0.3: Events : 0.3493633 /dev/etherd/e0.4: Events : 0.3482550
I don't know precisely what 'Events' are but I read this as being a lot of activity on e0.[23] after e0.0 went down.
I think that's odd.
Maybe the kernel isn't stopping the device when it degrades - I seem to remember something like this but I'm probably wrong... archives again...
This shouldn't affect the situation you're now in (horse,bolt,door etc) but fixing it may make life better should another problem like this occur - or it may not. Eventually there may be info in a wiki to help understand this stuff.
HTH
David
Quoted 7 lines · Sam Hopkins
Hello,
I have a client with a failed raid5 that is in desperate need of the data that's on the raid. The attached file holds the mdadm -E superblocks that are hopefully the keys to the puzzle. Linux-raid folks, if you can give any help here it would be much appreciated.
snip
Quoted 3 lines
Linux-raid folks, please reply-to-all as we're probably all not on the list.
If you're going to post messages to public mailing lists (and solicit help and private cc's!!!) then you should not be using mechanisms like the one below. Please Google if you don't understand why not.
I've been getting so much junk mail that I'm resorting to a draconian mechanism to avoid the mail. In order to make sure that there's a real person sending mail, I'm asking you to explicitly enable access. To do that, send mail to sah at this domain with the token:
qSGTt
in the subject of your mail message. After that, you shouldn't get any bounces from me. Sorry if this is an inconvenience.
David