oracle rac 添加SCAN IP
因现场应用需要,需要对新配置的oracle RAC环境增配2个scanIP地址,10.138.129.106以及10.138.129.107。
配置前情况:
[ ~]$ srvctl config scan ----查看scan的配置信息
SCAN name: scan-ip, Network: 1/10.138.129.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /scan-ip/10.138.129.105
[ ~]$ srvctl status scan ----查看scan的状态以及scan ip所处节点
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node db1
[ ~]$ srvctl config scan_listener ----查看scan listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
默认情况下配置RAC 只有1个scan IP,1个 scan listener。
进入主题,开始增配scan ip
1、修改rac所有节点的/etc/hosts信息
[ ~]$ cat /etc/hosts
127.0.0.1 localhost
10.138.129.101 db1
10.138.129.102 db2
10.138.129.103 db1-vip
10.138.129.104 db2-vip
10.138.129.105 scan-ip
10.138.129.106 scan-ip ---------新增的scanIP
10.138.129.107 scan-ip ---------新增的scanIP
192.168.20.1 db1-priv
192.168.20.2 db2-priv
2、停止scan 监听,注意先听监听才能停scan
[ ~]$ srvctl stop scan_listener
[ ~]$ srvctl stop scan
[ ~]$srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
3、配置scan,注意需要用root权限执行
[ bin]# pwd
/u01/app/11.2.0/grid/bin
[ bin]# ./srvctl modify scan -n scan-ip -----修改scan信息,-n 后面接 hosts中的san ip 网络名
[ bin]# ./srvctl modify scan_listener -u ------添加scanIP的监听,若不执行该命令,将只有一个listener_scan1监听,执行后将根据scan ip数自动增加listener_scan2,listener_scan3.
4、启动scan
[ ~]$ srvctl start scan
[ ~]$ srvctl start scan_listener
[ ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node db1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node db2
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node db1
[ ~]$ srvctl config scan
SCAN name: scan-ip, Network: 1/10.138.129.0/255.255.255.0/eth2
SCAN VIP name: scan1, IP: /scan-ip/10.138.129.105
SCAN VIP name: scan2, IP: /scan-ip/10.138.129.106
SCAN VIP name: scan3, IP: /scan-ip/10.138.129.107
[ ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node db1
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node db2
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node db1
————————————————
版权声明:本文为CSDN博主「orabing」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/orabing/article/details/53371010