Hi all,
I really could use some help with this one!!
I'm having a nightmare trying to repair a broken software RAID5 array. One disk of 7 died a few weeks ago, I replaced it today and started the resync. All fine till mdadm found a bad sector on the new disk and threw it out. I tried to remove it then add it again with mdadm --manage --add, the system hung and I was forced to reboot. In the process it completely killed the array (showed 'inactive' in /proc/mdstat) and I couldn't start it at all, even after removing the new disk to try to push back to the old state. In the end the only solution I could find was to recreate the array using:
mdadm --create /dev/md0 --assume-clean --level=5 --verbose --raid-devices=7 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 missing
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: /dev/sdb1 appears to contain an ext2fs file system
size=-1163822592K mtime=Fri Mar 2 10:35:48 2012
mdadm: /dev/sdb1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: layout defaults to left-symmetric
mdadm: /dev/sdc1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: layout defaults to left-symmetric
mdadm: /dev/sdd1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: layout defaults to left-symmetric
mdadm: /dev/sde1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: layout defaults to left-symmetric
mdadm: /dev/sdf1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: layout defaults to left-symmetric
mdadm: /dev/sdg1 appears to be part of a raid array:
level=raid5 devices=7 ctime=Fri Mar 2 17:30:55 2012
mdadm: size set to 1953511936K
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
After that the RAID array came back, degraded as before, but I can't mount it. The 'ext2fs' it automatically detected is wrong, the array was created as ext4.
fsck gives me a superblock error:
fsck.ext4 /dev/md0
e2fsck 1.41.14 (22-Dec-2010)
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/md0
I still have 6 good disks, but the metadata seems to be completely messed up. Is there any hope of recovering the data left on the array?