首页 > Linux操作系统 > Linux操作系统 > Modifying the VIP of a Cluster Node

Modifying the VIP of a Cluster Node

原创 Linux操作系统 作者:yanyp 时间:2010-12-09 22:48:03 0 删除 编辑
Subject:  Modifying the VIP of a Cluster Node 
  Doc ID:  Note:276434.1 Type:  BULLETIN 
  Last Revision Date:  13-JAN-2005 Status:  PUBLISHED 

This article is being delivered in Draft form. and may contain
errors.  Please use the MetaLink "Feedback" button to advise
Oracle of any issues related to this article.


How to change VIP and VIP/Hostname in a 10g RAC/CRS environment.


To illustrate the changing of a Virtual IP Address (VIP) in an
Oracle10g RAC/CRS environment.

Oracle 10g use VIP (Virtual IP) for clients to connect to the database. VIP solves all time-outs entering the TCP/IP stack resulting
higher application availability.  This VIP is a static IP with a hostname defined and resolved thru DNS. During the installation
of CRS users where prompted to enter a Virtual IP and Virtual Hostname for each of the node in the cluster. These are stored in
OCR and different components within 10g HA framework depends on these VIPs. If for reason customer wants to change either the VIP or the VIP/Hostname use the following procedure.

Customers and support analysts who need to change the VIP or VIP/Hostname.


Changing the VIP involves modification of the nodeapps, which includes the
Virtual IP address, the GSD, the Listener, and Oracle Notification Services (ONS).
The VIP can be modified while the nodeapps are running, however changes will not
take effect until the VIP, and hence the nodeapps, are restarted.
Other resources on a node, such as database instances and ASM instances, are dependent on the VIP, 
so stopping the nodeapps will only take the VIP offline if these other resources
are stopped.

How to change the VIP address only.   This example assumes that the host name
associated with the VIP will not change - just the IP address itself.

1.      Stop all resources that are dependent on the VIP on a given node.
        This includes all RAC database instances on that node, as well as the ASM
        instance on that node, if it exists and is being used:
  1a).  Stop database instances:
        $ srvctl stop instance -d grid -i grid1

        Where the database name is specified via the '-d' option, and the instance
        on the appropriate node is specified with the '-i' option.

        Alternatively, to stop the entire database, on all nodes, you can issue
        the stop database command:

        $ srvctl stop database -d grid

  1b).  To stop the ASM instance on the node, issue the following command:

        $ srvctl stop asm -n rmsclnxclu1

        Note:  It is not necessary to use srvctl to stop the database and ASM
        instance these resources can be stopped via SQL*Plus and/or, on the Windows
        platform. by stopping the associated services.

2.        Confirm the current IP address for the VIP by running the command 'ifconfig -a'
        This should show you the current VIP, bound to one of the network interfaces.
        In the example below, it shows as 'eth0:1'   

eth0:1    Link encap:Ethernet  HWaddr 00:01:03:2C:69:BB  
          inet addr:  Bcast:  Mask:
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1   

        Note:  On the Windows platform, run the command 'ipconfig /all'.  This will
        list all IP addresses bound to a given adapter, including the VIP.

3.     Stop the nodeapps using srvctl commands:
       $ srvctl stop nodeapps -n rmsclnxclu1

Note:  This will stop the VIP, GSD, Listener, and ONS daemon currently running on the nodes specified

4.      Verify that the VIP is no longer running by executing the 'ifconfig -a' command
        again, and confirm that the interface  (in our example it was 'eth0:1' is
        no longer listed in the output.  (Again, on Windows, run the command 'ipconfig /all')
        If the interface still shows as online, this is 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.

5.      Make any changes necessary to all nodes' /etc/hosts files  (on Unix), or the
        \WINNT\System32\drivers\etc\hosts file (on Windows) and/or make the necessary
        DNS changes, to associate the new IP address with the old host name.

6.        Modify the nodeapps and provide the new virtual IP address.
           Use the srvctl modify nodeapps command with the following 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|...]]).

        An example of the 'modify nodeapps' command is as follows:

        $ srvctl modify nodeapps -n rmsclnxclu1 -A

        Note:   This command should be run as root.  Attempting to run this command
        as the 'oracle' user or software owner will result in the following error:
        PRKO-2117 : This command should be executed as the system privilege user.

7.        Start node-level applications.

           Use the srvctl start nodeapps command with the following syntax:

           srvctl start nodeapps -n
        $ srvctl start nodeapps -n rmsclnxclu1

Repeat the same steps for all the nodes in the cluster. 
Since SRVCTL is a cluster wide management tool, you can accomplish these tasks for 
any specific nodes from one node, without the need to login to each of the cluster nodes.

Note:   If only the IP address is changed, it is not necessary to make changes
to the LISTENER.ORA and TNSNAMES.ORA, provided they are using the vip hostnames for
the 'HOST=' entries.

If changing both the hostname and the VIP for a node, it will be necessary
to modify the LISTENER.ORA and change the 'HOST=' entries to the new VIP hostname.
This can be dopne manually, or by using the NETCA to remove the old listener and 
create a new listener.   In addition, changes will need to be made to the TNSNAMES.ORA
of any clients connecting to the old HOSTNAME.


SRVCTL commands are documented in Appendix B of the RAC Admin Guide at: ... .101/b10765/toc.htm

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。



  • 博文量
  • 访问量