[CentOS] CentOS 4 Software Raid1 questions

Fri Apr 29 18:15:13 UTC 2005
Aleksandar Milivojevic <amilivojevic at pbl.ca>

Lee Parmeter wrote:

> The next problem I had was that the raid did not
> automaticly start when the server booted so I got an fstab
> error for /dev/md0. The solution turned out to be creating
> a mdadm.conf file. Once the config file had DEVICE and
> ARRAY defines for the raid, I could both manually restart
> the raid and it would auto startup at boot. So the /dev/md0
> lines in fstab work.
> I did not find any information on the web concerning the
> requirement of the mdadm.conf file and the relationship to
> the auto start of the raid. I had to work a bit in the dark
> to get it to work as I thought it should. 

I don't think you need mdadm.conf file.

Check with fdisk that partitions used for RAID devices are set to type 
"Linux raid autodetect".  This is type "fd".  If not, use "t" command in 
fdisk to set correct partition type, and than "w" to write out partition 
table.  Linux kernel will automatically detect and configure only RAID 
device that are on the partitions tagged as "fd" (Linux raid autodetect).

Another thing to check is initrd-kernel-version.img file in /boot 
directory.  You might need to rebuild it (in some cases).  Replace 
"kernel-version" string with your actual kernel version:

# mkinitrd initrd-kernel-version.img kernel-version

If you are using LILO, you need to run /sbin/lilo every time after you 
modify initrd image file.  If you are using Grub no additional steps are 

If raid device driver doesn't load even after you built new initrd 
image, it might be that mkinitrd hasn't included it for whatever reason. 
  You can force mkinitrd to include driver with "--with-module=raid1" 
(for RAID1 devices).

Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7