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
########################################################################################