Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 5 down vote accepted

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 user1@dom1.com, user2@dom2.com
share|improve this answer
    
does any problem occur if this file does not exist? –  Hojat Taheri Jun 24 '13 at 15:02
1  
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 –  Userpassword Nov 18 at 10:46

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.