First of all, lets list the various network components that are involved in an Oracle Cluster. Each of the node members of the cluster should have all of the following:
1) One Public IP,
2) One Private IP (to be used by the Private Interconnect), and
3) One Virtual IP (to be used by the applications)
The Private Interconnect should not be accessible by any other server that is not part of the cluster.
When Oracle cluster is installed and configured for the first time, the network component details are stored in OCR (Oracle Cluster Registry). The OCR parameter file contents can be viewed at $ORA_CRS_HOME/install/paramfile.crs. A typical paramfile.crs file would look like:
############### OCR Parameter File #################
CRS_ORACLE_OWNER=oracle
CRS_DBA_GROUP=oinstall
CRS_VNDR_CLUSTER=false
CRS_OCR_LOCATIONS=/ocrmount/ocr.crs
CRS_CLUSTER_NAME=myrac
CRS_HOST_NAME_LIST=myrac1.mydomain.com,1,myrac2.mydomain.com,2
CRS_NODE_NAME_LIST=myrac1.mydomain.com,1,myrac2.mydomain.com,2
CRS_PRIVATE_NAME_LIST=myrac1_private.mydomain.com,1,myrac2_private.mydomain.com,2
CRS_LANGUAGE_ID='AMERICAN_AMERICA.WE8ISO8859P1'
CRS_VOTING_DISKS=/votingmount/vote.crs
CRS_NODELIST=myrac1,myrac2
CRS_NODEVIPS='myrac1/myrac1_virtual/255.255.255.0/eth0|eth1,myrac2/myrac2_virtual/255.255.255.0/eth0|eth1'
############### OCR Parameter File #################
The cluster resources like, database instances and ASM instances are dependent on the VIP. So these would have to be restarted for the change to take effect. Also, the nodeapps will have to be modified after changing the VIP. The nodeapps includes, VIP address, GSD, Listener and ONS.
To view the current VIP configuration in the cluster, execute:
$ srvctl config nodeapps -n myrac1 -a
VIP exists.: /myrac1_virtual/12.34.56.78/255.255.255.0/Public
Now, to change the VIP configuration, the following steps have to be followed:
1) Stop all the databases, ASM instances and nodeapps on both the nodes:
$ srvctl stop database -d mydb
$ srvctl stop asm -n myrac1
$ srvctl stop asm -n myrac2
$ srvctl stop nodeapps -n myrac1
$ srvctl stop nodeapps -n myrac2
2) Verify that all the components are offline:
$ crs_stat -t
Additionally, you can also check that the VIP is no longer running by executing 'ifconfig -a'.
3) Update the /etc/hosts file and tnsnames and listener.ora files to reflect the new VIP.
4) Modify the nodeapps to reflect the new VIP (to modify nodeapps, log into the root account):
$ srvctl modify nodeaps -n myrac1 -o $ORA_CRS_HOME -A 98.76.54.32/255.255.255.0/eth0
or
$ srvctl modify nodeaps -n myrac1 -o $ORA_CRS_HOME -A myrac1_virtual_new/255.255.255.0/eth0
5) Verify that the configuration change is properly reflecting in OCR:
$ srvctl config nodeapps -n myrac1 -a
VIP exists.: /myrac1_virtual_new/98.76.54.32/255.255.255.0/Public
6) Start all the databases, ASM instances and nodeapps on both the nodes (in reverse order):
$ srvctl start nodeapps -n myrac1
$ srvctl start nodeapps -n myrac2
$ srvctl start asm -n myrac1
$ srvctl start asm -n myrac2
$ srvctl start database -d mydb
But, what if you have changed the VIP hostname in the hosts file but have not modified the nodeapps?? You might even risk the database not starting up automatically after server reboot. The fix for such a situation could be tiring. We would look at such a situation in my next post.
Tuesday, 29 September 2009
Subscribe to:
Comments (Atom)
