/dev/md0 RAID missing after reboot

I'm not sure if this is a bug in the way configuration files work or what but I solved it and wanted to make a note of this. On a new install of v24 for a buddy I created a /dev/md0 RAID and everything looked fine but after a reboot it was gone and it would show as not present under the mount points. I tried to scan and it would say incorrect UUIDs on the drives. I created it again and the same thing happened after reboot so I compared it to my setup where I have v23 installed and what I noticed was that on mine /etc/config/mdadm did not exist but /etc/mdadm.conf existed so back on the new box with v24 I deleted /etc/config/mdadm and created /etc/mdadm.conf and after a reboot all is well.

Write your own start script, one from openwrt uses own native config.

No need to. As I stated what I did resolved the issue. After reboot it is present & automatically mounted.

see this

Did you resolve this on your end, xiaohei? If not reproducing what I did should probably solve it. Delete /etc/config/mdadm & create /etc/mdadm.conf. The file should look like this but obviously replace your hostname the RAID UUID & disks or partitions used. ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=Hostname:0 UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX devices=/dev/sda1,/dev/sdb1

Replace the UUID value in /etc/config/mdadm with the value of /dev/mdx.