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?

1 Answer 1


My understanding is that the reason this is happening is because my software RAID devices were not originally created on this system. As a result initramfs image knows nothing about them and apparently attempts to assign some kind of default device names, /dev/md126 and /dev/md127.

To fix this problem all I had to do was run:

sudo update-initramfs -k all -u
  • 1
    By default the initrd does not contain mdadm support so it could not assemblr the devices, so they could not be mounted from fstab. later in the boot process they were detected. by updating your initrd with all modules it now assembles the raid devices before the fstab mount.
    – Uwe Burger
    Sep 4, 2016 at 2:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .