OracleRac跨网段修改Public IP/VIP/Private IP/Scan IP

本验证于测试环境,生产操作需谨慎

现为测试环境,机器有且仅有两个网卡存在,需求修改Public IP/VIP/Private IP/Scan IP,把Public IP/VIP/Scan IP的网段改为Private IP的网段,Private IP于Public IP网段互换。
先停掉两个节点的数据库

csharp 复制代码
#(ORACLE)
$ srvctl stop database -d <db_name>

操作前最好先备份两个节点的profile.xml文件

csharp 复制代码
#(GRID)
$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk

用grid用户在一个节点上关闭监听

csharp 复制代码
#(GRID)
$ srvctl stop listener -n <hostname1>
$ srvctl stop listener -n <hostname2>
$ srvctl stop scan_listener

用grid用户在一节点关闭vip和scan vip

csharp 复制代码
#(GRID)
$ srvctl stop vip -n <hostname1>
$ srvctl stop vip -n <hostname2>
$ srvctl stop scan

用grid用户在一节点更改私公网和网通讯接口

csharp 复制代码
#(GRID)
$ oifcfg getif  --查看当前公网和网通讯接口

$ oifcfg  getifg
team1 20.8.91.0 global public
team2 16.0.100.0  global cluster_interconnect,asm
csharp 复制代码
#(GRID)
$ oifcfg setif -global <私有网卡名>/<新私有网段>:cluster_interconnect,asm

$ oifcfg setif -global team1/20.8.91.0 :cluster_interconnect,asm
$ oifcfg setif -global team2 /16.0.100.0  :public

grid用户登陆一节点配置新的priv子网

csharp 复制代码
#(GRID)
$ srvctl config listener -asmlistener
$ srvctl config asm  
--查看原ASMLISTENER

添加新的ASMLISTENER:

csharp 复制代码
#(GRID)
$ srvctl add listener -asmlistener -l ASMNET1LSNR2_ASM -subnet 20.8.91.0 

删除旧的ASMLISTENER:

csharp 复制代码
#(GRID)
$ lsnrctl stop ASMNET1LSNR_ASM
$ srvctl update listener -listener ASMNET1LSNR_ASM -asm -remove -force

root用户配置asmnetwork

csharp 复制代码
$(ROOT)
# srvctl config asmnetwork
# srvctl stop asmnetwork
# srvctl remove asmnetwork -netnum 1
# srvctl add asmnetwork -netnum 1 -subnet 20.8.91.0 

修改后关闭集群自启动并关闭集群

csharp 复制代码
$(ROOT)
# crsctl disable crs
# crsctl stop cluster -all

重启集群后root用户修改VIP资源为目标IP

csharp 复制代码
$(ROOT)
# srvctl modify nodeapps -n <hostname1> -A <hostname1-vip>/255.255.255.0/<网卡>
# srvctl modify nodeapps -n <hostname2> -A <hostname2-vip>/255.255.255.0/<网卡>
验证是否修改成功
# srvctl config vip -n <hostname1>
# srvctl config vip -n <hostname2>

修改scan IP

csharp 复制代码
$(ROOT)
# srvctl modify scan -n <scan-IP名>

#srvctl modify scan -n yysd-scan

#(GRID)
$ srvctl modify scan_listener -u
$ srvctl config scan
$ srvctl config scan_listener

用户grid登陆任一节点启动vip资源和scan vip资源

csharp 复制代码
#(GRID)
$ srvctl start vip -n <hostname1>
$ srvctl start vip -n <hostname2>
$ srvctl start scan
$ srvctl start listener -n <hostname1>
$ srvctl start listener -n <hostname2>
$ srvctl start scan_listener
相关推荐
Highcharts.js1 小时前
Highcharts 下钻(Drilldown)柱状图 Demo
数据库·信息可视化·hbase·highcharts·drilldown·js模块·下钻图表
翼龙云_cloud2 小时前
阿里云国际渠道代理商:如何在ECS上部署Flask应用?
运维·数据库·阿里云·flask·云计算
进阶的小木桩2 小时前
mysql 安装问题解决方案记录
数据库·mysql
2601_962071572 小时前
如何利用SpringSecurity进行认证与授权
java·服务器·数据库
山峰哥3 小时前
数据库工程与查询优化案例深度复盘‌
数据库·sql·oracle·编辑器·深度优先·宽度优先
IT大白鼠3 小时前
MSF数据库与资产管理——专业渗透测试流程
数据库·安全·msf
IvorySQL3 小时前
PostgreSQL 日报|内核多项缺陷修复与数据校验补丁推进(8 月 27 日)
数据库·postgresql·区块链
风吹心凉3 小时前
Agent大脑-RAG知识库
数据库
VALENIAN瓦伦尼安教学设备3 小时前
设备状态检测振动分析实训台案例分析
大数据·数据库·人工智能·嵌入式硬件·算法
黄俊懿3 小时前
【架构师从入门到进阶】第五章:DNS&CDN&网关优化思路——第十节:网关安全-单向加密
网络·数据库·计算机网络·安全·架构·系统架构·架构师