You are not logged in.

#1 2021-09-29 10:24:21

leniviy
Member
Registered: 2009-05-23
Posts: 177

If md device fails in initramfs it cannot assemble RAID later

Hi.
I created a boot partition on soft RAID1 and a root partition on soft RAID5

I only added to mkinitcpio.conf: MODULES=(md_mod raid456)
because the boot partition is not needed during boot.

However, the missing module raid1 causes during initramfs:

md: personality for level 1 is not loaded!

and leaves a faulty /dev/md127 md device. It prevents the assembly at the later stage, when the raid1 module becomes available. So to assemble it I have to stop it first:

mdadm --stop /dev/md127
mdadm --assemble --scan

Is adding raid1 to mkinitcpio.conf the only solution? Or can I somehow make mdraid ignore this array in initramfs?

For instance, use --homehost=noautoassembly and then add this array explicitly to /etc/mdadm.conf

Last edited by leniviy (2021-09-29 10:33:46)


Arch 64, xfce4

Offline

#2 2021-09-29 10:52:09

frostschutz
Member
Registered: 2013-11-15
Posts: 1,409

Re: If md device fails in initramfs it cannot assemble RAID later

Yeah, it's not really supported by initcpio's mdadm_udev hook. It just uses the /etc/mdadm.conf, not an alternative version just for initramfs. So it does not differentiate initramfs vs. booted system. ((There is no mdadm.initramfs like crypttab.initramfs for sd-encrypt hook))

So you'd have to go out of your way to provide a custom mdadm.conf everytime you run mkinitcpio (and then hope the udev rules run a 2nd time?). Or just customize the hook altogether.

Is it worth it, though? What's the issue with assembling the raid1 early?

Last edited by frostschutz (2021-09-29 10:55:39)

Offline

Board footer

Powered by FluxBB