more than one driver installed, which is active?

Latest response

Server HP DL360e Gen8 with RHEL 6.5


This is a common question for me, I just want to know if it is working or it is dangerous.
When I get a new driver from the HP site, I just used to install it like that : rpm -ivh ******.rpm
In my case, I can see with the option -qa and -qi both versions of the same driver.

How can I find out which driver version is active now for that hardware?
Shall I uninstall first the older driver before installing the newest?

[root@123456 ~]# rpm -qa kmod-hpvsa
[root@123456 ~]# rpm -qi kmod-hpvsa
Name : kmod-hpvsa Relocations: (not relocatable)
Version : 1.2.6 Vendor: Hewlett-Packard Company
Release : 26.rhel6u3 Build Date: Die 16 Jul 2013 21:16:28 CEST
Install Date: Mit 05 Mär 2014 17:51:35 CET Build Host:
Group : System Environment/Kernel Source RPM: hpvsa-1.2.6-26.rhel6u3.src.rpm
Size : 2770371 License: HP
Signature : (none)
Packager : Hewlett-Packard Company
Summary : hpvsa kernel module(s) for rhel6u3 x86_64 (d877/s869/r8238)
Description :
This package provides the hpvsa kernel modules built for
the Linux kernel 2.6.32-279.el6.x86_64 for the x86_64
family of processors.
Name : kmod-hpvsa Relocations: (not relocatable)
Version : 1.2.8 Vendor: Hewlett-Packard Company
Release : 160.rhel6u5 Build Date: Sam 15 Feb 2014 00:02:33 CET
Install Date: Fre 23 Mai 2014 11:54:50 CEST Build Host:
Group : System Environment/Kernel Source RPM: hpvsa-1.2.8-160.rhel6u5.src.rpm
Size : 2807939 License: HP
Signature : (none)
Packager : Hewlett-Packard Company
Summary : hpvsa kernel module(s) for rhel6u5 x86_64 (d971/s1020/r10377)
Description :
This package provides the hpvsa kernel modules built for
the Linux kernel 2.6.32-431.el6.x86_64 for the x86_64
family of processors.

HP proprietary driver, source code not available.



It looks like you should be able to run:

rpm -ql kmod-hpvsa-1.2.6-26.rhel6u3.x86_64
rpm -ql kmod-hpvsa-1.2.8-160.rhel6u5.x86_64

To get a list of files within those RPMs. I expect one will have a driver in /lib/modules/2.6.32-279.el6.x86_64/ (RHEL63) and the other will have a driver in /lib/modules/2.6.32-431.el6.x86_64/ (RHEL65).

Booting into a given kernel will only load drivers within that kernel's tree, so you should not see the RHEL63 driver loaded on RHEL65.

However, if there is an in-kernel driver and a third-party driver, which one is used?

The tool which loads all drivers is modprobe. Which driver modprobe chooses to use is controlled by /lib/modules/$(uname -r)/modules.alias, which is generated by running depmod -a. I expect those RPMs run depmod as part of their post-install script.

modprobe will read modules.alias and whichever driver is listed last for a given PCI ID is the driver which will be used.

To give a simple example, say I have hardware with PCI ID 1234:5678 (visible with lspci -nn) and I have possible drivers called "supported.ko" and "thirdparty.ko", I will run something like:

grep 1234 /lib/modules/$(uname -r)/modules.alias
alias pci:v00001234d00005678sv*sd*bc*sc*i* supported
alias pci:v00001234d00005678sv*sd*bc*sc*i* thirdparty

You can see that whilst supported is in the list, thirdparty is last, so the thirdparty driver will be used.

thank you.
with the grep command I get this:

alias pci:v00001590d00000047sv00001590sd00000047bcsci* hpvsa
alias pci:v00001590d00000045sv00001590sd00000045bcsci* hpvsa
alias pci:v00008086d00001D04sv00001590sd00000048bcsci* hpvsa
alias pci:v00008086d00008C04sv00001590sd00000084bcsci* hpvsa
alias pci:v00008086d00008C06sv00001590sd00000084bcsci* hpvsa
alias pci:v00008086d00001C04sv00001590sd0000006Cbcsci* hpvsa

...for me is not clear enough which driver is used!

There's only one driver listed for all these PCI IDs, so the only driver present for [1590:0045] and [1590:0047] is this hpvsa driver.

yes but is it the older or the newest hpvsa driver? it is not readable for me.

When you boot into the RHEL 6.3 kernel, the kmod-hpvsa-1.2.6-26.rhel6u3.x86_64 driver is used.

When you boot into the RHEL 6.5 kernel, the kmod-hpvsa-1.2.8-160.rhel6u5.x86_64 driver is used.

sounds logical to me.
so I do not need to uninstall the kmod-hpvsa-1.2.6-26.rhel6u3.x86_64 driver??
because I did rpm -e kmod-hpvsa-1.2.6-26.rhel6u3.x86_64 already.

Now when you boot into the RHEL 6.3 kernel, there will be no driver for this device.

Hi Felix,
I would consider using yum to install your packages (even 3rd-party).

yum localinstall /root/kmod-hpvsa-1.2.6-26.rhel6u3.x86_64.rpm

Otherwise, I wonder if using rpm to update (rather than install) would minimize the issue.

rpm -Uvh kmod-hpvsa-1.2.6-26.rhel6u3.x86_64.rpm

I have one thing to add to Jaime's great explanation (I picked on the tg3 driver as an example)

[root@devstack ~]# lsmod | grep tg3
tg3                   161896  0 
ptp                     9614  2 tg3,igb
[root@devstack ~]# modinfo tg3 | grep -v ^alias
filename:       /lib/modules/2.6.32-431.17.1.el6.x86_64/kernel/drivers/net/tg3.ko
firmware:       tigon/tg3_tso5.bin
firmware:       tigon/tg3_tso.bin
firmware:       tigon/tg3.bin
version:        3.132
license:        GPL
description:    Broadcom Tigon3 ethernet driver
author:         David S. Miller ( and Jeff Garzik (
srcversion:     B6E1CFECD5B9723FA883A57
depends:        ptp
vermagic:       2.6.32-431.17.1.el6.x86_64 SMP mod_unload modversions 
parm:           tg3_debug:Tigon3 bitmapped debugging message enable value (int)

thank you too.

I will use this "rpm -Uvh".
But "lsmod | grep kmod-hpvsa-1.2.8-160.rhel6u5.x86_64" showed me nothing!

I have to apologize.. I thought I had responded to this before, but I jut realized I had not.

I would not recommend removing the old driver - the reason being is if.. you need to failback and boot to an older kernel it would need to be there (based on what Jaime had mentioned about each driver being specific to a kernel which was based on the "update" level u3 vs u5).

And I do recommend using yum. RPM is a great tool and yum just makes rpm better. Sorry to keep bringing it up ;-)

Also - I think you can just "guess" and run

modinfo hpvsa

to know which driver is currently loaded. The other steps are just more accurate in determining which driver is loaded for a specific device. But.. I am pretty certain at this point that hpvsa is the driver name.

Thank you for information. That was the point where I wasn't sure, how the system works when it has more than one but same driver.
I already uninstalled to few servers the older driver...I hope that one will not be needed in the future.

Generally not a Good Idea to remove kernel modules/drivers without also removing the kernel that is expecting to use them. If someone needs to boot the kernels you've removed driver dependencies from, it can result in breakage (or, at the very least, reduced or abnormal functionality).

Overall, it's better to either not remove the modules (or, in your case, "put them back") or do the full cleanup and remove the kernels that expect the presence of those modules. Side benefit of the latter is that you'll free up space in /boot.

Thanks. I am not such advanced in can I "put them back" ? Just like installing it? rpm -ivh driverfilename ?

No worries Felix - you have encountered a somewhat "advanced" situation - whereas there are multiple versions of the same package installed, and that is perfectly acceptable (another example is Oracle ASM for RHEL 5 - it is kernel specific as well).
To answer your question: yes, you should be able to run the rpm command you have listed. However.... you should try to determine what the rpm installation is going to do.

rpm -qp --scripts filename.rpm

[root@pdgllprhnsat01 ORACLE]# rpm -qp --scripts cvuqdisk-1.0.9-1.x86_64.rpm 
preinstall scriptlet (using /bin/sh):
# /usr/sbin/smartctl must exist
ls /usr/sbin/smartctl > /dev/null

if [[ $? != 0 ]]; then
 echo "/usr/sbin/smartctl not found." >&2
 exit 1
... *truncated*

You want to review to see what files are modified (grub.conf perhaps), etc... I assume since this is a RAID driver that it would actually end up rebuilding the kernel, initrd and vmlinuz for that particular kernel to include the driver - but, you will have to review the scripts to know for certain.

Hi Felix,

lsmod | grep kmod-hpvsa-1.2.8-160.rhel6u5.x86_64

this does not work, for you try to find the name of the rpm.
rpm -ql kmod-hpvsa-1.2.8-160.rhel6u5.x86_64
rpm -ql kmod-hpvsa-1.2.6-26.rhel6u3.x86_64
show you lists of files

Like Jamie as mentioned already.

Please show us the output of these commands.

Once these lists are known we can point out how to use lsmod to find the active driver.

Kind regards,

Jan Gerrit Kootstra

[root@123456 ~]# rpm -ql kmod-hpvsa-1.2.6-26.rhel6u3.x86_64

[root@123456 ~]# rpm -ql kmod-hpvsa-1.2.8-160.rhel6u5.x86_64