scan ip的手动切换

检查RAC的状态,从状态信息可以看到scan_listener 运行在rac-1节点。

[grid@rac-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.LISTENER_RAC.lsnr
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ORADATA.dg
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ORC_VOTE.dg
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.asm
               ONLINE  ONLINE       rac-1                    Started            
               ONLINE  ONLINE       rac-2                    Started            
ora.gsd
               OFFLINE OFFLINE      rac-1                                       
               OFFLINE OFFLINE      rac-2                                       
ora.net1.network
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ons
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.registry.acfs
               OFFLINE OFFLINE      rac-1                                       
               ONLINE  ONLINE       rac-2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac-1
                                       
ora.cvu
      1        ONLINE  ONLINE       rac-1                                       
ora.oc4j
      1        ONLINE  ONLINE       rac-1                                       
ora.oratest.db
      1        ONLINE  ONLINE       rac-2                    Open               
      2        ONLINE  ONLINE       rac-1                    Open               
ora.rac-1.vip
      1        ONLINE  ONLINE       rac-1                                       
ora.rac-2.vip
      1        ONLINE  ONLINE       rac-2                                       
ora.scan1.vip
      1        ONLINE  ONLINE       rac-1                                       
[grid@rac-1 ~]$

进一步确认scan ip 和 scan listener 运行在那个节点

[grid@rac-1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac-1

[grid@rac-1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac-1

从信息看,scan ip 运行在rac-1 节点。下面手动将scan ip 切换到rac-2 节点

我们将使用srvctl relocate scan_listener命令,下面是这个命令的帮助文档

[grid@rac-1 ~]$ srvctl relocate scan_listener -help

Temporarily relocate SCAN listener from one node of the cluster to another.

Usage: srvctl relocate scan_listener -i [-n ]
    -i Ordinal number of IP address
    -n            SCAN VIP node name
    -h                       Print usage
[grid@rac-1 ~]$

执行该命令

[grid@rac-1 ~]$ srvctl relocate scan_listener -i 1 -n rac-2

检查scan ip 信息,发现scan ip 已经运行在rac-2节点了。

[grid@rac-1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac-2

[grid@rac-1 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac-2

[grid@rac-1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.LISTENER_RAC.lsnr
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ORADATA.dg
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ORC_VOTE.dg
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.asm
               ONLINE  ONLINE       rac-1                    Started            
               ONLINE  ONLINE       rac-2                    Started            
ora.gsd
               OFFLINE OFFLINE      rac-1                                       
               OFFLINE OFFLINE      rac-2                                       
ora.net1.network
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.ons
               ONLINE  ONLINE       rac-1                                       
               ONLINE  ONLINE       rac-2                                       
ora.registry.acfs
               OFFLINE OFFLINE      rac-1                                       
               ONLINE  ONLINE       rac-2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac-2                                       
ora.cvu
      1        ONLINE  ONLINE       rac-1                                       
ora.oc4j
      1        ONLINE  ONLINE       rac-1                                       
ora.oratest.db
      1        ONLINE  ONLINE       rac-2                    Open               
      2        ONLINE  ONLINE       rac-1                    Open               
ora.rac-1.vip
      1        ONLINE  ONLINE       rac-1                                       
ora.rac-2.vip
      1        ONLINE  ONLINE       rac-2                                       
ora.scan1.vip
      1        ONLINE  ONLINE       rac-2                                       
[grid@rac-1 ~]$

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11590946/viewspace-1069318/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11590946/viewspace-1069318/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值