Updating ASMLIB Driver Using "update-driver"
It is a controversial question whether to use ASMLIB for managing disks for an ASM instance, but I don't want to start a new discussion about it in this post. I want to talk about updating ASMLIB after or before updating the kernel version.
Managing ASMLIB During Kernel Upgrades
We know that the ASMLIB driver is kernel-dependent and has to be updated to match the kernel version. Traditionally, we have to go to the Oracle site, find the proper version for the ASMLIB driver, download it, and install it manually.
The Challenge of Kernel Dependencies
However, beginning with oracleasm-support version 2.1.0 and higher, we can use the embedded function "update-driver", which can help us save time and simplify the process of updating the ASMLIB driver.
Identifying the Driver Mismatch
How does it work? As an example, we have installed Linux with kernel version 2.6.18-194.8.1.0.1.el5 x86_64, but the ASMLIB driver is for the old kernel version 2.6.18-194.3.1. As a result, we get an error trying to start ASMLIB:
[root@db1 ~]# /usr/sbin/oracleasm init Creating /dev/oracleasm mount point: /dev/oracleasm Loading module "oracleasm": failed Unable to load module "oracleasm"
Streamlining Updates with update-driver
Instead of searching, downloading, and installing the new driver, you can just run oracleasm update-driver and automatically get the updated version for the driver.
[root@db1 ~]# /usr/sbin/oracleasm update-driver Kernel: 2.6.18-194.8.1.0.1.el5 x86_64 Driver name: oracleasm-2.6.18-194.8.1.0.1.el5 Fetching Obsoletes list for channel: el5_x86_64_latest... ######################################## Fetching rpm headers... ######################################## Name Version Rel ---------------------------------------------------------- oracleasm-2.6.18-194.8.1.0.1.el5 2.0.5 1.el5 x86_64 Testing package set / solving RPM inter-dependencies... ######################################## oracleasm-2.6.18-194.8.1.0. ########################## Done. Preparing ########################################### [100%] Installing... 1:oracleasm-2.6.18-194.8.########################################### [100%]
Initialization and Verification
Voila! We have an updated working driver. Now we can proceed with initialization and verify the disk scanning:
[root@db1 ~]# /usr/sbin/oracleasm init Loading module "oracleasm": oracleasm Mounting ASMlib driver filesystem: /dev/oracleasm [root@db1 var]# /etc/init.d/oracleasm start Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ] [root@db1 var]# /etc/init.d/oracleasm listdisks DATADISK1
Advanced Command Options
We also have some useful options for this feature:
- -d: Allows us to only download the driver without installing.
- -n: Allows us to determine what driver would be updated without taking any action.
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.

Database Upgrade Fails With “unexpected error in validate_credentials”
Custom fix required when using latest JDK with Oracle E-Business Suite R12.1.3
A (BIG) Trick Listing Windows updates using PowerShell
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.