Modifying the VIP of a Cluster Node

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.
***

Title: 
-------

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


PURPOSE
-------

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


PURPOSE
-------
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.


SCOPE & APPLICATION
-------------------
Customers and support analysts who need to change the VIP or VIP/Hostname.


Note:

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:192.168.1.125  Bcast:192.168.1.255  Mask:255.255.255.0
          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 192.168.2.125/255.255.255.0/eth0

        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
        i.e.:
        $ 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.



RELATED DOCUMENTS
-----------------

SRVCTL commands are documented in Appendix B of the RAC Admin Guide at:
http://download-west.oracle.com/ ... .101/b10765/toc.htm

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/230160/viewspace-681484/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/230160/viewspace-681484/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值