8

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?

1 Answer 1

9

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

$ rpm -ql mdadm | grep "mdadm.conf"
/usr/share/doc/mdadm-2.6.9/mdadm.conf-example
/usr/share/man/man5/mdadm.conf.5.gz

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
   devices=/dev/sda1,/dev/sdb1

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 [email protected], [email protected]
3
  • does any problem occur if this file does not exist? Jun 24, 2013 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, 2013 at 15:06
  • Check this one: novell.com/support/kb/doc.php?id=7001034 On bottom example with cron check
    – user956584
    Nov 18, 2014 at 10:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .