Rename ASM Instance in RAC
. Last week I build a two nodes cluster which will be called node 5 and 6 in the clusterware. When you normally configure ASM on a cluster through GUI, it builds number of ASM instances depending on number of nodes selected in the clusterware starting from 1 and 2. Unlike disk group it does not ask you to specify the name of the instance, which could be a GUI limitation. This is how I ended up having ASM instance called ‘+ASM1’ for node 5 and ‘+ASM2’ for node 6 but I wanted to reserve those names for node 1 and 2 when they are ready to be added. Hence I went round to rename the ASM instances to be called +ASM5 and +ASM6.
As nobody has come across this crazy situation before hence there are no help in Google and metalink. However I have now managed to work out the process to do this. To be honest it is not that bad as it sounds. If you ever come across this situation and would like to rename any ASM instance please read on …..
1. Logon to one of the ASM instance from a node and create a pfile from spfile.
2. Edit the pfile to change instance names.
I only changed the following parameters in the pfile:
+ASMn.asm_diskgroups=’DG1′,’DG2′,’RECOVERY’#Manual Mount
+ASMn.instance_number=n
Example: In the following example I am changing my instance names from +ASM1 to +ASM5 and +ASM2 to +ASM6 and they will be bound to node 5 and 6 as I said earlier.
+ASM5.asm_diskgroups=’DG1′,’DG2′,’RECOVERY’#Manual Mount
+ASM6.asm_diskgroups=’DG1′,’DG2′,’RECOVERY’#Manual Mount
+ASM5.instance_number=5
+ASM6.instance_number=6
3. Shutdown the RAC database either through normal database shutdown procedure or server control (srvctrl) utility.
4. Use server control (srvctl) utility to remove all database services and instances from OCR. (You may not have to do this though)
5. Restart the ASM instance with the edited pfile created in step-2
6. Create a new spfile from the pfile which will hold all the new instance names.
7. Go to the $ORACLE_ASM_HOME/dbs on each node and link the parameter file to the new spfile. (I am assuming you hold you ASM sp file on a shared storage to be used by all the nodes in the cluster).
8. Edit the /etc/oratab file to replace old ASM instance names with new names on all nodes.
9. Now add al new ASM instances to the OCR using server control (srvctl) utility.
10. Shutdown the ASM instance which started earlier to create spfile.
11. Now Start-up ASM instances on all nodes either through normal database start-up procedure or through server control (srvctl) utility.
12. Now you can run your CRS stat (‘crs_stat –t’ or crsstat) to verify that new ASM instances are up and running.
13. Add all services and instances to OCR (which were deleted in step 4) using server control (srvctl).
June 11, 2009 at 6:30 am
Great post! Thanks! Really helped out! I just add one thing which is if you are storing your pfile on a raw partition you need to do the following step when swapping in the new spfile. After creating the pfile from the spfile, edit it as described above. Then name it “init+ASM.ora” (note that it will probably have been named inti+ASMn.ora when it was created from the spfile). Now in nomount mode do the following: “create spfile as ‘/dev/raw/rawN’ from pfile=’/u01/app/oracle/product/10g/db_1/dbs/init+ASM.ora’. After this is done you can create a soft link in the dbs directory: ln -s /dev/raw/rawN spfile+ASM.ora where the “N” is the raw statement is your partition reserved for the ASM spfile. You can also get some idea from this link: http://74.125.47.132/search?q=cache:oSQIlUf1w78J:blogs.oracle.com/AlejandroVargas/gems/crash4delasmspfile.pdf+create+spfile+raw&cd=1&hl=en&ct=clnk&gl=us#7
There is also a Metalink document now about this: 744932.1 but this post is actually more accurate because the Metalink document tells to do some pfile/spfile steps when ASM already shut down not possible. Cheers and thanks, gil