RAC10g环境修改VIP地址

修改IP及VIP大概可分为7个步骤,根据metalink上的指导,步骤如下:

10g RAC 双节点 环境 OS:Windows2003 Server,用户需要变更public IP,则VIP也要相应的改变
原IP (OS host 文件)

127.0.0.1 localhost
127.0.0.1 IRRDBSVR1
10.41.162.93 IRRDBSVR1
10.41.162.94 IRRDBSVR2
10.10.10.1 IRRDBSVR1-PRIV
10.10.10.2 IRRDBSVR2-PRIV
10.41.162.95 IRRDBSVR1-VIP
10.41.162.96 IRRDBSVR2-VIP

变更后的新IP
127.0.0.1 localhost
127.0.0.1 IRRDBSVR1
192.168.1.245 IRRDBSVR1
192.168.1.247 IRRDBSVR2
10.10.10.1 IRRDBSVR1-PRIV
10.10.10.2 IRRDBSVR2-PRIV
192.168.1.246 IRRDBSVR1-VIP
192.168.1.248 IRRDBSVR2-VIP

按照matalink 上的要求

1. Stop all resources that are dependent on the VIP on a given node.
srvctl stop database -d racdb

2 Confirm the current IP address for the VIP by running the command 'ipconfig /all'
得到所有的网络接口,这里可以看到包括原VIP在内的3个IP地址(这里没有复制输出,但结果如下面所示)
10.41.162.93 IRRDBSVR1
10.41.162.95 IRRDBSVR1-VIP
10.10.10.1 IRRDBSVR1-PRIV

3. Stop the nodeapps using srvctl commands:
srvctl stop nodeapps -n IRRDBSVR1
(没有报错)

4 Verify that the VIP is no longer running by executing the 'ipconfig /all' command again,验证VIP被成功停用
10.41.162.93 IRRDBSVR1
10.10.10.1 IRRDBSVR1-PRIV

5 Make any changes necessary to all nodes' /etc/hosts files (on Unix), or the WINNTSystem32driversetchosts file (on Windows) and/or make the necessary DNS changes, to associate the new IP address with the old host name.
已经配置hosts文件了

6 Modify the nodeapps and provide the new virtual IP address.
srvctl modify nodeapps -n IRRDBSVR1 -A 192.169.1.245/255.255.255.0/public

(注:linux系统此处最后的public改成网卡名,如:eth0,bond1等,否则无法启动

  1. #将所有的资源全部关闭  
  2.   oracle@bo2dbp:~> crs_stop -all  
  3.    
  4.   #使用oifcfg修改集群层网络配置  
  5.   oracle@bo2dbp:~> oifcfg delif -global  
  6.   oracle@bo2dbp:~> oifcfg getif -global  
  7.   oracle@bo2dbp:~> oifcfg setif -global bond1/192.168.7.0:public  
  8.   oracle@bo2dbp:~> oifcfg setif -global bond2/10.10.7.0:cluster_interconnect  
  9.   oracle@bo2dbp:~> oifcfg getif -global  
  10.   bond1  192.168.7.0  global  public  
  11.   bond2  10.10.7.0  global  cluster_interconnect 

分别在两个节点运行:

srvctl modify nodeapps -n RAC1 -A 192.168.7.188/255.255.255.0/bond0


srvctl modify nodeapps -n RAC2 -A 192.168.7.189/255.255.255.0/bond0

)



7 Start node-level applications
C:>srvctl start nodeapps -n IRRDBSVR1

第一次配置失败,在执行第7个步骤时报错

CRS-1006: 不再考虑其他成员
CRS-0215: 无法启动资源 'ora.irrdbsvr1.vip'。
CRS-0215: 无法启动资源 'ora.irrdbsvr1.LISTENER_IRRDBSVR1.lsnr'。

后来查找原因,原来是在步骤6的srvctl modify命令结尾没有将新的VIP与网络接口帮定,后添加public,问题解决!

由于IP的修改,导致enterprise manager可能无法运行。通过EMCA重新配置:

emca -reconfig dbcontrol -cluster


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值