During the last two nights we had mysterious events on a server running Ubuntu Linux 12.04 LTS with a Linux mdadm software RAID10:

DeviceDisappeared /dev/md0
NewArray /dev/md127

Both messages appeared in the same second, on the same time as the logrotate cron action happened. Although the array is still named /dev/md0 in /etc/mdadm/mdadm.conf, it appears as /dev/md127 in the output of cat /proc/mdstat:

Personalities : [linear] [multipath] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md127 : active raid10 sdb1[0] sdg1[5] sdc1[1] sdh1[6] sdf1[4] sdd1[2] sdk1[9] sdj1[8] sde1[3] sdi1[7]
      9746600960 blocks 512K chunks 2 near-copies [10/10] [UUUUUUUUUU]

unused devices: <none>

Why is this so and how can I fix this?

  • This is a common problem, with a whole range of fun causes. A web search for md127 will give you a great many helpful ideas.
    – womble
    Sep 4, 2015 at 11:13
  • It doesn't matter much; you should never be referring to the device using /dev/md* anyway. Sep 4, 2015 at 11:13

1 Answer 1


I figured it out: The UUID in the file /etc/mdadm/mdadm.conf did not match the UUID of the actual software raid array in this server due to some "uncareful" sysadmin activity which happend three days ago. Editing the UUID in this file to the UUID displayed by (in my case, YMMV) the command:

mdadm --examine /dev/sdb1 

and recreating the initrd images using the command (see EDIT2021 below):

update-initramfs -u -k all

and a following reboot fixed the naming back to /dev/md0.
EDIT: @Michael Hamptons comment: The device name /dev/md0 mentioned in the ARRAY line in the configuration file /etc/mdadm/mdadm.conf might be possibly replaced by something like for example /dev/disk/by-label/DATA. But I've not tried this yet: The examples in the manual page of mdadm.conf use device names like /dev/md*. I'm not sure whether such a replacement is possible: The more abstract device names in /dev/disk/by-label/* or /dev/disk/by-uuid/* are created dynamically later on.

EDIT 2021: The above mentioned command:


is a script specific to Debian/Ubuntu derived flavors of Linux distributions. On RedHat derived distributions (Fedora, CentOS, etc...) it is possible to create a new initramfs file for the currently active kernel using the following command:

mkinitrd /boot/initramfs-`uname -r`.img `uname -r`
  • 1
    update-initramfs is the secret sauce missing in many other discussions on this same problem on other sites. Jul 19, 2019 at 6:48
  • I just logged in to say that, indeed, update-initramfs solved my problem. Exact same thing: raid in /dev/md0, everything seems to work, reboot and boom! Renamed to /dev/md127 god know why. But update-initramfs solved it.
    – nabla
    Dec 2, 2021 at 18:14

You must log in to answer this question.

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