RAC之Split brain

hunterjoy發表於2009-04-03
裂腦(split-brain)現象:裂腦是由於叢集中的節點之間無法正常通訊而導致的叢集中出現的不一致的現象
如果出現這種情況,Oracle RAC會終止一個例項,來保證叢集的一致性.

附:
·servera例項down情況下的自動切換實驗:
1.初始狀態:兩臺伺服器的oracle例項均執行
$ srvctl status database -d sddzyj
Instance sddzyj1 is running on node ibmsvr1
Instance sddzyj2 is running on node ibmsvr2

2.在客戶端PC上連線oracle,連線到例項sddzyj2
SQL> conn sys/oracle @sddzyj as sysdba;
已連線。
SQL> select instance_number,instance_name,host_name from v$instance;

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME
--------------- ---------------------------------------------
2 sddzyj2 ibmsvr2

3.stop ractest2
$ srvctl stop instance -d sddzyj -i sddzyj2

$ srvctl status database -d sddzyj
Instance sddzyj1 is running on node ibmsvr1
Instance sddzyj2 is not running on node ibmsvr2

4.客戶端PC的連線自動切換到ractest1,而且不會出現ORA錯誤
SQL> select instance_number,instance_name,host_name from v$instance;

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME
--------------- ---------------------------------------------
1 sddzyj1 ibmsvr1

·servera的public網線斷開時的自動切換實驗:
1.初始狀態:兩臺伺服器的oracle例項均執行
$ srvctl status database -d sddzyj
Instance sddzyj1 is running on node ibmsvr1
Instance sddzyj2 is running on node ibmsvr2
2.在客戶端PC上連線oracle,連線到例項sddzyj2
SQL> conn sys/oracle @sddzyj as sysdba;
已連線。
SQL> select instance_number,instance_name,host_name from v$instance;
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME
--------------- ---------------------------------------------
2 sddzyj2 ibmsvr2
3.斷開ibmsvr2的public埠網線,過一會後,ibmsvr2上的oracle例項sddzyj2會down
$ srvctl status database -d sddzyj
Instance sddzyj1 is running on node ibmsvr1
Instance sddzyj2 is not running on node ibmsvr2
4.客戶端PC的連線丟失,且不能切換到serverb
SQL> select instance_number,instance_name,host_name from v$instance;
select instance_number,instance_name,host_name from v$instance
*
第 1 行出現錯誤:
ORA-03135: 連線失去聯絡
SQL> select instance_number,instance_name,host_name from v$instance;
ERROR:
ORA-03114: 未連線到 ORALCE

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

相關文章