mdadm Boot Error, incrementally starting raid array Ubuntu SErver 14.04

Solution 1:

Had this as well. In my environment: 2x SAS HDDs configured as raid10.

The problem was that mpt2sas.ko was not loaded, and thus mdadm couldn't see any disk. This in turn was caused by a packaging error: when apt was removing unneeded wlan packages like crda, it also auto-removed the linux-image-extra-$VERSION package, which actually owns mpt2sas.ko.

To ensure, that the module gets loaded before the raid modules, I also did a

echo mpt2sas >>/etc/initramfs-tools/modules

Solution 2:

On my machine (Ubuntu trusty) this was caused by having a newer (xenial 4.4.0 -series) kernel installed under /boot and being used by default.

I solved this issue by booting an older kernel version and then running:

update-initramfs -u
update-grub

Solution 3:

finally "fixed" the error. Short Version: The Transcend SSD (TS128GSSD25S-M) in combination with the ASRock B85M Pro4 Mainboard caused the Error. After Cloneing the System with clonezilla to a Samsung 840 Evo i booted now 30 times without problems.

in deep Problem report: But why is mdadm showing up with totaly unrelated raid Array Problems? : Well while creating the Raid Array (or maybe by default? i dont know exactly) mdadm put's a raid initialization script into the initramfs. This scrip check if the rootfs is mounted, if the rootfs (on my SSD) isn't mounted it jumps to function mountroot_fail

message "Incrementally starting RAID arrays..."
if mdadm --incremental --run --scan; then
message "Incrementally started RAID arrays."
return 0

This leads to the confusing output. After Removing those scripts from initramfs i bumped into the real Problem:

Gave up wiating for root device. Common problems:

  • Boot args (cat /proc/cmdline)
    • check rootdelay= (did the system wait long enough?)
    • check root= (did the system wait for the right device?)
  • missing modules (cat /proc/modules; ls /dev)

    ALERT! /dev/disk/by-uuid/01234567-89ab-cdef-0123-456789abcdef does not exist. Dropping to a shell!
    BusyBox v1.13.3 (Ubuntu 1:1.13.3-1ubuntu11) built-in shell (ash)
    Enter 'help' for a list of built-in commands.
    (initramfs) 
    

As the error isn't persistent i thought to give a different SSD a try, and BAM working.

Solution 4:

For me the solution were missing "dm-mod", "dm-snapshot" and "dm-mirror" entries in /etc/initramfs-tools/modules. I took me quite some time to fight this issue as the error messages were talking about "mdadm" and raid - so how should one guess that lvm is the issue.

My setup: sda -> sda1 (0xfd linux raid autodetect, 500MB), sda2 (0xfd linux raid autodetect, 250G) same for sdb

  • sda1 + sdb1 --> /dev/md0 (mdadm) "/boot"
  • sda2 + sdb2 --> /dev/md1 (mdadm) --> lvm volume for "swap" and "/"

I didn't put "/boot" into the LVM to avoid hazzle with grub/lvm in the first place. But it looks like I just have fallen into another tarpit of grub/lvm/raid :(

I guess the issue was that grub properly mounted the initramfs and then it couldn't mount / (because of missing lvm modules) it tried to initialize some raid devices.

The incrementally starting raid arrays is somewhat misleading as it can be any missing module which inhibits / from getting mounted. Also see above post about missing mpt2sas module.

Additionally I tought the dm_ modules were not necessary as they are for dmraid - which is wrong: They are also necessary for LVM. In my situation I did a switch from dmraid back to the good ol' mdadm because dmraid (fakeraid) caused problems (A directory just disappeared).

And last but not least I wondered that I can add dm-mod, dm-snapshot anddm-mirrorto/etc/modulesand/etc/initramfs-tools/modulesaltough there are not really and.ko` files by that name. Must be some kind of module aliases.