[DRBD-user] automaticly split brain recovery.. my scenario

Peter den Hartog peterdenhartog at gmail.com
Wed Mar 24 12:20:23 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 and thank you for reading this..

I have the following situation:
I have xen cloud running on 8 servers, and nfs+drbd+heartbeat on 2

The VM's get streamed from the NFS share, to the xen cloud. So far so good,
this works great.

When server-1 fails, the virtual machines of the xen cloud keep on working
perfectly, because well.. there is 1 primary server-2, with the correct
But! when i reconnect the other server, you get a split-brain, Now what i
would like to do is, that server-2 stays the primary, server-1 get's synced
again and stays secundary.
But what i see now, is that when i don't change files on the server,
server-1 becomes primary and 2 becomes primary. The nfs share is offline for
to long, and my VM's crash.
But when the data does change, while server-1 is down, server-2 stays
primary, and server-1 reboots and become secundary.. This is what i want,
but then for every network crash.

So what i basicly want is this: the server with the most up to data, stays
primary, and the other one becomes secundary.

Anybody can help me with the config file i'm using?


*I'm fully aware that this is bad to use, but it's a situation where people
are unable to reach the servers when something goes wrong, so i need
auto-recovery from split brain.*

the config file:
nfs-1:~# cat /etc/drbd.conf
global {
usage-count yes;
common {
  syncer { rate 10M; }

resource r0 {
  protocol C;
  handlers {
  startup {
    degr-wfc-timeout 10;    # 2 minutes.
    become-primary-on nfs-1;
  disk {
    on-io-error   detach;

  net {
    after-sb-0pri discard-least-changes;
    after-sb-1pri discard-secondary;
    after-sb-2pri violently-as0p;
    rr-conflict violently;

  syncer {
    rate 100M;
    al-extents 257;

on nfs-1 {
    device /dev/drbd0;
    disk /dev/sdb1;
    meta-disk internal;

on nfs-2 {
    device /dev/drbd0;
    disk /dev/sdb1;
    meta-disk internal;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100324/e3a327d1/attachment.htm>

More information about the drbd-user mailing list