more than one driver installed, which is active?
Server HP DL360e Gen8 with RHEL 6.5
Hello
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
kmod-hpvsa-1.2.6-26.rhel6u3.x86_64
kmod-hpvsa-1.2.8-160.rhel6u5.x86_64
[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: rhel6u3e-s1.ldev.net
Group : System Environment/Kernel Source RPM: hpvsa-1.2.6-26.rhel6u3.src.rpm
Size : 2770371 License: HP
Signature : (none)
Packager : Hewlett-Packard Company
URL : http://www.hp.com/go/proliantlinux
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: rhel6u5e-s1.ldev.net
Group : System Environment/Kernel Source RPM: hpvsa-1.2.8-160.rhel6u5.src.rpm
Size : 2807939 License: HP
Signature : (none)
Packager : Hewlett-Packard Company
URL : http://www.hp.com/go/proliantlinux
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.
Thanks
Responses
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.
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 (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)
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)
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 ;-)
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.
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
fi
... *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
and
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
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
