Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran these commands:

$ sudo mdadm --verbose --create /dev/md0 --level=10 --chunk=256 --raid-devices=4 /dev/sdh1 /dev/sdh2 /dev/sdh3 /dev/sdh4
$ echo 'DEVICE /dev/sdh1 /dev/sdh2 /dev/sdh3 /dev/sdh4' | sudo tee -a /etc/mdadm.conf
$ sudo mdadm --detail --scan | sudo tee -a /etc/mdadm.conf

It seems that my system can no longer find the RAID device after reboot.

Running mdadm -Q /dev/sdh1 outputs

/dev/sdh1: is not an md array
/dev/sdh1: device 0 in 4 device unknown raid10 array.  Use mdadm --examine for more detail.

and mdadm -Q /dev/md0 outputs

mdadm: cannot open /dev/md0: No such file or directory

My /etc/rc.sysinit has this line:

# Start any MD RAID arrays that haven't been started yet
[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs

I'm not sure what this does but I do not have a /dev/md directory. I'm running an Amazon Linux.

Any advice on what I can do? Could the kernel have renamed the RAID device? Should I modify my rc.sysinit file?

share|improve this question
    
For raid to make any sense, several drives must be used. Are /dev/sdhX partitions on the same drive? If they are, you're doing it wrong. –  Ярослав Рахматуллин Nov 9 '12 at 2:48

1 Answer 1

The array must be re-assemple from the member drives when booting. This can be done with:

mdadm -A /dev/mdx /dev/parti /dev/partk /dev/partn [...]

It is usually more convenient to do this automatically in /etc/mdadm.conf:

DEVICE /dev/sd*

ARRAY /dev/md2 level=raid10 num-devices=4 metadata=0.90 UUID=b9de52aa:2907a6ca:5c45245c:9d6efa15
ARRAY /dev/md1 level=raid1 num-devices=4 metadata=0.90 UUID=f9d44a97:e751f917:e8628a2d:b6e629f3
ARRAY /dev/md3 level=raid0 num-devices=4 metadata=0.90 UUID=2aa775b8:35cfe1c0:25d36f80:9c6df7c4
ARRAY /dev/md5 level=raid10 num-devices=4 metadata=0.90 UUID=db8bc05d:ca12cbfc:4c6759c5:2c647efc
ARRAY /dev/md6 level=raid10 num-devices=4 metadata=0.90 UUID=10b5e3c9:b5c54ccc:c588f210:baae4ad8
ARRAY /dev/md50 level=raid5 num-devices=3 metadata=0.90 UUID=2ba30d45:fa43a215:60c02926:be4d01ef
ARRAY /dev/md7 level=raid5 num-devices=4 metadata=0.90 UUID=7bd7830f:bcc40674:6821c544:014da426

For reference:

http://aws.amazon.com/articles/1074

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.