Software raid startup broken
When using software raid on Alpine 2.4 and having udev installed, im
unable to make it start properly by init.
First of all udev has a script which will try to start it /lib/udev/rules.d/64-md-raid.rules, because udev is run before my raid module is loaded, the raid will be started as inactive.
I can prevent this behavior by adding an empty file /etc/udev/rules.d/64-md-raid.rules which prevents udev to start the array and have the default scripts jump in.
After doing the above I still run into another issue. The new way of handling raid devices are based on names. Linux raid will auto number md devices (starting from 127 and down) and should create a symlink to /dev/md/devicename to be access. After trying a few options, I am not able to have this symlink although mdadm outputs it has started it. mdadm.conf I used was
ARRAY /dev/md/stripe metadata=1.2 UUID=9dbff4d2:b343c7fe:4bca5b42:d2053de1 name=xen:stripe
I had to switch back the old naming like:
ARRAY /dev/md0 UUID=9dbff4d2:b343c7fe:4bca5b42:d2053de1
This starts the array as md0 again and init script work again.
(from redmine: issue id 1340, created on 2012-08-24, closed on 2013-11-06)