Monday, March 18, 2013

Upgrading ASMLIB

To upgrade ASMLIB, the system administrator can take the following steps,

Generally system administrator will do this upgrade, because DBA's will not be having any control over to perform action as a root user, so this needs to be done with the help of system admin.

The reason why I am publishing this information here is every DBA should know how ASMLIB is getting upgraded and whats happening behind the scene and to understand which circumstances this API should get upgraded.

Kindly note that this activity is just a software upgrade and no disk labels are manipulated  Also this is a local node upgrade, so in an RAC environment each node should be upgraded individually

How to do:
  1. Shutdown the ASM
  2. Execute /etc/init.d/oracleasm stop
  3. Execute rpm -Uvh oracleasm-*.rpm
  4. Execute /etc/init.d/oracleasm start
  5. Startup ASM
Whats Happening during the upgrade:

Actual upgrade happening during the 3rd step, rpm -U will perform the upgrade of all oracleasm* rpm's. Once its done you can start the service and ASM instance as well.

When to do :

All oracleasm and its dependent rpm should get upgraded to the new version, when we perform Operating system upgrade.

For example you configured ASMLIB when your O/S was in Linux 5.5 and if you go for Linux 5.8 then after the O/S upgrade sys admin should also upgrade all ASMLIB rpms to match the current O/S version otherwise you will not be able to even startup the service.

I faced the same situation couple of months back. Actually we configured ASM on one host later that host was upgraded to Linux version 5.8 once the O/S upgrade has been done system admin failed to upgrade the ASMLIB rpms, and he asked me to start the service and while starting up the service I faced below error.
oracle:+ASM@myhost /dev/oracleasm>ls -lrt
total 0

oracle:+ASM@myhost /oracle> sudo oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "ARCHLOG"
Unable to instantiate disk "ARCHLOG"
Instantiating disk "LOG2"
Unable to instantiate disk "LOG2"
Instantiating disk "DATAFILE"
Unable to instantiate disk "DATAFILE"
Instantiating disk "LOG1"
Unable to instantiate disk "LOG1"
since oracleasm rpms are not upgraded I was not able to startup the service, upon checking further found none of ASM disk are visible in its default directory i.e /dev/oracleasm/disks/* when I tried to scan the disks it couldn't even initialize those disks due to its unavailability!!

Finally found rpms for ASMLIB was still in older version even after the O/S upgrade. Then sys admin upgraded those rpm then the issue got fixed.

You can use below command to find the list of rpms and its version for oracleasm utility.
oracle:+ASM@myhost /oracle>rpm -qa | grep -i oracleasm

I Hope this article helped to you. I am expecting your suggestions/feedback.

No comments:

Post a Comment