Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)方法

Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)方法

场景:Oracle 12.2 RAC修改IP信息一般有2种场景

第一种场景:oracle rac 中修改public ip/vip/pirv ip/scan ip 但不修改(subnet (netmask) or interface) 的方法

public ip => 仅os修改主机ip和/etc/hosts

vip => 仅修改/etc/hosts

pirv ip => 仅os修改主机ip和/etc/hosts

scan ip => 修改/etc/hosts和srvctl modify scan -n scan-newdb

注:解析均使用/etc/hosts

第二种场景:oracle rac 修改public ip和 pirv ip的(subnet (netmask) or interface) 的方法

#public ip/vip/scan ip均在一个网段内,故public ip修改完成后,vip/scan ip均需修改

public ip => oifcfg setif/delif

vip => root修改VIP资源

scan ip => srvctl modify scan -n scan-newdb

pirv ip => oifcfg setif/delif 

 

#以下是修改方法,其中os修改的步骤均省略。

1.IP (subnet (netmask) or interface) 更改方法(单节点执行,集群生效)

oifcfg delif -global eth0/10.x.156.0 

oifcfg setif -global eth0/10.x.166.0:public 

2.IP (subnet (netmask) or interface) 更改后VIP更改方法(单节点执行,集群生效)

2.1 收集VIP信息

srvctl config nodeapps -a

2.2 检验VIP状态

crsctl stat res -t 

ifconfig -a

2.3 停止VIP资源

$ srvctl stop instance -d <DBNAME> -n <nodename>1 

$ srvctl stop vip -n <nodename>1 -f 

2.4 检验VIP状态为OFFLINE 

$ crsctl stat res -t 

2.5 修改VIP相关的配置

/etc/hosts

2.6 修改VIP资源,使用ROOT

 srvctl modify nodeapps -n <nodename>1 -A <nodename>1-nvip/255.255.255.0/<if_name>

2.7 验证VIP修改

$ srvctl config nodeapps -a

2.8 重启VIP资源

$srvctl start vip -n <nodename>1

$srvctl start listener -n <nodename>1 

$srvct start instance -d <DBNAME> -n <nodename>1

2.9 检验VIP状态为ONLINE和public network interface

crsctl stat res-t 

ifconfig-a

2.10 Modify listener.ora,tnsnames,ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary.

3.Modify scan(单节点执行,集群生效) 

./srvctl config scan 

./srvctl stop scan_listener 

./srvctl stop_scan 

./srvctl modify scan -n scan-newdb

./srvctl start scan 

./srvctl start scan_listener

./srvctl config scan

4.PRIV IP (subnet (netmask) or interface) 更改方法(单节点执行,集群生效)

$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk

$ oifcfg getif

$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect[,asm]

$ srvctl config listener -asmlistener
$ srvctl config asm

# crsctl stop crs
# crsctl disable crs

$ ifconfig -a
$ ping <private hostname>

# crsctl enable crs
# crsctl start crs

$ oifcfg delif -global <interfacename>[/<subnet>]
参考:

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

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

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

How to Update the IP Address of the SCAN VIP Resources (ora.scan{n}.vip) (Doc ID 952903.1)

########################################################################################

版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!【QQ交流群:53993419】

QQ:14040928 E-mail:dbadoudou@163.com

本文链接: https://blog.csdn.net/lovehewenyu/article/details/109587642

########################################################################################

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值