You are not logged in.
Hey all,
today I wanted to reinstall Arch as a RAID 1 but when booting after the installation I'm getting this error:
waiting 10 seconds for device /dev/md0
waiting 10 seconds for device /dev/md0
waiting 10 seconds for device /dev/md0
After that I'm being dropped into an emergency shell. It turns out that the RAID gets mounted as /dev/md127 instead of /dev/md0 which I specified during the installation.
This is the content of my /etc/fstab:
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/md0
UUID=6d76faa2-1148-4d10-99e9-04befdf17977 / ext4 rw,relatime 0 1
# /dev/vda1
UUID=B9A9-9BE7 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2
And this is the config that was generated with ```mdadm --detail --scan >> /etc/mdadm/mdadm.conf``` during the installation:
ARRAY /dev/md0 metadata=1.2 UUID=e0c39c10:2ba6c262:ab3702e2:e6cfa2b41
When changing the boot entry from root=/dev/md0 to root=/dev/md127 the system also boots normally but I don't understand why its not being directly recognized as /dev/md0. Am I missing something?
Last edited by EinfxchFinn (2025-10-19 12:50:48)
Offline
/dev/md127 (and so on) is what mdadm uses when there is no mdadm.conf, or entries in mdadm.conf don't match, or hostname doesn't match.
The latter is unfortunately quite normal... you can check mdadm --examine which hostname is set for your array (probably hostname of livecd if you created the array there).
Try setting HOMEHOST <ignore> or HOMEHOST <none> or similar in mdadm.conf.
You can also --assemble --update --name x --homehost y to remove hostname from metadata altogether (with HOMEHOST <none>, or if you set a hostname longer than 32 characters, it will be empty since the field in metadata can only be 32 characters long)
Also make sure with lsinitcpio that the correct mdadm.conf is included in your initramfs (/etc/mdadm/mdadm.conf might conflict with /etc/mdadm.conf [edit: actually the mdadm_udev hook only adds /etc/mdadm.conf and ignores /etc/mdadm/* altogether).
Last edited by frostschutz (2025-10-19 12:28:37)
Online
>>>Also make sure with lsinitcpio that the correct mdadm.conf is included in your initramfs (/etc/mdadm/mdadm.conf might conflict with /etc/mdadm.conf).
That was exactly the issue. It had autogenerated /etc/mdadm.conf (probably from the install) and I put my stuff inside /etc/mdadm/mdadm.conf which was then completely ignored by the initramfs.
Thanks for your help ![]()
Offline
\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
another option i would prefer is instead of
root=/dev/md0rather
root=UUID=6d76faa2-1148-4d10-99e9-04befdf17977and have the kernel figure where that lives
btw: today it's discouraged to use /dev/... identifiers because the order is not fixed but can (and sometimes does) change
so just because your drives show up often in the order you expect them to it's not guaranteed and hence use unique identiefiers like UUID, PARTUUID and LABEL should be preferred
its a bit like dns: you don't care about the system you connect to as long as it serves the service you requested
Offline