RAC集群调整scan

修改端口

srvctl modify scan_listener -endpoints 1522

1个scan ip调整为3个

[root@gzrac01 ~]# vi /etc/hosts


127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6


10.2.224.4 gzrac01
10.2.224.9 gzrac02
10.2.0.101 gzrac01-pri
10.2.0.102 gzrac02-pri
10.2.224.10 gzrac01-vip
10.22.224.11 gzrac02-vip

10.2.224.12 gzrac-scan
10.2.224.13 gzrac-scan
10.2.224.14 gzrac-scan

~
Entering Ex mode.  Type "visual" to go to Normal mode.


srvctl stop scan_listener -i 1
srvctl stop scan

./srvctl modify scan -n gzrac-scan
./srvctl modify scan_listener -u
./srvctl modify scan_listener -u
./srvctl status scan

SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
./srvctl start scan
./srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node gzrac02
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node gzrac01
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node gzrac01
[root@gzrac01 bin]# ps -ef|grep tns
root        816      2  0 Sep27 ?        00:00:00 [netns]
root      69082  63448  0 14:21 pts/2    00:00:00 grep --color=auto tns
grid     137121      1  0 Sep27 ?        00:00:39 /u01/app/12.2.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid     186819      1  0 Sep27 ?        00:00:03 /u01/app/12.2.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
grid     673935      1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
[root@gzrac01 bin]# srvctl start scan_listener
bash: srvctl: command not found...
[root@gzrac01 bin]# ./srvctl start scan_listener
[root@gzrac01 bin]# ps -ef|grep tns
root        816      2  0 Sep27 ?        00:00:00 [netns]
grid      69664      1  0 14:22 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -no_crs_notify -inherit
grid      69705      1  0 14:22 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN3 -no_crs_notify -inherit
root      69778  63448  0 14:22 pts/2    00:00:00 grep --color=auto tns
grid     137121      1  0 Sep27 ?        00:00:39 /u01/app/12.2.0/grid/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid     186819      1  0 Sep27 ?        00:00:03 /u01/app/12.2.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
grid     673935      1  0 12:06 ?        00:00:00 /u01/app/12.2.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit

为了修改scan,首先要保证SCAN所对应的主机名称和IP地址记录在DNS中,并且在操作系统中应该通过nslookup命令对这个名称解析进行测试。

$srvctl config scan

  1. 调整SCAN配置

srvctl config scan

srvctl status scan

srvctl stop scan_listener   --要先停 

---关闭scan listener方法

srvctl stop scan_listener –i 1 -n

srvctl stop scan

 

 

srvctl stop listener 不加-l选项默认关闭全部监听程序。

 

srvctl status scan_listener

crs_stat -t | grep  scan

 

[root@rac01 bin]# ./srvctl modify scan -n myrac-scan   

[root@rac01 bin]# ./srvctl config scan

SCAN name: myrac-scan, Network: 1/192.168.205.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /myrac-scan/192.168.205.135

SCAN VIP name: scan2, IP: /myrac-scan/192.168.205.133

SCAN VIP name: scan3, IP: /myrac-scan/192.168.205.134

集群状态如下

但是此时只有在节点2上面有listener_scan1,添加listener_scan2

[root@db1 bin]# ./srvctl modify scan_listener -u  

--添加scanIP的监听,若不执行该命令,将只有一个listener_scan1监听,执行后将根据scan 

 

 

srvctl start scan

srvctl start scan_listener

 

验证

[grid@rac01 ~]$ ps -ef|grep tns|grep -v grep

root         10      2  0 19:52 ?        00:00:00 [netns]

grid       4047      1  0 19:55 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit

grid      10428      1  0 20:43 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN2 -inherit

grid      10457      1  0 20:43 ?        00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN3 –inherit

 

lsnrctl status listener_scan3

 

发现2个节点如果配置3个scan ip则扔有3个SCAN LISTENER。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值