# Kmod-megaraid\_sas driver and kernels on Rocky 8.7

**URL:** <https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 20, 2023, 3:24pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649 "2023-04-20T15:24:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![drescherjm](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@drescherjm](https://forums.rockylinux.org/u/drescherjm)\
**Post date:** [April 20, 2023, 3:24pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/1 "2023-04-20T15:24:01Z")

</div>

I am trying to understand the proper usage of the megaraid driver.

I see that the megaraid driver is in the elrepo  
[https://rhel.pkgs.org/8/elrepo-x86\_64/kmod-megaraid\_sas-07.719.03.00-2.el8\_7.elrepo.x86\_64.rpm.html](https://rhel.pkgs.org/8/elrepo-x86_64/kmod-megaraid_sas-07.719.03.00-2.el8_7.elrepo.x86_64.rpm.html)

however it installs in kernel 4.18.0-425.10.1.el8\_7.x86\_64

> /etc/depmod.d/kmod-megaraid\_sas.conf  
> /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/  
> /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/extra/  
> /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/extra/megaraid\_sas/megaraid\_sas.ko  
> /usr/share/doc/kmod-megaraid\_sas-07.719.03.00/GPL-v2.0.txt  
> /usr/share/doc/kmod-megaraid\_sas-07.719.03.00/greylist.txt

I see the most recent kernel is kernel-core-4.18.0-425.19.2.el8\_7.x86\_64  
[https://rockylinux.pkgs.org/8/rockylinux-baseos-x86\_64/kernel-core-4.18.0-425.19.2.el8\_7.x86\_64.rpm.html](https://rockylinux.pkgs.org/8/rockylinux-baseos-x86_64/kernel-core-4.18.0-425.19.2.el8_7.x86_64.rpm.html)

If I install the megaraid driver and try to boot into this kernel it can’t find my raid1 OS drive that is on a megaraid controller on the motherboard and so it drops into the dracut# rescue shell.

If instead I use linux-lt kernel with the megaraid driver as part of the kernel it boots fine.

---

<div class="post-metadata">

**Author:** ![toracat](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/toracat/32/68_2.png) [@toracat](https://forums.rockylinux.org/u/toracat)\
**Post date:** [April 20, 2023, 8:11pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/2 "2023-04-20T20:11:35Z")

</div>

Can you show us the output from:

$ find /lib/modules -name megaraid\_sas.ko

$ lspci -nn (pick up the line related to the controller)

---

<div class="post-metadata">

**Author:** ![drescherjm](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@drescherjm](https://forums.rockylinux.org/u/drescherjm)\
**Post date:** [April 20, 2023, 9:00pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/3 "2023-04-20T21:00:01Z")

</div>

There are currently 2 MegaRAID controllers. The first I believe is a SAS2 card with external ports. The second is the card that contains the boot raid.

> root@datastore6 ~ $ lspci -nn | grep Mega  
> 01:00.0 RAID bus controller [0104]: Broadcom / LSI MegaRAID SAS 2208 [Thunderbolt] [1000:005b] (rev 05)  
> 04:00.0 RAID bus controller [0104]: Broadcom / LSI MegaRAID SAS 1078 [1000:0060] (rev 04)

> root@datastore6 ~ $ find /lib/modules -name megaraid\_sas.ko  
> /lib/modules/4.18.0-425.19.2.el8\_7.x86\_64/weak-updates/megaraid\_sas/megaraid\_sas.ko  
> /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/extra/megaraid\_sas/megaraid\_sas.ko

Oddly the weak-updates folder has todays date. I spent many hours yesterday working on the non boot situation.

> root@datastore6 ~ $ ls -al /lib/modules/4.18.0-425.19.2.el8\_7.x86\_64/weak-updates  
> total 4  
> drwxr-xr-x. 4 root root 43 Apr 20 10:15 .  
> drwxr-xr-x. 6 root root 4096 Apr 20 16:47 …  
> drwxr-xr-x. 4 root root 28 Apr 20 10:15 kmod-kvdo  
> drwxr-xr-x. 2 root root 29 Apr 20 10:15 megaraid\_sas

My guess this was somehow added today with a different install. I this today:

> dnf groupinstall “Server with GUI”

The date and time of the system are correct.

> root@datastore6 ~ $ timedatectl  
> Local time: Thu 2023-04-20 16:55:02 EDT  
> Universal time: Thu 2023-04-20 20:55:02 UTC  
> RTC time: Thu 2023-04-20 20:55:02  
> Time zone: America/New\_York (EDT, -0400)  
> System clock synchronized: yes  
> NTP service: active  
> RTC in local TZ: no

I can not reboot to test the weak-updates at the moment. I am working from home.

---

<div class="post-metadata">

**Author:** ![toracat](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/toracat/32/68_2.png) [@toracat](https://forums.rockylinux.org/u/toracat)\
**Post date:** [April 20, 2023, 9:27pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/4 "2023-04-20T21:27:15Z")

</div>

First, I see that both devices [1000:005b] and [1000:0060] are supported by the kmod-megaraid\_sas package. You can see the aliases by running:

```auto
$ modinfo megaraid_sas

```

Or by looking up the device IDs page [1].

Second, the .ko file in the extra directory was installed when you installed the kmod package. Then when you installed a newer kernel, the one in the weak-updates was created as a symbolic link, thanks to the kABI-tracking nature [2] of the kmod. This is better seen if you use a ‘ls -l’ command like so:

```auto
$ ls -l `find /lib/modules -name megaraid_sas.ko`
-rw-r--r--. 1 root root 331697 Feb 12 05:56 /lib/modules/4.18.0-425.10.1.el8_7.x86_64/extra/megaraid_sas/megaraid_sas.ko
lrwxrwxrwx. 1 root root 76 Apr 20 17:15 /lib/modules/4.18.0-425.13.1.el8_7.x86_64/weak-updates/megaraid_sas/megaraid_sas.ko -> /lib/modules/4.18.0-425.10.1.el8_7.x86_64/extra/megaraid_sas/megaraid_sas.ko
lrwxrwxrwx. 1 root root 76 Apr 20 17:15 /lib/modules/4.18.0-425.19.2.el8_7.x86_64/weak-updates/megaraid_sas/megaraid_sas.ko -> /lib/modules/4.18.0-425.10.1.el8_7.x86_64/extra/megaraid_sas/megaraid_sas.ko

```

[1] [ELRepo | DeviceIDs](https://elrepo.org/tiki/DeviceIDs)  
[2] [ELRepo | FAQ](https://elrepo.org/tiki/FAQ)

---

<div class="post-metadata">

**Author:** ![drescherjm](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@drescherjm](https://forums.rockylinux.org/u/drescherjm)\
**Post date:** [April 20, 2023, 10:08pm UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/5 "2023-04-20T22:08:51Z")

</div>

> root@datastore6 ~ $ ls -l `find /lib/modules -name megaraid_sas.ko`  
> -rw-r–r–. 1 root root 331697 Feb 12 05:56 /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/extra/megaraid\_sas/megaraid\_sas.ko  
> lrwxrwxrwx. 1 root root 76 Apr 20 10:15 /lib/modules/4.18.0-425.19.2.el8\_7.x86\_64/weak-updates/megaraid\_sas/megaraid\_sas.ko → /lib/modules/4.18.0-425.10.1.el8\_7.x86\_64/extra/megaraid\_sas/megaraid\_sas.ko

Thanks a lot. I think I understand how it’s supposed to work now.

For the modinfo I am currently running the kernel-lt (since it had the megaraid already without the separate package) so it shows this:

> root@datastore6 ~ $ modinfo megaraid\_sas  
> filename: /lib/modules/5.4.240-1.el8.elrepo.x86\_64/kernel/drivers/scsi/megaraid/megaraid\_sas.ko.xz  
> description: Broadcom MegaRAID SAS Driver  
> author: [megaraidlinux.pdl@broadcom.com](mailto:megaraidlinux.pdl@broadcom.com)  
> version: 07.710.50.00-rc1  
> license: GPL  
> srcversion: 33FF3DF0B51178539DF6B80  
> alias: pci:v00001000d000010E7sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E4sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E3sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E0sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E6sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E5sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E2sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000010E1sv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000001Csv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000001Bsv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000017sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000016sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000015sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000014sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000053sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000052sv_sd_bc_sc_i\*  
> alias: pci:v00001000d000000CFsv_sd_bc_sc_i\*  
> alias: pci:v00001000d000000CEsv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000005Fsv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000005Dsv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000002Fsv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000005Bsv_sd_bc_sc_i\*  
> alias: pci:v00001028d00000015sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000413sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000071sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000073sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000079sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000078sv_sd_bc_sc_i\*  
> alias: pci:v00001000d0000007Csv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000060sv_sd_bc_sc_i\*  
> alias: pci:v00001000d00000411sv_sd_bc_sc_i\*  
> depends:  
> retpoline: Y  
> intree: Y  
> name: megaraid\_sas  
> vermagic: 5.4.240-1.el8.elrepo.x86\_64 SMP mod\_unload modversions  
> parm: lb\_pending\_cmds:Change raid-1 load balancing outstanding threshold. Valid Values are 1-128. Default: 4 (int)  
> parm: max\_sectors:Maximum number of sectors per IO command (int)  
> parm: msix\_disable:Disable MSI-X interrupt handling. Default: 0 (int)  
> parm: msix\_vectors:MSI-X max vector count. Default: Set by FW (int)  
> parm: allow\_vf\_ioctls:Allow ioctls in SR-IOV VF mode. Default: 0 (int)  
> parm: throttlequeuedepth:Adapter queue depth when throttled due to I/O timeout. Default: 16 (int)  
> parm: resetwaittime:Wait time in (1-180s) after I/O timeout before resetting adapter. Default: 180s (int)  
> parm: smp\_affinity\_enable:SMP affinity feature enable/disable Default: enable(1) (int)  
> parm: rdpq\_enable:Allocate reply queue in chunks for large queue depth enable/disable Default: enable(1) (int)  
> parm: dual\_qdepth\_disable:Disable dual queue depth feature. Default: 0 (int)  
> parm: scmd\_timeout:scsi command timeout (10-90s), default 90s. See megasas\_reset\_timer. (int)  
> parm: perf\_mode:Performance mode (only for Aero adapters), options:  
> 0 - balanced: High iops and low latency queues are allocated &  
> interrupt coalescing is enabled only on high iops queues  
> 1 - iops: High iops queues are not allocated &  
> interrupt coalescing is enabled on all queues  
> 2 - latency: High iops queues are not allocated &  
> interrupt coalescing is disabled on all queues  
> default mode is ‘balanced’ (int)  
> parm: event\_log\_level:Asynchronous event logging level- range is: -2(CLASS\_DEBUG) to 4(CLASS\_DEAD), Default: 2(CLASS\_CRITICAL) (int)  
> parm: enable\_sdev\_max\_qd:Enable sdev max qd as can\_queue. Default: 0 (int)

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:17am UTC](https://forums.rockylinux.org/t/kmod-megaraid-sas-driver-and-kernels-on-rocky-8-7/9649/6 "2023-08-25T03:17:12Z")

</div>


