prev next

Reinstalling CRS after loss of voting disk/ocr

There are several occasions when we are not left with any other option apart from re-installing clusterware. It usually happens when voting disk/ocr is lost and we don't have backups..No they are not mirrored too..:-)..

Some time back i faced this issue while applying patchset on clusterware (the binaries got corrupted due to incorrect version of c++ libraries on AIX)..Recently i got this issue again when i lost my only voting disk. This is how i re-installed the clusterware and added resources to it.

1) Metalink doc 239998.1 is a good document to wipe out a CRS installation. Followed this doc for cleanup.

2) Installed the clusterware, ran root.sh, vipca and this is what i got after that.

oracle@rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

3) Now is the time to add the listener to OCR. Remove/move the old network files on both nodes.

[oracle@rac1 admin]$ mv tnsnames.ora tnsnames.ora.old
[oracle@rac1 admin]$ mv listener.ora listener.ora.old
[oracle@rac2 admin]$ mv tnsnames.ora tnsnames.ora.old
[oracle@rac2 admin]$ mv listener.ora listener.ora.old

Run NETCA to add the new listener to cluster.

[oracle@rac1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2

So listeners added..

4) Now is the time to add asm,database,instance and services (if any)

ASM
[oracle@rac1 admin]$ srvctl add asm -n rac1 -i +ASM1 -o /u01/app/oracle/product/10.2.0/asm
[oracle@rac1 admin]$ srvctl add asm -n rac2 -i +ASM2 -o /u01/app/oracle/product/10.2.0/asm
[oracle@rac1 admin]$ srvctl start asm -n rac2
[oracle@rac1 admin]$ srvctl start asm -n rac2

Database
[oracle@rac1 admin]$ srvctl add database -d orcl -o /u01/app/oracle/product/10.2.0/db_1
[oracle@rac1 admin]$ srvctl add instance -i orcl1 -d orcl -n rac1
[oracle@rac1 admin]$ srvctl add instance -i orcl2 -d orcl -n rac2
[oracle@rac1 admin]$ srvctl start database -d orcl

This is what i got after running the above commands.

[oracle@rac1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE rac1
ora....l1.inst application ONLINE ONLINE rac1
ora....l2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
[oracle@rac1 admin]$

So my cluster is up with all the existing resources resgistered....

-- Rishi

No comments:

Post a Comment

Review my blog

Hits since creation