LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   CentOS 6.7 - Missing md0 raid (https://www.linuxquestions.org/questions/centos-111/centos-6-7-missing-md0-raid-4175578025/)

usao 04-21-2016 09:36 AM

CentOS 6.7 - Missing md0 raid
 
I created a raid array using:
mdadm -Cv -l5 -c1024 -n3 -pls /dev/md0 /dev/sd{b,c,d}1

After reboot, the array /dev/md0 is missing. I searched the web, and found referencs to creating a CONF file, but not sure how to create it. Commands shown on the web don't work:

mdadm --assemble --scan
mdadm: No arrays found in config file or automatically

mdadm --assemble --force /dev/mds0 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: /dev/sdb1 is busy - skipping
mdadm: /dev/sdc1 is busy - skipping
mdadm: /dev/sdd1 is busy - skipping

frostschutz 04-21-2016 12:17 PM

`mdadm --detail --scan` should give you a starting point for a working config file.

You only really need the UUID without any other conditions (remove metadata, host, level, ...). You might want to add your email address so mdadm can notify you of problems the moment they occur (provided you have a working sendmail).

Code:

DEVICE /dev/sd*
MAILADDR some@domain

ARRAY /dev/md0 UUID=d8b8b4e5:e47b2e45:2093cd36:f654020d
ARRAY /dev/md1 UUID=845b2454:42a319ef:6ec5238a:358c365b
ARRAY /dev/md2 UUID=23cf90d2:c05d720e:e72e178d:414a8128

Even without a config the array might still be assembled, but it might end up with a different number such as /dev/md127. Since mdadm told you the devices were busy, most likely it was assembled already. Check /proc/mdstat.

If you are using initrd you might have to update that as well after changing mdadm.conf

lazydog 04-22-2016 07:06 AM

You could also write a config file with the following:

Code:

mdadm --detail --scan >> /etc/mdadm/mdadm.conf


All times are GMT -5. The time now is 06:46 PM.