oracle 10g rac 撥公網網線和私網網線物理測試

paulyibinyi發表於2009-12-11

oracle 10g rac 撥公網網線和私網網線物理測試
測試環境aix+ oracle 10g rac
資料庫版本 oracle 10g 10.2.0.4
一. 撥公網網線測試
1.拔掉p595a2節點公網網線
[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.fk.db   application    ONLINE    ONLINE    p595a2     
ora....k1.inst application    ONLINE    ONLINE    p595a2     
ora....k2.inst application    ONLINE    ONLINE    p595b2     
ora....SM1.asm application    ONLINE    ONLINE    p595a2     
ora....A2.lsnr application    ONLINE    ONLINE    p595a2     
ora.p595a2.gsd application    ONLINE    ONLINE    p595a2     
ora.p595a2.ons application    ONLINE    ONLINE    p595a2     
ora.p595a2.vip application    ONLINE    OFFLINE              
ora....SM2.asm application    ONLINE    ONLINE    p595b2     
ora....B2.lsnr application    ONLINE    ONLINE    p595b2     
ora.p595b2.gsd application    ONLINE    ONLINE    p595b2     
ora.p595b2.ons application    ONLINE    ONLINE    p595b2     
ora.p595b2.vip application    ONLINE    ONLINE    p595b2   

vip offline


[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.fk.db   application    ONLINE    ONLINE    p595a2     
ora....k1.inst application    ONLINE    ONLINE    p595a2     
ora....k2.inst application    ONLINE    ONLINE    p595b2     
ora....SM1.asm application    ONLINE    ONLINE    p595a2     
ora....A2.lsnr application    ONLINE    OFFLINE              
ora.p595a2.gsd application    ONLINE    ONLINE    p595a2     
ora.p595a2.ons application    ONLINE    ONLINE    p595a2     
ora.p595a2.vip application    ONLINE    ONLINE    p595b2     
ora....SM2.asm application    ONLINE    ONLINE    p595b2     
ora....B2.lsnr application    ONLINE    ONLINE    p595b2     
ora.p595b2.gsd application    ONLINE    ONLINE    p595b2     
ora.p595b2.ons application    ONLINE    ONLINE    p595b2     
ora.p595b2.vip application    ONLINE    ONLINE    p595b2     

vip發生切換,飄到p595b2節點上,p595a2 listener offline

其他資源正常


2.恢復p595a2節點公網網線

[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.fk.db   application    ONLINE    ONLINE    p595a2     
ora....k1.inst application    ONLINE    ONLINE    p595a2     
ora....k2.inst application    ONLINE    ONLINE    p595b2     
ora....SM1.asm application    ONLINE    ONLINE    p595a2     
ora....A2.lsnr application    ONLINE    OFFLINE              
ora.p595a2.gsd application    ONLINE    ONLINE    p595a2     
ora.p595a2.ons application    ONLINE    ONLINE    p595a2     
ora.p595a2.vip application    ONLINE    ONLINE    p595b2     
ora....SM2.asm application    ONLINE    ONLINE    p595b2     
ora....B2.lsnr application    ONLINE    ONLINE    p595b2     
ora.p595b2.gsd application    ONLINE    ONLINE    p595b2     
ora.p595b2.ons application    ONLINE    ONLINE    p595b2     
ora.p595b2.vip application    ONLINE    ONLINE    p595b2 

p595a2 listener 還是offline vip沒切換回來,還是在p595b節點上
vip服務和listener服務並不會自動啟動,這兩個服務需要手工啟動
用以下命令啟動listener服務和vip服務
srvctl start listener -n p595a2

也可以用crs_relocate手工將vip漂移回來
crs_relocate ora.p595a2.vip -c p595a2
然後p595a2 listener會自動起來

 

[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.fk.db   application    ONLINE    ONLINE    p595a2     
ora....k1.inst application    ONLINE    ONLINE    p595a2     
ora....k2.inst application    ONLINE    ONLINE    p595b2     
ora....SM1.asm application    ONLINE    ONLINE    p595a2     
ora....A2.lsnr application    ONLINE    ONLINE    p595a2     
ora.p595a2.gsd application    ONLINE    ONLINE    p595a2     
ora.p595a2.ons application    ONLINE    ONLINE    p595a2     
ora.p595a2.vip application    ONLINE    ONLINE    p595a2     
ora....SM2.asm application    ONLINE    ONLINE    p595b2     
ora....B2.lsnr application    ONLINE    ONLINE    p595b2     
ora.p595b2.gsd application    ONLINE    ONLINE    p595b2     
ora.p595b2.ons application    ONLINE    ONLINE    p595b2     
ora.p595b2.vip application    ONLINE    ONLINE    p595b2  

結論
和metalink解釋一致。

Prior to 10.2.0.3

What happens on public network adapter failure? This list does not represent the exact sequence of events.
The VIP resource is relocated to another node in the cluster
The Listener resource is taken offline
The RAC database instance is taken offline
The ASM instance, if present, is taken offline
The ASM instance, if present, and RAC database instances deregister with the other listeners in the cluster

Post 10.2.0.3 patchset

What happens on public network adapter failure? This list does not represent the exact sequence of events.
The VIP resource is relocated to another node in the cluster
The Listener resource is taken offline
The RAC database instance stays up and blocked for general operations
The ASM instance, if present, stays up
The ASM instance, if present, and RAC database instances deregister with the other listeners in the cluster

What happens when the Public adapter comes back?
The VIP will be relocated back to its host node, this will happen the next time Oracle Clusterware checks the instance.
This check is carried out, by default, every 600 seconds so this is the maximum amount of time that could pass before
the relocate is triggered.
The VIP can manually be relocated back to its home node using the srvctl start nodeapps –n command.

二. 撥私網網線測試
1.拔掉p595a2或p595b2節點私網網線

均會導致p595b2節點自動重啟,這是oracle crs保護機制
會保留master節點,即first node join the cluster
I have a 2-node RAC running. I notice that it is always node2 that is evicted when I test private network failure
scenario by disconnecting the private network cable.
Doesn't matter whether it is node1's or node2's private network cable that is disconnected, it is always the node2 that is evicted.
What happens in a 3-nodes RAC cluster if node1's cable is disconnected?
The node with the lower node number will survive(The first node to join the cluster). In case of 3 nodes,
2 nodes will survive and the one you pulled the cable will go away. 4 nodes - the sub cluster with the lower node number will survive.

為了提高私網的可用性,建議網路卡繫結。

 

 

 

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

相關文章