[DRBD-user] Primary/Primary mode does not work as excepted

Patrick Matthäi matthaei at ameus.de
Thu Jan 14 10:42:17 CET 2010

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello list,

I have got the following configuration (tested out with drbd version 2:8.3.2-1~bpo50+1 and  2:8.0.14-2) on two Debian Lenny/amd64 servers:

global { usage-count no; }
common {
        protocol C;
   startup {
     become-primary-on both;
     wfc-timeout       60;
     degr-wfc-timeout  60;
   }
   disk { on-io-error   detach; }
   net {
     allow-two-primaries;
     after-sb-0pri discard-younger-primary;
     after-sb-1pri discard-secondary;
     after-sb-2pri call-pri-lost-after-sb;
   }
}
resource r0 {
  disk {
        fencing resource-only;
        on-io-error   detach;
  }
  syncer {
        rate 100M;
        al-extents 257;
   }
  net {
    after-sb-0pri disconnect;
    after-sb-1pri disconnect;
    after-sb-2pri disconnect;
    rr-conflict disconnect;
  }
  handlers {
    pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt  f";
    pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt f";
    local-io-error "echo o > /proc/sysrq-trigger ; halt f";
    outdate-peer "/usr/lib/heartbeat/drbd-peer-outdater -t 5";
  }
  startup {
    degr-wfc-timeout 120;    # 2 minutes.
    become-primary-on both;
  }
  on mysql1 {
        device  /dev/drbd0;
        disk    /dev/sda4;
        address 192.168.123.6:7789;
        meta-disk       internal;
        }
  on mysql2 {
        device  /dev/drbd0;
        disk    /dev/sdb1;
        address 192.168.123.17:7789;
        meta-disk       internal;
}


In the primary/secondary mode, everything is perfect, but if I use the primary/primary mode and do the following, it fails:


·         Create a file foo.txt on mysql1

·         Create a file blubb.txt on mysql2

·         On both nodes, the file of the other one does not appear

·         If I umount the device, wait a few seconds and mount it again, the file foo.txt (created on mysql1) appears on mysql2

·         The file blubb.txt (created on mysql2) is deleted on both hosts

/proc/drbd looks everytime good.

For example:
mysql1:~# cat /proc/drbd
version: 8.3.2 (api:88/proto:86-90)
GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by phil at fat-tyre, 2009-07-03 15:35:39
 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r---n
    ns:4343908 nr:108 dw:4344016 dr:3337 al:4530 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0

mysql2:~# cat /proc/drbd
version: 8.3.2 (api:88/proto:86-90)
GIT-hash: dd7985327f146f33b86d4bff5ca8c94234ce840e build by phil at fat-tyre, 2009-07-03 15:35:39
 0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r----
    ns:108 nr:4343908 dw:4344016 dr:648 al:3 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0


Any ideas?


Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100114/679d9675/attachment.htm>


More information about the drbd-user mailing list