Updating ASMLIB Driver Using “update-driver”

Posted in: Technical Track

It is a controversial question whether to use  ASMLIB for managing disks for a 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 kernel version.
We know that the ASMLIB driver is kernel dependent and has to be updated to match the kernel version. We have to go to the Oracle site, find the proper version for ASMLIB driver, download it and install. But beginning oracleasm-support version 2.1.0 and higher we can use the embedded function “update-driver” which can help us to save time and simplify the process of updating ASMLIB driver.

How does it work? As example, we have installed Linux with kernel version 2.6.18-194.8.1.0.1.el5 x86_64 but ASMLIB driver is for the old kernel version 2.6.18-194.3.1.
As result we are getting 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"
[root@db1 ~]#

Instead 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%]
[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
[root@db1 var]#

Voila! We have an updated working driver.
And, we also have some options for this feature:
-d allows us only download the driver.
-n allows only determine what driver would be updated without taking any action.

Interested in working with Gleb? Schedule a tech call.

About the Author

Regarded by his peers as an Oracle guru, Gleb is known for being able to resolve any problem related to Oracle. He loves the satisfaction of troubleshooting, and his colleagues even say that seeking Gleb’s advice regarding an issue is more efficient than looking it up. Gleb enjoys the variety of challenges he faces while working at Pythian, rather than working on the same thing every day. His areas of speciality include Oracle RAC, Exadata, RMAN, SQL tuning, high availability, storage, performance tuning, and many more. When he’s not working, running, or cycling, Gleb can be found reading.

1 Comment. Leave new

Log Buffer #210, A Carnival of the Vanities for DBAs | The Pythian Blog
December 26, 2010 5:49 pm

[…] Otochkin discovered how to upgrade ASMLib the easy way. Gleb is my team mate and I just noticed that his previous post about Golden Gate has 130 (!) […]

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *