当前位置: 首页 > article >正文

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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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: <BROADCAST,MULTICAST,UP,LOWER_UP> 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.


http://www.kler.cn/a/288086.html

相关文章:

  • Prometheus监控SQL SERVER常用指标和PromQL预警
  • RabbitMQ实战启程:从原理到部署的全方位探索(上)
  • C/C++语言基础--initializer_list表达式、tuple元组、pair对组简介
  • SpringBoot整合Mybatis-Plus实践汇总
  • 接口文档的编写
  • Python sys模块介绍
  • 栈和队列算法题
  • zeppline如何配置用户登陆
  • 【Tools】如何评价黑悟空这款游戏
  • 等保测评:如何有效进行安全事件响应
  • 车辆远控功能自动化测试方案:打造高效可靠的测试流程
  • 每天一个数据分析题(五百一十三)- 决策树算法
  • 基于深度学习的稀疏训练
  • JSON的基础使用
  • 去中心化身份验证:Web3时代数字身份的革新
  • 网络安全售前入门10安全服务——安全培训服务
  • 08-Python 中的 `print()` 函数详解及高级用法
  • 删除字符串中所有相邻重复项
  • 微服务架构
  • 公网信息泄露监测(网盘、暗网、搜索引擎、文档平台)思路分享
  • 深入理解 Java 中的 Collections 工具类
  • Fabric.js Canvas:核心配置与选项解析
  • Byte Pair Encoding(BPE)算法原理以及其python实现
  • 大语言模型算力优化策略:基于并行化技术的算力共享平台研究
  • BugKu练习记录:你喜欢下棋吗
  • 常见的锁策略