Oracle 11g RAC 修改各类IP地址(4)

6.1 备份并确认CRS集群正常
从Oracle 11.2 GI开始,私有网络配置不仅仅存在ocr中,还存在gpnp profile中,所以首先需要备份profile.xml
--MOS上的说明:
Please take a backup of profile.xml on all cluster nodes before proceeding, as grid user:
$ cd $GRID_HOME/gpnp/

--节点1备份: [grid@jyrac1 ~]$ cd /opt/app/11.2.0/grid/gpnp/jyrac1/profiles/peer/ [grid@jyrac1 peer]$ cp -p profile.xml profile.xml.bk --节点2备份: [grid@jyrac2 ~]$ cd /opt/app/11.2.0/grid/gpnp/jyrac2/profiles/peer/ [grid@jyrac2 peer]$ cp -p profile.xml profile.xml.bk

确认CRS集群在各节点启动:

[grid@jyrac1 ~]$ olsnodes -s jyrac1 Active jyrac2 Active

6.2 设定新的私网信息
oifcfg getif
oifcfg setif -global

[root@jyrac1 ~]# /opt/app/11.2.0/grid/bin/oifcfg getif eth3 10.10.10.0 global cluster_interconnect eth2 192.168.1.0 global public

这里私网网段没有变化,不用修改。

6.3 root用户在所有节点关闭并禁用集群
crsctl stop crs
crsctl disable crs

[root@jyrac1 ~]# /opt/app/11.2.0/grid/bin/crsctl stop crs [root@jyrac2 ~]# /opt/app/11.2.0/grid/bin/crsctl stop crs [root@jyrac1 ~]# /opt/app/11.2.0/grid/bin/crsctl disable crs [root@jyrac2 ~]# /opt/app/11.2.0/grid/bin/crsctl disable crs

6.4 OS层修改私有网卡地址
ifconfig -a
ping

修改私有网卡IP并重启:

[root@jyrac1 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth3 [root@jyrac1 ~]# ifdown eth3 [root@jyrac1 ~]# ifup eth3

vi /etc/hosts 修改private ip部分为:

#private ip 10.10.10.50 jyrac1-priv 10.10.10.52 jyrac2-priv

6.5 root用户在所有节点启用并启动集群
crsctl enable crs
crsctl start crs

root用户在所有节点启用并启动集群:

[root@jyrac1 ~]# /opt/app/11.2.0/grid/bin/crsctl enable crs [root@jyrac2 ~]# /opt/app/11.2.0/grid/bin/crsctl enable crs [root@jyrac1 ~]# /opt/app/11.2.0/grid/bin/crsctl start crs [root@jyrac2 ~]# /opt/app/11.2.0/grid/bin/crsctl start crs

6.6 删除旧值
$ oifcfg delif -global

检查集群状态,测试应用连接,一切正常。

至此,所有工作已经完成,不但完整学习了Oracle 11g RAC各种IP的修改,而且局域网其他机器也可以愉快的访问到这个测试环境进行测试了,提高了我的工作效率,真是一举两得^_^。

Reference

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

How to Modify Private Network Information in Oracle Clusterware (文档 ID 283684.1)

How to Modify SCAN Setting or SCAN Listener Port after Installation (文档 ID 972500.1)

How to update the IP address of the SCAN VIP resources (ora.scan{n}.vip) (文档 ID 952903.1)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/fea8d83bec79a9318605727ac82bbf42.html