I have a RAID 10 array managed with
mdadm which has failed . The symptom was that X has crashed and I was unable to logon from the terminal. I have restarted the computer and
/dev/md1 did not start.
I've gathered the following information - some incomplete as I've manually copied it to another computer:
$ cat /proc/mdstat .... md1 : inactive sdb3(S) sdd1(S) sdc2(S) sda1(S) 1250273760 blocks super 1.0
Mounting has failed
$ mount /dev/md1 EXT4-fs (md1): unable to read superblock
Scanning did find the metadata
$ mdadm --examine --scan ... ARRAY /dev/md/1 metadata=1.0 UUID=2c... name=linux:1
Running has failed due to lack of operational mirrors
$ mdadm --run /dev/md1 md/raid0:md1: not enough operational mirrors. md: pers->run() failed... mdadm:failed to run array /dev/md1: Input/output error
After the run attempt only two disks were still in the array
$ cat /proc/mdstat .... md1 : inactive sdd1 sdc2 62513638 blocks super 1.0
Trying to re-add one disk has failed
$ mdadm /dev/md1 --add /dev/sda1 mdadm: /dev/sda1 reports being an active member for /dev/md1, but --re-add fails mdadm: not performing --add as that would convert /dev/sda1 in to a spare mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sda1" first
I've recorded some metadata in order to try recreating the array
$ mdadm --examine /dev/sdb3 /dev/sdd1 /dev/sdc2 /dev/sda1 | grep -E 'dev|Update|Role|State|Chunk Size' /dev/sdb3: State: active Update time: Mon May 14 21:51:41 2012 Chunk Size: 256K Device Role: Active device 1 Array State : AAAA /dev/sdd1: State: active Update time: Mon May 14 22:11:11 2012 Chunk Size: 256K Device Role: Active device 3 Array State : ..AA /dev/sdc2: State: active Update time: Mon May 14 22:11:11 2012 Chunk Size: 256K Device Role: Active device 2 Array State : ..AA /dev/sda1: State: active Update time: Mon May 14 21:51:41 2012 Chunk Size: 256K Device Role: Active device 0 Array State : AAAA
I've tried manually recreating the array based on the previously recorded information
$ mdadm --create --metadata=1.0 --assume-clean --level=10 --raid-devices=4 --chunk=256K /dev/md1 /dev/sda1 /dev/sdb3 /dev/sdc2 /dev/sdd1 mdadm: /dev/sda1 appears to contain an ext2fs file system mdadm: /dev/sda1 appears to be part of a raid array mdadm: /dev/sdb3 appears to contain an ext2fs file system mdadm: /dev/sdb3 appears to be part of a raid array mdadmin: /dev/sdc2 appears to be part of a raid aray mdadmin: /dev/sdd1 appears to be part of a raid aray
Mounting fails again which probably means that the raid is not properly created
$ mount /dev/md1 /mnt
EXT4-fs (md1): ext4_check_descriptors: Checksum forgroup 0 failed (54076!=0) EXT4-fs (md1): group descriptors corrupted!
Running a fsck yielded too many errors to take into account seriously so I did not let it run.
I've tried recreating the array with 'missing' devices and just a two disks, but no combination was successful. I'm not sure if I tried them all, but I did try many.
mdadmis version 2.3.2, running on OpenSUSE 12.1, kernel 3.1.10, x86_64
- all hard disks have completed
smartctl -t shortwithout any errors
How can I rebuild the RAID array without losing the information or just extract the information and copy it somewhere else? I'm also curious to know if there is anything that I did wrong above when trying to recreate the array.