AoE Software RAID in Linux

When you create a raid drive do not add it to fstab
Modify /etc/sysconfig/mdadm: BOOT_MD_USE_MDADM_CONFIG=no
Modify the /etc/init.d/aoe script to have the following:
Do not autostart services that require the aoe mirror.  We will start them in the aoe init script

Under "start" after the aoe device has been discovered sleep 3-10 and then run:

mdadm -A /dev/md0 /dev/etherd/e[4-5].0
mount /dev/md0 /srv
rcapache2 start
rcvstfpd start

Under "stop" before the aoe is disconnected
rcapache2 stop
rcvsftpd stop
umount /dev/md0
mdadm -S /dev/md0


Once you have created the raid device do not mount it or reboot the server until the raid build has completed.  You can do this by running:

cat /proc/mdstat

Also, do not enable the mdadm init script as it will try and mount the md device before aoe creates it.  You may be able to manually start it in the aoe script but I haven't verified that it actually works.

Leave a Reply