当drbd出现裂脑问题,如

[root@test3 ~]# cat /proc/drbd
version: 8.3.8 (api:88/proto:86-94)
GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by [email protected]
 
2010-06-04 08:04:16
 0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r----
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:336
 
解决方案如下:
解决裂脑之前,先保证主备的数据一致。
先选择好一个备机
在备机上执行
 
 
 
 
drbdadm secondary resource      
drbdadm -- --discard-my-data connect resource
 
######reource说明################
#resource是drbd.conf中定义的资源
resource data {
  protocol C;
 
  disk {
    on-io-error   detach;
  }
 
data就是resource
######reource说明################
然后在主上执行
drbdadm connect data
 
 
检查
[root@test2 data0]# cat /proc/drbd
version: 8.3.8 (api:88/proto:86-94)
GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by [email protected]
 
2010-06-04 08:04:16
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r----
    ns:420 nr:0 dw:256 dr:757 al:5 bm:9 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
 
[root@test3 ~]# cat /proc/drbd
version: 8.3.8 (api:88/proto:86-94)
GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by [email protected]
 
2010-06-04 08:04:16
 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----
    ns:0 nr:420 dw:420 dr:0 al:0 bm:9 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
 
OK!!!正常了
 
drbd官方对split-brain说明和手工修复 
http://www.drbd.org/users-guide/s-resolve-split-brain.html 

自动修复 
http://www.drbd.org/users-guide/s-split-brain-notification-and-recovery.html 
http://www.drbd.org/users-guide/s-configure-split-brain-behavior.html#s-automatic-split-brain-recovery-configuration