No drives detected by new kernel initramfs. It's a mtp3sas problem; need to reduce the mpt3sas.max_queue_depth: How?

Little bit of background mpt2sas and mpt3sas were merged some time ago, however some mpt2sas cards are by default not handled correctly by mpt3sas. I have one such card. (An LSI SAS2116 PCI-Express FusionMPT SAS-2)

Using Fedora 32, I have two kernels in the grub 2 menu:

The 5.7 kernel boots just fine. When I boot to the 5.11 kernel no drives are detected by the initramfs because the mpt3sas kernel module fails to correctly allocate memory for my SAS card that I’m using. After giving the root password for maintenance I can see the errors using “journalctl”:

mpt2sas_cm0: reply_pool: dma_pool_alloc failed
mpt2sas_cm0: failure at drivers/scsi/mpt3sas/mtp3sas_scsih.c:12013/scsih_probe()!

According to this kernal bug report the solution is to reduce the mpt3sas.max_queue_depth from the large default value of 32455 to something much smaller like 10000.

I’m not familiar with how Fedora handles the Kernel: DNF and dracut are strange to me. I feel totally lost. How do I modify the mpt3sas.max_queue_depth?

I’ve learned a little about using dracut to update the initramfs from this Fedora Magazine article

I’ve learned a little about manually upgrading the kernel and grub2 parameters from this fedora doc Although I think that article goes much further that I need to go; it’s helpful, but it’s meant to help accomplish something completely different.

Do I need to make the change in a config file (Of some kind?) for the initramfs and remake the initramfs using dracut? Can I do that from within the functioning kernel 5.7, or do I need to do that from within the emergency shell?

Do I need to add mpt3sas.max_queue_depth=10000 as a grub2 command line parameter? Do I just modify /etc/default/grub and then run " grub2-mkconfig -o /boot/grub2/grub.cfg" - [I don’t know what that modification would look like… an example would be really helpful.]

Do I need to use DNF to somehow modify and rebuild the kernel. I have built many custom kernels and several initramfs before; but never with a distribution like Fedora. So far very confused by how it’s done in Fedora.

I found where the kernel module is:

Maybe I could use menuconfig to find and modify this parameter and then use DNF and dracut to rebuild both the kernel and the initramfs?

This problem is probably the same problem referenced in this ask.fedoraproject post:

Adaptec 71605H HBA Card (pm8001 driver) causes system hang when drive attached with kernel >= 5.13.16-200.fc34.x86_64

I’m very tired, I’m proud that I got this far, but I can’t think straight any more. Please if you have any idea which direction I need to do with this problem I’d really appreciate any help.

Thank you!

  • Josiah

EDIT: I had to remove links because I’m a new user…

That would be one option. Personally, I think the better way to do it would be to create a /etc/modprobe.d/mpt3sas.conf file with the following contents.

options mpt3sas max_queue_depth=10000

You would then need to rebuild the initramfs for your 5.11.22-100.fc32.x86_64 kernel with the following command.

dracut -f /boot/initramfs-5.11.22-100.fc32.x86_64.img 5.11.22-100.fc32.x86_64

Once the initramfs is rebuilt, you should be able to verify that your custom mpt3sas.conf file was included by running the following command.

lsinitrd /boot/initramfs-5.11.22-100.fc32.x86_64.img | grep mpt3sas.conf

* I’m guessing a bit on the path to the initramfs. My PC is configured with a different bootloader so I cannot use it as a reference.

1 Like

I think a more stable option would be to update. Fedora 32 has been EOL for way more than a year and upgrading to a newer version will likely fix the problem since that is why software is continually being improved. Fedora 36 has been out for over 4 months now and soon we will see 37.

Thank you so much! That was exactly the help I needed.

I’m not sure how to “collaborate in a respectful and constructive manner” considering your rude and condescending advice to ‘just upgrade’.

My server is running on fairly old hardware and it’s already causing me problems. I picked Fedora 32 because it’s the only distribution i could find that I was able to be installed due to a very garbage graphics chip from HP.

I’m replying because i’m an idiot and after fixing the problem with the above extremely helpful advice I took your advice and tried to upgrade. Now nothing works! I can’t even get the machine to reboot or shut down with ctrl-alt-delete. No mouse input no keyboard input no GUI nothing.

‘Just upgrade’ is rude, dismissive, doesn’t help, and can REALLY HURT! Please don’t be that guy.