oracle 11gR2 修改 DNS 方式 SCAN IP

paulyibinyi發表於2010-07-24

   這篇文章介紹11gR2環境下如何修改dns環境下的scan ip

以下例子為將

192.168.3.231,192.168.3.232,192.168.3.233

改為

192.168.3.234,192.168.3.235,192.168.3.236

以下為具體實施過程:

[root@rac1 bin]# nslookup racnode-cluster-scan.racnode.com
Server:         192.168.3.32
Address:        192.168.3.32#53

Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.231
Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.232
Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.233

1.檢查目前scan ip環境
[root@rac1 bin]# nslookup racnode-cluster-scan.racnode.com
Server:         192.168.3.32
Address:        192.168.3.32#53

Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.236
Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.235
Name:   racnode-cluster-scan.racnode.com
Address: 192.168.3.234


[grid@rac1 trace]$ srvctl config scan
SCAN name: racnode-cluster-scan.racnode.com, Network: 1/192.168.3.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.3.231/192.168.3.231
SCAN VIP name: scan2, IP: /192.168.3.233/192.168.3.233
SCAN VIP name: scan3, IP: /192.168.3.232/192.168.3.232
[grid@rac1 trace]$

srvctl config scan_listener
[root@rac1 bin]# ./srvctl modify scan -n racnode-cluster-scan.racnode.com
[root@rac1 bin]#

[grid@rac1 trace]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[grid@rac1 trace]$

2.停止scan ip
[grid@rac1 trace]$ srvctl stop scan_listener
[grid@rac1 trace]$ srvctl stop scan
[grid@rac1 trace]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.ASM_DG.dg  ora....up.type ONLINE    ONLINE    rac1       
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1       
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora....N1.lsnr ora....er.type OFFLINE   OFFLINE              
ora....N2.lsnr ora....er.type OFFLINE   OFFLINE              
ora....N3.lsnr ora....er.type OFFLINE   OFFLINE              
ora.TESTDG.dg  ora....up.type ONLINE    ONLINE    rac1       
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1       
ora.gsd        ora.gsd.type   ONLINE    ONLINE    rac1       
ora....network ora....rk.type ONLINE    ONLINE    rac1       
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac1       
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    ONLINE    rac2       
ora....C2.lsnr application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    ONLINE    ONLINE    rac2       
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2       
ora.racdb.db   ora....se.type ONLINE    ONLINE    rac1       
ora....est.svc ora....ce.type ONLINE    ONLINE    rac1       
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1       
ora.scan1.vip  ora....ip.type OFFLINE   OFFLINE              
ora.scan2.vip  ora....ip.type OFFLINE   OFFLINE              
ora.scan3.vip  ora....ip.type OFFLINE   OFFLINE              
[grid@rac1 trace]$

[grid@rac1 trace]$ crsctl status resource -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASM_DG.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.DATA.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.TESTDG.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.asm
               ONLINE  ONLINE       rac1                     Started            
               ONLINE  ONLINE       rac2                     Started            
ora.eons
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.gsd
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.net1.network
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.ons
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.registry.acfs
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        OFFLINE OFFLINE                                                  
ora.LISTENER_SCAN2.lsnr
      1        OFFLINE OFFLINE                                                  
ora.LISTENER_SCAN3.lsnr
      1        OFFLINE OFFLINE                                                  
ora.oc4j
      1        ONLINE  ONLINE       rac1                                        
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                        
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                        
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open               
      2        ONLINE  ONLINE       rac2                     Open               
ora.racdb.test.svc
      1        ONLINE  ONLINE       rac1                                        
      2        ONLINE  ONLINE       rac2                                        
ora.scan1.vip
      1        OFFLINE OFFLINE                                                  
ora.scan2.vip
      1        OFFLINE OFFLINE                                                  
ora.scan3.vip
      1        OFFLINE OFFLINE                                                  
[grid@rac1 trace]$

3.檢查scan ip 資源 是否停止

[grid@rac1 trace]$ 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
[grid@rac1 trace]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
[grid@rac1 trace]$

4.root使用者進行修改

[root@rac1 bin]# ./srvctl modify scan -n racnode-cluster-scan.racnode.com
[root@rac1 bin]#

 

5.修改dns伺服器上的ip

  1.dns 域名ip配置進行修改

  2.dhcp ip範圍段進行修改

 

6.確認結果和啟動scan ip
[grid@rac1 trace]$ srvctl config scan
SCAN name: racnode-cluster-scan.racnode.com, Network: 1/192.168.3.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /racnode-cluster-scan.racnode.com/192.168.3.234
SCAN VIP name: scan2, IP: /racnode-cluster-scan.racnode.com/192.168.3.236
SCAN VIP name: scan3, IP: /racnode-cluster-scan.racnode.com/192.168.3.235

[grid@rac1 trace]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
[grid@rac1 trace]$ srvctl start scan
[grid@rac1 trace]$ srvctl start scan_listener
[grid@rac1 trace]$
[grid@rac1 trace]$
[grid@rac1 trace]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.ASM_DG.dg  ora....up.type ONLINE    ONLINE    rac1       
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1       
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac2       
ora....N2.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora....N3.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora.TESTDG.dg  ora....up.type ONLINE    ONLINE    rac1       
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1       
ora.gsd        ora.gsd.type   ONLINE    ONLINE    rac1       
ora....network ora....rk.type ONLINE    ONLINE    rac1       
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    rac1       
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    ONLINE    rac2       
ora....C2.lsnr application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    ONLINE    ONLINE    rac2       
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2       
ora.racdb.db   ora....se.type ONLINE    ONLINE    rac1       
ora....est.svc ora....ce.type ONLINE    ONLINE    rac1       
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1       
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac2       
ora.scan2.vip  ora....ip.type ONLINE    ONLINE    rac1       
ora.scan3.vip  ora....ip.type ONLINE    ONLINE    rac1       
[grid@rac1 trace]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASM_DG.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.DATA.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.TESTDG.dg
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.asm
               ONLINE  ONLINE       rac1                     Started            
               ONLINE  ONLINE       rac2                     Started            
ora.eons
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.gsd
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.net1.network
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.ons
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
ora.registry.acfs
               ONLINE  ONLINE       rac1                                        
               ONLINE  ONLINE       rac2                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac2                                        
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       rac1                                        
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       rac1                                        
ora.oc4j
      1        ONLINE  ONLINE       rac1                                        
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                        
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                        
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open               
      2        ONLINE  ONLINE       rac2                     Open               
ora.racdb.test.svc
      1        ONLINE  ONLINE       rac1                                        
      2        ONLINE  ONLINE       rac2                                        
ora.scan1.vip
      1        ONLINE  ONLINE       rac2                                        
ora.scan2.vip
      1        ONLINE  ONLINE       rac1                                        
ora.scan3.vip
      1        ONLINE  ONLINE       rac1                                        
[grid@rac1 trace]$

可以看到修改後192.168.3.234,192.168.3.235,192.168.3.236段的ip地址已經生效

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-668942/,如需轉載,請註明出處,否則將追究法律責任。

相關文章