首页 > 数据库 > Oracle > RAC集群中IP地址的更改
集群中IP地址的更改
IP地址的更改比hostname的更改相对容易一些。对于同网段的public/private IP更改,无需进行特别操作。如果是不同网段,需要使用oifcfg处理。因为VIP是作为资源注册到OCR,所以任何VIP的改动都需用相关命令进行处理。
以上处理都需要在集群资源停掉的基础上操作。
以下是修改前后的public/pricate/vip
修改前修改后
Public IP 10.194.129.145/146 10.194.128.145/146
Privite IP 10.10.10.145/146 10.10.1.145/146
Virtual IP 10.194.129.147/148 10.194.128.147/148
(1).停掉各资源。
数据库正常关库,其余资源使用crs_stop 停止。
(2)重新修改网卡ip/gateway/host文件等,重启网络等相关服务
(3).利用oifcfg更改public/private ip
查看当前使用
td1-> oifcfg getif
eth1 10.10.10.0 global cluster_interconnect
eth0 10.194.129.0 global public
删除当前
td1-> oifcfg delif -global eth0
td1-> oifcfg delif -global eth1
重新添加
td1-> oifcfg setif -global eth0/10.194.128.0:public
td1-> oifcfg setif -global eth1/10.10.1.0:cluster_interconnect
(4).更新注册到OCR中的vip配置(root 用户)
[root@td1 ~]# crs_register -update ora.td1.vip -o
oi=eth0,ov=10.194.128.147,on=255.255.255.0
[root@td1 ~]# crs_register -update ora.td2.vip -o
oi=eth0,ov=10.194.128.148,on=255.255.255.0
或者使用(root 用户)
[root@td1 ~]# srvctl modify nodeapps -n td1 -A 10.194.128.147/255.255.255.0/eth0
[root@td1 ~]# srvctl modify nodeapps -n td2 -A 10.194.128.148/255.255.255.0/eth0
(5).如果你使用了ocfs,修改ocfs配置文件(/etc/ocfs/cluster.conf),验证修改后是否可用。
(6).修改监听listener 配置文件
(7)启动集群各节点资源并验证
td1-> crs_start –all
登陆数据库,检验内连接是否生效。
SQL> select * from v$cluster_interconnects;
NAME IP_ADDRESS IS_PUBLIC SOURCE
--------------- ---------------- --------- ----------------------------
eth1 10.10.1.145 NO Oracle Cluster Repository
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/73920/viewspace-1035083/ ,如需转载,请注明出处,否则将追究法律责任。