Oracle rac 修改vip & scan ip

背景介绍:

现在有个需求,主机的物理机迁移,为了让业务改动最小,要修改新主库的VIP & SCAN IP,同网段的修改vip & scan比较简单

ps: 过段时间要修改物理机的网段,届时再更新!

修改vip

--修改前VIP & SCAN-IP

修改前vip最后两位为23、24

修改前scan-ip最后两位为25、20

--修改后VIP & SCAN-IP

修改后vip最后两位为248、249

修改后scan-ip最后两位为225、220

--查看修改前的/etc/hosts

root@d2-dbrac21 \~\]# cat /etc/hosts \| grep 'vip\\\|scan' 192.168.10.23 d2-dbrac21-vip 192.168.10.24 d2-dbrac22-vip 192.168.10.25 dbrac-scan 192.168.10.20 dbrac-scan --查看ip \[root@d2-dbrac21 \~\]# ip addr \| grep ens192 2: ens192: \ mtu 1500 qdisc mq state UP group default qlen 1000 inet 192.168.10.21/24 brd 192.168.10.255 scope global noprefixroute ens192 inet 192.168.10.23/24 brd 192.168.10.255 scope global secondary ens192:1 inet 192.168.10.25/24 brd 192.168.10.255 scope global secondary ens192:2 --查看集群设置 \[root@d2-dbrac21 \~\]# srvctl config nodeapps Network 1 exists Subnet IPv4: 192.168.10.0/255.255.255.0/ens192, static Subnet IPv6: Ping Targets: Network is enabled Network is individually enabled on nodes: Network is individually disabled on nodes: VIP exists: network number 1, hosting node d2-dbrac21 VIP Name: d2-dbrac21-vip VIP IPv4 Address: 192.168.10.23 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: VIP exists: network number 1, hosting node d2-dbrac22 VIP Name: d2-dbrac22-vip VIP IPv4 Address: 192.168.10.24 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false ONS is enabled ONS is individually enabled on nodes: ONS is individually disabled on nodes: 只更改 VIP \& SCAN IP 后的/etc/hosts,两个节点都要改 \[root@d2-dbrac21 \~\]# cat /etc/hosts \| grep 'vip\\\|scan' 192.168.10.248 d2-dbrac21-vip 192.168.10.249 d2-dbrac22-vip 192.168.10.225 dbrac-scan 192.168.10.220 dbrac-scan --重启集群节点,两个节点,可以轮流重启 crsctl stop crs crsctl start crs --查看重启后的节点信息,vip 自动更改了 \[root@d2-dbrac21 \~\]# ip addr \| grep ens192 2: ens192: \ mtu 1500 qdisc mq state UP group default qlen 1000 inet 192.168.10.21/24 brd 192.168.10.255 scope global noprefixroute ens192 inet 192.168.10.248/24 brd 192.168.10.255 scope global secondary ens192:1 inet 192.168.10.20/24 brd 192.168.10.255 scope global secondary ens192:2 \[root@d2-dbrac22 \~\]# ip ad \| grep ens192 2: ens192: \ mtu 1500 qdisc mq state UP group default qlen 1000 inet 192.168.10.22/24 brd 192.168.10.255 scope global noprefixroute ens192 inet 192.168.10.249/24 brd 192.168.10.255 scope global secondary ens192:1 inet 192.168.10.20/24 brd 192.168.10.255 scope global secondary ens192:2 --查看集群中节点信息 \[root@d2-dbrac21 \~\]# srvctl config nodeapps Network 1 exists Subnet IPv4: 192.168.10.0/255.255.255.0/ens192, static Subnet IPv6: Ping Targets: Network is enabled Network is individually enabled on nodes: Network is individually disabled on nodes: VIP exists: network number 1, hosting node d2-dbrac21 VIP Name: d2-dbrac21-vip VIP IPv4 Address: 192.168.10.248 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: VIP exists: network number 1, hosting node d2-dbrac22 VIP Name: d2-dbrac22-vip VIP IPv4 Address: 192.168.10.249 VIP IPv6 Address: VIP is enabled. VIP is individually enabled on nodes: VIP is individually disabled on nodes: ONS exists: Local port 6100, remote port 6200, EM port 2016, Uses SSL false ONS is enabled ONS is individually enabled on nodes: ONS is individually disabled on nodes: ### 修改scan-ip --停止监听 srvctl stop scan_listener srvctl stop scan --查看更改前的scan srvctl config scan \[root@d2-dbrac21 \~\]# srvctl config scan SCAN name: dbrac-scan, Network: 1 Subnet IPv4: 192.168.10.0/255.255.255.0/ens192, static Subnet IPv6: SCAN 1 IPv4 VIP: 192.168.10.20 SCAN VIP is enabled. SCAN 2 IPv4 VIP: 192.168.10.25 SCAN VIP is enabled. --修改在CRS中SCAN的配置 srvctl modify scan -n dbrac-scan --验证修改结果 srvctl config scan \[root@d2-dbrac21 \~\]# srvctl config scan SCAN name: dbrac-scan, Network: 1 Subnet IPv4: 192.168.10.0/255.255.255.0/ens192, static Subnet IPv6: SCAN 1 IPv4 VIP: 192.168.10.225 SCAN VIP is enabled. SCAN 2 IPv4 VIP: 192.168.10.220 SCAN VIP is enabled. --启动监听,启动scan listener时候,自动把scan也给启动了 srvctl start scan_listener --查看启动后状态 srvctl status scan_listener srvctl status scan \[root@d2-dbrac21 \~\]# srvctl status scan_listener SCAN Listener LISTENER_SCAN1 is enabled SCAN listener LISTENER_SCAN1 is running on node d2-dbrac22 SCAN Listener LISTENER_SCAN2 is enabled SCAN listener LISTENER_SCAN2 is running on node d2-dbrac21 \[root@d2-dbrac21 \~\]# srvctl status scan SCAN VIP scan1 is enabled SCAN VIP scan1 is running on node d2-dbrac22 SCAN VIP scan2 is enabled SCAN VIP scan2 is running on node d2-dbrac21 --查看ip ip addr \| grep ens192 \[root@d2-dbrac21 \~\]# ip addr \| grep ens192 2: ens192: \ mtu 1500 qdisc mq state UP group default qlen 1000 inet 192.168.10.21/24 brd 192.168.10.255 scope global noprefixroute ens192 inet 192.168.10.248/24 brd 192.168.10.255 scope global secondary ens192:1 inet 192.168.10.220/24 brd 192.168.10.255 scope global secondary ens192:2 --查看集群中scan信息 \[root@d2-dbrac21 \~\]# srvctl config scan SCAN name: dbrac-scan, Network: 1 Subnet IPv4: 192.168.10.0/255.255.255.0/ens192, static Subnet IPv6: SCAN 1 IPv4 VIP: 192.168.10.225 SCAN VIP is enabled. SCAN 2 IPv4 VIP: 192.168.10.220 SCAN VIP is enabled.

相关推荐
haven-85226 分钟前
duckdb不支持向量
数据库·oracle
半点闲2 小时前
解决Oracle PL/SQL中“表或视图不存在“错误的完整指南
数据库·sql·oracle·pl/sql
Pasregret12 小时前
04-深入解析 Spring 事务管理原理及源码
java·数据库·后端·spring·oracle
jnrjian13 小时前
归档重做日志archived log (明显) 比redo log重做日志文件小
数据库·oracle
TDengine (老段)13 小时前
TDengine 中的命名与边界
大数据·数据库·物联网·oracle·时序数据库·tdengine·iotdb
dogplays15 小时前
dbeaver无法连接Oracle报错:ORA-17800、ORA-12514
数据库·oracle
爱的叹息1 天前
详解隔离级别(4种),分别用表格展示问题出现的过程及解决办法
数据库·oracle
Arbori_262151 天前
oracle常用sql
数据库·sql·oracle
Tyler先森2 天前
Oracle数据库数据编程SQL<3.5 PL/SQL 存储过程(Procedure)>
数据库·sql·oracle
Albert Tan2 天前
Oracle 10G DG 修复从库-磁盘空间爆满导致从库无法工作
数据库·oracle