Need help with mdadm

If it was a raid5 array, recreating it as a raid5 wouldn't screw up the data, however if it was a raid10 and he created a raid5 over it...that is where the problem comes in. Never use the create command when you don;t want to lose data.

Do you have output form "mdadm -E" from before you used --create the 1st time?

Its as what you are reading. It has the same variables. I created the command outta the variables I got from mdadm -E.
 
Some other history. Not sure if it is relevant.

When I got the server it booted up into recovery mode. It had a superblock error. I investigated the system and was a little worried about sda1. So I switched off the server and unplugged one of the drives. I booted up the server and I just got a flashing _ icon.

I was... thats strange. So I plugged in the drive again and I still got the flashing _ error. No more recovery mode. Not sure how/why this happened.
 
Well if it was degraded due to a "failure" on one of the drives and you removed drive1 it entirely forgot the array :P
 
I dont understand...?

Say the Array was in a degraded state due to issue reading superblock for drive2/3/4
In a 4 disk RAID5 array you have 1 disk redundancy,if you remove another drive from the mix during a degraded state the array config is "destroyed" as far as the system is concerned
In a 3 disk hot spare scenario you have similar problem as it's already degraded

Usually if something like this happens your best bet is to MDADM --assemble and skipping the degraded disk till the array is "built" in the degraded state,then replacing the bad disk,adding it in and having mdadm repair the array
 
Say the Array was in a degraded state due to issue reading superblock for drive2/3/4
In a 4 disk RAID5 array you have 1 disk redundancy,if you remove another drive from the mix during a degraded state the array config is "destroyed" as far as the system is concerned
In a 3 disk hot spare scenario you have similar problem as it's already degraded

Usually if something like this happens your best bet is to MDADM --assemble and skipping the degraded disk till the array is "built" in the degraded state,then replacing the bad disk,adding it in and having mdadm repair the array

Is there anyway to recover from this?
 
Given the information to date, here's what I'd do at this point [out of desperation]:

mdadm --create /dev/md0 -n 3 -x 1 -c 256 -l 5 -p left-symmetric --assume-clean /dev/sda1 /dev/sdc1 /dev/sdd1 /dev/sde1

if that doesn't work, change the order of the disks:

mdadm --create /dev/md0 -n 3 -x 1 -c 256 -l 5 -p left-symmetric --assume-clean /dev/sde1 /dev/sda1 /dev/sdc1 /dev/sdd1

check, change:

mdadm --create /dev/md0 -n 3 -x 1 -c 256 -l 5 -p left-symmetric --assume-clean /dev/sdd1 /dev/sde1 /dev/sda1 /dev/sdc1

lather, rinse, repeat.

good luck.
 
Is there anyway to recover from this?

You started off slightly in the wrong place by doing a create first,you'd want to try assemble and check each drive's status before fiddling to see the order and raid statuses. See my post earlier on Reclaime if you need this data badly

You can attempt to guess which disks were degraded and assemble skipping the "bad" disks,but it's pretty hit and miss by now
 
the only thing I can suggest is try "mdadm --assemble --scan" to see if it autodetects anything. Also look in /var/log/messages for error logs and what does cat /proc/mdstat show?

Also when you use the rescue cd are you able to see your data on the disks once you mount /dev/md0?
 
Top
Sign up to the MyBroadband newsletter
X