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:
5.7.7-200.fc32.x86_64
5.11.22-100.fc32.x86_64

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 DEFINITLY_NOT_AN_HTTPS_LINK-fedoramagazine.org/initramfs-dracut-and-the-dracut-emergency-shell/

Iā€™ve learned a little about manually upgrading the kernel and grub2 parameters from this fedora doc DEFINITLY_NOT_AN_HTTPS_LINK-docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/kernel-module-driver-configuration/Manually_Upgrading_the_Kernel/ 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:
/usr/lib/modules/5.11.22-100.fc32.x86_64/kernel/drivers/scsi/mpt3sas/mpt3sas.ko.xz

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.