How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

PURPOSE

The purpose of this note is to illustrate how to change a public hostname, public IP, a Virtual IP Address (VIP), VIP hostname or other VIP attributes in an Oracle Clusterware/Grid Infrastructure environment.

SCOPE

Oracle Database 10g and 11g use VIPs (Virtual IP) in clustered environments for clients to connect to the database. These VIPs are static IP addresses associated with (virtual) hostnames and resolved through DNS (except when using 11gR2 GNS).

During the installation of the Oracle Clusterware users are prompted to enter a Virtual IP and Virtual hostname for each of the node in the cluster. These are stored within the OCR (Oracle Cluster Registry) and different components within the HA framework depend on these VIPs. If for some reason the need arises to change either the VIP, the VIP hostname, or the subnet, netmask etc, this procedure should be followed.

For changes associated with private network/cluster interconnect, please refer to Note 283684.1

DETAILS

Case I.   Changing public hostname

Public hostname is recorded in OCR, it is entered during installation phase. It can not be modified after the installation. The only way to modify public hostname is by deleting the node, then add the node back with a new hostname, or reinstall the clusterware.

Case II.  Changing public IP only without changing interface, subnet or netmask

If the change is only public IP address and the new ones are still in the same subnet, nothing needs to be done on clusterware layer, all changes need to be done at OS layer to reflect the change.

1. Shutdown Oracle Clusterware stack 
2. Modify the IP address at network layer, DNS and /etc/hosts file to reflect the change
3. Restart Oracle Clusterware stack

Above change can be done in rolling fashion, eg: one node at a time.

Case III. Changing public network interface, subnet or netmask

If the change involves different subnet(netmask) or interface, delete the existing interface information from OCR and add it back with the correct information is required.  In the example here, the subnet is changed from 10.2.156.0  to 10.2.166.0 via two separate commands - first a ‘delif‘  followed by a ‘setif‘:

% $CRS_HOME/bin/oifcfg/oifcfg delif -global <if_name>[/<subnet>]
% $CRS_HOME/bin/oifcfg/oifcfg setif -global <if_name>/<subnet>:public

For example:
% $CRS_HOME/bin/oifcfg delif -global eth0/10.2.156.0 
% $CRS_HOME/bin/oifcfg setif -global eth0/10.2.166.0:public

Then make the change at OS layer. There is no requirement to restart Oracle clusterware unless OS change requires a node reboot. This can be done in rolling fashion.

Once public network is changed, its associated VIP and SCAN VIP are also required to change, refer to CASE IV and CASE V.

Note: for 11gR2, above command requires clusterware RUNNING on ALL nodes, otherwise PRIF-33 and PRIF-32 will be reported, i.e.
[[email protected] bin]$ ./oifcfg delif -global eth0/192.168.1.0
PRIF-33: Failed to set or delete interface because hosts could not be discovered
  CRS-02307: No GPnP services on requested remote hosts.
PRIF-32: Error in checking for profile availability for host racnode2
  CRS-02306: GPnP service on host "racnode2" not found.

Case IV. Changing VIPs associated with public network change

Planning for VIP changes

In general, a complete outage is only required for pre-10.2.0.3 release. From 10.2.0.3 onwards, the ASM/database instance dependency on the VIP resource is removed, so the VIP could be modified without having to take down the ASM/database instance, only client connections to the database will be affected when VIP is down. If the modification is a node specific, then only connection to that node will be affected during the time of change.

Please follow Case III to ensure public network changes are made first. If there is a node reboot or Clusterware restart after the OS network change, vip will not start, please skip to step "Modifying VIP and its Associated Attributes".

Gathering Current VIP Configuration

1. Gather the existing setup
for 10g and 11gR1, as Oracle Clusterware owner:

$ srvctl config nodeapps -n <node> -a

eg:
$ srvctl config nodeapps -n racnode1 -a
VIP exists.: /racnode1-vip/101.17.80.184/255.255.254.0/eth1

for 11gR2, as Grid Infrastructure owner:

$ srvctl config nodeapps -a

eg:
$ srvctl config nodeapps -a
Network exists: 1/101.17.80.0/255.255.254.0/eth1, type static
VIP exists: /racnode1-vip/101.17.80.184/101.17.80.0/255.255.254.0/eth1, hosting node racnode1
VIP exists: /racnode2-vip/101.17.80.186/101.17.80.0/255.255.254.0/eth1, hosting node racnode2

2. Verify VIP status

10.2 and 11.1:
$ crs_stat -t

11.2:
$ crsctl stat res -t
- it should show VIPs are ONLINE

$ ifconfig -a
(netstat -in for HP and ipconfig /all for Windows)
- VIP logical interface is bound to the public network interface

Stopping Resources

3. Stop the nodeapps resources (and all dependent resources ASM/DB only if required):

10g and 11gR1, as Oracle Clusterware owner:

$ srvctl stop instance -d <db_name> -i <inst_name>   (optional for 10.2.0.3+)
$ srvctl stop asm -n <node_name>                     (optional for 10.2.0.3+)
$ srvctl stop nodeapps -n <node_name>

eg, 
$ srvctl stop instance -d RACDB -i RACDB1
$ srvctl stop asm -n racnode1
$ srvctl stop nodeapps -n racnode1

11gR2, as Grid Infrastructure owner:

$ srvctl stop instance -d <db_name> -n <node_name>    (optional)
$ srvctl stop vip -n <node_name> -f

eg, 
$ srvctl stop instance -d RACDB -n racnode1
$ srvctl stop vip -n racnode1 -f

Note 1: The -f option is required for 11gR2 to stop listener resource, otherwise following error will occur:
PRCR-1014 : Failed to stop resource ora.racnode1.vip
PRCR-1065 : Failed to stop resource ora.racnode1.vip
CRS-2529: Unable to act on ‘ora.racnode1.vip‘ because that would require stopping or relocating ‘ora.LISTENER.lsnr‘, but the force option was not specified
...

4. Verify VIP is now OFFLINE and the interface is no longer bound to the public network interface

$ crs_stat -t (or $ crsctl stat res -t for 11gR2)

$ ifconfig -a
(netstat -in for HP and ipconfig /all for windows)

Modifying VIP and Its Associated Attributes

5. Determine the new VIP IP/subnet/netmask or VIP hostname, make the network change on OS first, ensure the new VIP is registered in DNS or modified in /etc/hosts (for Unix/Linux) and \WINDOWS\System32\drivers\etc\hosts file (for Windows). If the network interface is changed, ensure the new interface is available on the server before proceeding with the modification.

For example:
New VIP is: 110.11.70.11 racnode1-nvip
new subnet is 110.11.70.0
new netmask is 255.255.255.0
new interface is eth2

6. Modify the VIP resource, as root user:

# srvctl modify nodeapps -n <node> -A <new_vip_address or new_vip_hostname>/<netmask>/<[if1[if2...]]>

eg:
# srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2

Note: Starting with 11.2, the VIPs depend on the network resource (ora.net1.network), the OCR only records the VIP hostname or the IP address associated with the VIP resource. The network attributes (subnet/netmask/interface) are recorded with the network resource. When the nodeapps resource is modified, the network resoure(ora.net1.network) attributes are also modified implicitly.

From 11.2.0.2 onwards, if only subnet/netmask/interface change is required, network resource can be modified directly via srvctl modify network command.
as root user:
# srvctl modify network -k <network_number>] [-S <subnet>/<netmask>[/if1[|if2...]]
eg:
# srvctl modify network -k 1 -S 110.11.70.0/255.255.255.0/eth2

There is no need to modify VIP or SCAN if other attributes are not changed.

* A special case for 11gR2 modifying the VIP hostname only without changing the IP address.

For example: only VIP hostname changes from racnode1-vip to racnode1-nvip, IP and other attributes remain the same.

If IP address is not changed, above modify command will not change the USR_ORA_VIP value in ‘crsctl stat res ora.racnode1.vip -p‘ output. Please use the following command:
# crsctl modify res ora.racnode1.vip -attr USR_ORA_VIP=racnode1-nvip

Verify the changes for USR_ORA_VIP field:
# crsctl stat res ora.racnode1.vip -p |grep USR_ORA_VIP

Note: For Windows platform, the interface name needs to be in quote (") if there is a space in between, eg:
As administrator user or software install user:
> srvctl modify nodeapps -n racnode1 -A 110.11.70.11/255.255.255.0/"Local Area Connection 1"

7. Verify the change

$ srvctl config nodeapps -n <node> -a (10g and 11gR1)
$ srvctl config nodeapps -a (11gR2)

eg:
$ srvctl config nodeapps -n racnode1 -a
VIP exists.: /racnode1-nvip/110.11.70.11/255.255.255.0/eth2

Restarting Resources

8. Start the nodeapps and the other resources

10g and 11gR1, as Oracle Clusterware owner:

$ srvctl start nodeapps -n <node_name>       
$ srvctl start asm -n <node_name>               (optional for 10.2.0.3+)
$ srvctl start instance -d <dbanme> -i <inst>   (optional for 10.2.0.3+)

eg:
$ srvctl start nodeapps -n racnode1
$ srvctl start asm -n racnode1
$ srvctl start instance -d RACDB -i RACDB1

11gR2, as Grid Infrastructure owner:

$ srvctl start vip -n <node_name> 
$ srvctl start listener -n <node_name>
$ srvctl start instance -d <db_name> -n <node_name>      (optional)

eg,
$ srvctl start vip -n racnode1 
$ srvctl start listener -n racnode1
$ srvctl start instance -d RACDB -n racnode1

9. Verify the new VIP is ONLINE and bind to the public network interface

$ crs_stat -t (or $ crsctl stat res -t for 11gR2)

$ ifconfig -a
(netstat -in for HP or ipconfig /all for windows)

10. Repeat the same steps for the rest nodes in the cluster only if the similar change is required.

Others

11. Modify listener.ora,  tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary.

Case V. Change SCAN VIP associated with public network change

With Grid Infrastructure 11gR2, SCAN and SCAN VIP are introduced for client connections. To modify the SCAN VIP, please refer to

Note 952903.1 How to update the IP address of the SCAN VIP resources (ora.scan<n>.vip) 
Note 972500.1 How to Modify SCAN Setting or SCAN Listener Port after Installation

Note: if rolling back the change is required, repeat the commands which have been run, replace the new value with original value to restore the original configuration.

REFERENCES

NOTE:952903.1 - How to update the IP address of the SCAN VIP resources (ora.scan{n}.vip)
NOTE:283684.1 - How to Modify Private Network Information in Oracle Clusterware

时间: 2024-10-08 14:57:44

How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1)的相关文章

深入理解openstack网络架构(4)-----连接到public network

原文地址: https://blogs.oracle.com/ronen/entry/diving_into_openstack_network_architecture3 在上一篇文章中,我们介绍了openstack中的路由,了解到openstack如何通过namespace实现的router将两个network连通.本文中,我们进一步分析路由功能,说明实现内部internal network和public network的路由(而不仅仅是internal network之间).我们还会分析n

分析HTML5:Network Information API详解和介绍

网页设计领域讨论最热烈的概念之一就是,响应式网页设计.响应式网页设计方面的文章已有成千上万,因此我在本文中不准备讨论.不过,响应式网页设计有一个重大局限.那就是响应式网页设计在很大程度上取决于浏览器视口(viewport)的大小. 虽然这种方法很适合呈现大小和分辨率合适的图片,但它并非在所有情况下都很理想,视频内容就是一个例子.在这种情况下,我们其实需要关于设备网络连接的更多信息. 设想一下:你在智能手机或平板电脑上访问YouTube.你人在家里,通过无线网络连接上去.这种情况下,你并不关心所下

SharePoint 2013/2010 在一个列表或文档库内移动列表项,文档和目录位置而保持last modify by 等系统字段保持不变

本文讲述SharePoint 2013/2010 在一个列表或文档库内移动列表项.文档和目录位置而保持last modify by 等系统字段保持不变的解决方式. 近期遇到客户一个需求,在一个列表或文档库内移动列表项,文档和目录位置而保持last modify by 等系统字段保持不变. 研究出来了.不敢独享.特此共享出来给同鞋们做參考: using Microsoft.SharePoint; using System; using System.Collections.Generic; usi

DOCTYPE html PUBLIC 指定了 HTML 文档遵循的文档类型定义

DOCTYPE html PUBLIC 指定了 HTML 文档遵循的文档类型定义 今天看到一篇CSS应用的一个友好搜索,我按网页上的代码复制.粘贴后预览时总达不到效果,而直接拷贝他的实例却能达到效果,开始以为书写顺序不对,于是调整书写顺序,还是不行,最后找到了我认为最没什么用处的第一行才发现真正起作用的竟然是 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http//www.w3.org

Detailed Error Information: Module IIS Web Core Notification 未知 Handler 尚未确定 Error Code 0x80070032 配置错误 无法读取配置节“spring”,因为它缺少节声明 配置文件 \\?\d:\用户目录\我的文档\visual studio 2015\Projects\LiS

Detailed Error Information: Module    IIS Web Core Notification    未知 Handler    尚未确定 Error Code    0x80070032 配置错误    无法读取配置节“spring”,因为它缺少节声明 配置文件    \\?\d:\用户目录\我的文档\visual studio 2015\Projects\LiShu\LiShu.WebApp\web.config 没有加载sping 的dll文件

运行oracle 的aix、linux主机改ip规范

/etc/hosts里要改 对linux :/etc/sysconfig/network-scripts/ifcfg-ethX要改, 对aix: smitty tcpip ->Mininum Configuration & Startup->Available Network Interfaces oracle的listener.ora文件要改,若是里边配置的是ip地址. oracle的sqlnet.ora文件要改:特别关注有无限制ip地址段的那一行. 对rac而言,还需要修改ocr中

Lesson 5-Exchange server 2010 Transfer mails in public network

概述 我们搭建exchange server就是能更外部通信,即公网邮件服务器之间传输邮件 环境如下: Step1: 注册公网DNS 先决条件:不同的邮件域之所以可以相互通信是因为在公网的DNS服务器上有注册的MX 记录 所以我们先要在public DNS 上注册 lab.com 和contoso.com的mx记录 当然在内部dns (windows2012-7)上也要做个转发 Step2:安装contoso.com 邮件服务 在win2003-2上安装pop3/smtp服务 同时创建一个用户B

duplicate 数据库 from active database [oracle 11.2.0.3 + asm] =&gt; [oracle 11.2.0.3 + asm]

参考自己博客的这个安装 http://blog.csdn.net/ctypyb2002/article/details/51251217 安装好另一台机器的rhel6.4,gi software,rdbms software. 创建一个 +ASM 实例 用过asmca 创建了一个可用的磁盘组. 不要用DBCA创建数据库,因为要duplicate 数据库.只要安装好 rdbms software 就OK了. vi /etc/hosts 10.1.1.35 asmnode 10.1.1.36 asm

How to Analyze Problems Related to Internal Errors (ORA-600) and Core Dumps (ORA-7445) using My Oracle Support (文档 ID 260459.1)

Oracle Database - Enterprise Edition - Version 8.1.7.4 and later Information in this document applies to any platform. **Checked for relevance 06-Apr-2010 **Checked for relevance 17-Apr-2013 *** Checked for relevance on 16-Nov-2011 *** Purpose 1.1 Ab