Oracle Rac 修改vip scan ip

方案:选择同一网段,不同ip地址

需求:需要网络工程师规划两组ip(一组用于备库rac,另一组用于修改ip时,将报表库的ip替换出来,本次迁移建议不做私有ip的修改)

-------------------------------------------------------------------以一节点修改public ip实验测试------------------------------------------------------------------------
源:192.168.56.20 rc1

将现有ip:192.168.56.20替换成ip:192.168.56.51

参考metalink 文档 ID 276434.1
If the change is only public IP or VIP address and the new ones are still in the same subnet, same interface, or if the change is only for public IP MAC address, IP/interface/subnet/netmask all remain the same, nothing needs to be done at 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 or modify the MAC address at network layer
  3. Restart Oracle Clusterware stack

操作:
1、crsctl stop crs
2、/etc/hosts
3、修改物理网卡的ip地址
####setup设置网卡网络:/etc/sysconfig/network-scripts/ifcfg-eth0
4、修改ip后需要重新连接打开新的窗口

测试结果:成功,风险小

------------------------------------------------------------------修改 VIP-----------------------------------------------------------------------------------------------
参考文档:metalink ID 276434.1
测试:192.168.56.21 替换成192.168.56.28
1、获取vip配置信息(Grid Infrastructure owner:)

$ srvctl config nodeapps -a

2、确认vip状态是 ONLINE
$ crsctl stat res -t

3、Stop the nodeapps resources
as Grid Infrastructure owner:

$ srvctl stop instance -d RACDB -n racnode1 —确认db以切换到另一节点
$ srvctl stop vip -n racnode1 -f
4、Verify VIP is now OFFLINE
$crs_stat -t

5、确认新的vip地址,并提前将vip信息更新的/etc/hosts内(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)

6、修改vip as root user(以grid环境变量,root执行)
srvctl modify nodeapps -n racnode1 -A racnode1-nvip/255.255.255.0/eth2

7、验证是否修改成功
$ srvctl config nodeapps -n racnode1 -a

Restarting Resources
8. Start the nodeapps and the other resources
eg,
$ srvctl start vip -n racnode1
$ srvctl start listener -n racnode1
$ srvctl start instance -d RACDB -n racnode1

  1. Verify the new VIP is ONLINE
    $ crs_stat -t

10、同样的步骤修改其他节点

  1. 修改listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary)

------------------------------------------------------------------修改 scan ip-----------------------------------------------------------------------------------------------

参考文档:metalink 文档 ID 952903.1

A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:

$ nslookup sales-scan.example.com
Server: dns1.example.com
Address: 10.100.10.70#53

Name: sales-scan.example.com
Address: 10.100.10.123
Name: sales-scan.example.com
Address: 10.100.10.122
Name: sales-scan.example.com
Address: 10.100.10.121

Stop the SCAN listener and the SCAN VIP resources:

$GRID_HOME/bin/srvctl stop scan_listener

$GRID_HOME/bin/srvctl stop scan

$GRID_HOME/bin/srvctl status scan

SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running

$GRID_HOME/bin/srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running

The SCAN VIP resources still show the old IP addresses:

$GRID_HOME/bin/srvctl config scan

SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.83

Now tell CRS to update the SCAN VIP resources:

$GRID_HOME/bin/srvctl modify scan -n sales-scan.example.com

To verify that the change was successful, check the SCAN configuration again:

$GRID_HOME/bin/srvctl config scan

SCAN name: sales-scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.100.10.123

Start SCAN and the SCAN listener:

$GRID_HOME/bin/srvctl start scan

$GRID_HOME/bin/srvctl start scan_listener

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值