Saturday, April 14, 2012

Changing the VIP IP address and Virtual Host Name

1) Find out the current VIP configurations from both nodes
a) on Node1
$ srvctl config nodeapps -n node1 -a
b) on Node 2
$ srvctl config nodeapps -n node2 -a
Note : This will give you the current VIP Hostname,VIP IP address,subnet mask, and
interface name used by the VIP.
2) Stopping resources of both nodes
Once you are ready to make the change, stop all resources that are dependent on the VIP on a given node.
a) Stop database
$ srvctl stop database -d cbnk
b) Stop the nodeapps
$ srvctl stop nodeapps -n node1
$ srvctl stop nodeapps -n node2
3) Verify the VIP is no longer running
$ ifconfig -a
note : If the interface still shows as online, this may be an indication that a resource which is
dependent on the VIP is still running.
The crs_stat command can help to show resources that are still online.
4) Make any changes to all nodes of /etc/hosts files to associate the new IP address with the old hostname.
5) make the actual modification to the nodeapps
This command should be run as root
Syntax : srvctl modify nodeapps -n [-o ] [-A ]
Options Description:
-n Node name.
-o Oracle home for the cluster database.
-A The node level VIP address (/netmask[/if1[|if2|...]]).
Example : # srvctl modify nodeapps -n node1 -A 192.168.2.110/255.255.255.0/eth0
Note : interface names are case senstive on all platforms. Be sure that the interface name specified
is the correct name as seen from the OS, be sure that the subnet mask used for the VIP matches the subnet mask used for the
actual public IP addresses, and that the VIP hostname is correctly registered in DNS and/or the hosts file.
6) After making the change, verify that it is correct
$ srvctl config nodeapps -n node1 -a
7) Start the nodeapps resources
$ srvctl start nodeapps -n node1
Note : Repeat the same steps ( Step 1 To Step 7) for all the nodes in the cluster
Note : If only the IP address is changed, it should not be necessary to make changes to the LISTENER.ORA and TNSNAMES.ORA, provided they are
using the vip hostnames for the 'HOST=' entries.
Refernce :
Note:220970.1 : RAC Frequently Asked Questions
Note:276434.1: Modifying the VIP or VIP Hostname of a 10g Oracle Clusterware Node
Note 283684.1: How to Change Interconnect/Public Interface IP Subnet in a 10g Cluster

No comments:

Post a Comment