I'm migrating my old Arch Linux system to Ubuntu Xenial and I ran into a problem with my RAID devices.
The RAID-1 devices are described as following:
iliv@sega:~$ grep ARRAY /etc/mdadm/mdadm.conf ARRAY /dev/md0 metadata=1.2 name=sega:0 UUID=c4cf4a52:6daa94c8:6d88a2fa:8f604199 ARRAY /dev/md1 metadata=1.2 name=sega:1 UUID=f7f0d240:f9fb5369:bdfe8219:325d8184
There are corresponding records in /etc/fstab:
/dev/md0 /mnt/RAIDVault-BACKUP ext4 defaults 0 0 /dev/md1 /mnt/RAIDVault ext4 defaults 0 0
What happens is that if these two lines are in /etc/fstab when Xenial is booting it apparently ignores mdadm.conf, assigns my devices /dev/md126 and /dev/md127 device names, fails to mount them obviously because there's nothing in /etc/fstab explaining what to do about /dev/md126 and /dev/md127 and eventually drops me into emergency shell.
In the emergency shell I can see that my devices are in "auto-read-only" mode, assembled and healthy.
Now, if I comment out RAID records in /etc/fstab the system boots up just fine, again assigning /dev/md126 and /dev/md127 to RAID devices. Most interestingly, if immediately after the system has started up I disconnect and reconnect my RAID devices the get assembled as /dev/md0 and /dev/md1 as they should have and always been. I can then uncomment /etc/fstab entries and mount them as usual and everything is fine.
So, what is going on here and how can I get "what part of Xenial is this??" to honor mdadm.conf which it seemingly does not?