Web lists-archives.com

Re: mdadm started before disks are detected




On 25.03.2019 0:50, Mimiko wrote:
hello.

I came across a problem when booting. In the server is installed 4 disks connected to raid controller and 2 disks connected to motherboard sata interfaces. During booting disks connected to raid controller are detected before md raid assembling process, while the 2 disks connected to motherboard sata interfaces are detected after md raid assembly, so the raid made of this 2 disks are not detected and assembled during boot.

From log is seen that sdd and sde a detected after mdamd is started to assembly the raids.

How can I force those 2 disks to be detected before mdadm?

This is the log:
Have you tried to use "/etc/modprobe.d/*.conf"-way to assign module dependency for mdadm?
$ sudo modprobe -nD md-mod
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/md/md-mod.ko start_ro=1

$ echo "softdep md_mod pre: libata libahci scsi_mod mpt3sas" | sudo tee /etc/modprobe.d/md-mod.conf

$ sudo modprobe -nD md-mod
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/scsi_mod.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/ata/libata.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/scsi_mod.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/ata/libata.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/ata/libahci.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/scsi_mod.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/scsi_mod.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/scsi_transport_sas.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/raid_class.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko
insmod /lib/modules/4.15.0-0.bpo.2-amd64/kernel/drivers/md/md-mod.ko start_ro=1

You should get the idea. I think for your system you will need to change module "mpt3sas" to "mptsas" and/or "mptbase".
After adding config file you will have to also update initramfs with:
$ sudo update-initramfs -u

I didn't tested this suggestion and you might break your system, so be prepared to boot from livecd to rollback changes, but because your root filesystem is on other disks I think it should be ok and hopefully your system will boot normally.
There is also a possibility that "softdep" feature of kmod is not yet implemented on your old system and this suggestion won't work.

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀