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:
- Shutdown the ASM
- Execute /etc/init.d/oracleasm stop
- Execute rpm -Uvh oracleasm-*.rpm
- Execute /etc/init.d/oracleasm start
- Startup ASM
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 oracleasm-support-2.1.7-1.el5 oracleasm-2.6.18-194.32.1.el5-2.0.5-1.el5 oracleasmlib-2.0.4-1.el5
I Hope this article helped to you. I am expecting your suggestions/feedback.