I have installed centos 6 and setup a new RAID array with two disks. every thing is ok and I have partitioned the array but I don't see any /etc/mdadm.conf or /etc/mdadm/mdadm.conf files. I have rebooted my machine too but no luck!

Can you tell me what is my mistake? Is there a change in the location of the mdadm configuration files?


That file isn't typically included in the mdadm package.

$ rpm -ql mdadm | grep "mdadm.conf"

You can either use the sample one included or generate it your self. My file shows this in the header:

# mdadm.conf written out by anaconda

So it was likely built by some choices I must've made during installation, would be my guess. I've typically run this command to generate this file by hand as root:

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

Without the redirect to the /etc/mdadm.conf file this command will produce something similar to this:

$ mdadm --verbose --detail --scan 
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=0.90 UUID=48b4cedc:52404142:34d244f7:3b879f08

I then add the following line to the end of the file if I want to be notified via email if there's any issues:

MAILADDR user1@dom1.com, user2@dom2.com
  • does any problem occur if this file does not exist? – Hojat Taheri Jun 24 '13 at 15:02
  • 3
    The RAID should still function correctly: "When your RAID is correctly configured, the md driver is able to get everything it needs off the superblocks in the RAID components themselves. The mdadm.conf file is really just there to help guide it along when there might be some ambiguity." mdadm.conf empty... where is my config? – slm Jun 24 '13 at 15:06
  • Check this one: novell.com/support/kb/doc.php?id=7001034 On bottom example with cron check – user956584 Nov 18 '14 at 10:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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