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.
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 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.
[grid@racnode1 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:
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:
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
$ 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 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 vip -n <node_name> -f
eg,
$ srvctl stop instance -d RACDB -n racnode1
$ srvctl stop vip -n racnode1 -f
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
$ 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.
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:
eg:
# srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2
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.
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
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 -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 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 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
$ 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
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
How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1)的更多相关文章
- 如何修改集群的公网信息(包括 VIP) (文档 ID 1674442.1)
适用于: Oracle Database - Enterprise Edition - 版本 11.2.0.3 到 12.1.0.2 [发行版 11.2 到 12.1]本文档所含信息适用于所有平台 用 ...
- Script to Collect Log File Sync Diagnostic Information (lfsdiag.sql) (文档 ID 1064487.1)
the article from :http://m.blog.itpub.net/31393455/viewspace-2130875/ Script to Collect Log File Syn ...
- 【Oracle】Script to Collect DRM Information (drmdiag.sql) (文档 ID 1492990.1)
脚本对应如下: The following (drmdiag.sql) is a script to collect information related to DRM (Dyanamic Reso ...
- 【翻译自mos文章】Clusterware间歇性的hang,命令报CRS-184而且Network Socket Files in /tmp/.oracle or /var/tmp/.oracle被删
来源于: Clusterware Intermittently Hangs And Commands Fail With CRS-184 as Network Socker Files in /tmp ...
- 深入理解openstack网络架构(4)-----连接到public network
原文地址: https://blogs.oracle.com/ronen/entry/diving_into_openstack_network_architecture3 译文转自:http://b ...
- SharePoint 2013/2010 在一个列表或文档库内移动列表项,文档和目录位置而保持last modify by 等系统字段保持不变
本文讲述SharePoint 2013/2010 在一个列表或文档库内移动列表项.文档和目录位置而保持last modify by 等系统字段保持不变的解决方式. 近期遇到客户一个需求,在一个列表或文 ...
- DOCTYPE html PUBLIC 指定了 HTML 文档遵循的文档类型定义
DOCTYPE html PUBLIC 指定了 HTML 文档遵循的文档类型定义 今天看到一篇CSS应用的一个友好搜索,我按网页上的代码复制.粘贴后预览时总达不到效果,而直接拷贝他的实例却能达到效果, ...
- 安利一个免费下载VIP文档神器
今天安利给大伙一个非非非常好用的可以免费下载VIP文档的下载神器------冰点文库下载器,用过的人都说好.操作简单,小巧轻便,完全免费.支持百度.豆丁.畅享.mbalib.hp009.max.boo ...
- Vagrant 手册之网络 - 公共网络 public network
原文地址 Vagrantfile 配置文件中公共网络的标识符:public_network,例如: config.vm.network "public_network" Vagra ...
随机推荐
- ubuntu安装sublime
添加sublime text 3的仓库: sudo add-apt-repository ppa:webupd8team/sublime-text-3 更新软件库 sudo apt-get updat ...
- java运用Comparator为对象排序
要排序的类需要实现Comparator接口,重写compare方法: user类及实现接口的内部类: package test; import java.util.Comparator; public ...
- 【转】sql server2005中raiserror的用法
raiserror 是由单词 raise error 组成 raise 增加; 提高; 提升 raiserror 的作用: raiserror 是用于抛出一个错误.[ 以下资料来源于sql ...
- php的函数iconv在转"utf-8"到"gb2312"时会自动截断
最近在写网站后台时候,需要用到iconv函数把前端jquery Post来过的utf-8编码内容转成gb2312, 发现只有用iconv函数把内容的数据一转码数据就会无缘无故的少了一部分. 问了我 ...
- 黄聪:wordpress如何扩展TinyMCE编辑器,添加自定义按钮及功能
在functions.php文件里面添加: add_action( 'admin_init', 'my_tinymce_button' ); function my_tinymce_button() ...
- Titan-红号楼宗谱案例
一. 简介 titan:存储,查询图形结构的数据库.分布式集群环境下,可支持数以千亿级别的点和边,同时支持上千个并发的实时的复杂图形遍历,支持ACID事务. 架构:支持以下3方面的自由组合 (1)节点 ...
- windows server 2012将计算机、回收站、文档等图标添加到桌面
rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
- sudo gem install cocoapods
在使用IOS_BaiduSDK的时候,需要用到cocoapods,所以就需要按照步骤继续着.但是在过程中会遇到一些问题: 1. sudo gem install cocoapods 运行这个报错 Ru ...
- ERP_基于Oracle ADF的定制化企业级IT系统解决方案
2014-12-31 Created By BaoXinjian
- PLSQL_性能优化系列11_Oracle Bulk Collect批处理
2014-10-04 Created By BaoXinjian