[DRBD-user] Primary/Primary - want to force primary on one

Theophanis Kontogiannis theophanis_kontogiannis at yahoo.gr
Tue Apr 1 15:00:00 CEST 2008

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


Hello all,

I have drbd8 and two nodes running primary/primary.

I would like if one node never boots up, to make the other one Primary after
some time.

Is it possible?

Following is my config with which now if I only boot one node I get forever:

version: 8.2.5 (api:88/proto:86-88)
GIT-hash: 9faf052fdae5ef0c61b4d03890e2d2eab550610c build by bachbuilder@,
2008-03-23 14:14:24
 0: cs:WFConnection st:Secondary/Unknown ds:Consistent/DUnknown C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:252 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0
 1: cs:WFConnection st:Secondary/Unknown ds:Consistent/DUnknown C r---
    ns:0 nr:0 dw:0 dr:0 al:0 bm:93 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:0 misses:0 starving:0 dirty:0 changed:0
        act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0 changed:0

Thank you all for your time,

Theophanis Kontogiannis


CONFIG:

#
# drbd.conf 

global {
    # minor-count 64;

    # dialog-refresh 5; # 5 seconds

    # disable-ip-verification;

    usage-count yes;
}

common {

  protocol C;

  syncer {

    rate 30M;

    #after "r2";

    al-extents 257;
  }


 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/drbd/outdate-peer.sh on tweety1 192.168.1.251
10.254.254.253 on tweety2 192.168.1.252 10.254.254.254";

outdate-peer "/sbin/obliterate";

    # The node is currently primary, but should become sync target
    # after the negotiating phase. Alert someone about this incident.

    pri-lost "echo pri-lost. Have a look at the log files. | mail -s 'DRBD
Alert' root
";

    # Notify someone in case DRBD split brained.

    split-brain "echo split-brain. drbdadm -- --discard-my-data connect
$DRBD_RESOURCE
 ? | mail -s 'DRBD Alert' root";

  }

  startup {

     wfc-timeout  200;


    degr-wfc-timeout 120;    # 2 minutes.

   wait-after-sb;

    become-primary-on both;

  }

  disk {

    #on-io-error   pass-on;

    fencing resource-only;

    # size 10G;
  }

  net {

    # sndbuf-size 512k;

     timeout       60;    #  6 seconds  (unit = 0.1 seconds)
     connect-int   10;    # 10 seconds  (unit = 1 second)
     ping-int      10;    # 10 seconds  (unit = 1 second)
     ping-timeout   5;    # 500 ms (unit = 0.1 seconds)

     max-buffers     2048;

    # unplug-watermark   128;

     max-epoch-size  2048;

     ko-count 10;

    allow-two-primaries;

    cram-hmac-alg "sha1";
    shared-secret "tweety";

    after-sb-0pri discard-least-changes;
    after-sb-0pri discard-younger-primary;
    after-sb-0pri discard-older-primary;

    after-sb-1pri violently-as0p;

    after-sb-2pri violently-as0p;

    rr-conflict call-pri-lost;

    #data-integrity-alg "crc32c";

  }


}

resource r0 {

        device          /dev/drbd0;
        disk            /dev/hda4;
        meta-disk       internal;

 on tweety1 { address   192.168.1.251:7788; }

 on tweety2 { address   192.168.1.252:7788; }

}

resource r1 {

        device        /dev/drbd1;
        disk          /dev/hdb4;
        meta-disk     internal;

  on tweety1 { address  192.168.1.251:7789; }

  on tweety2 { address  192.168.1.252:7789; }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20080401/2fa9cacb/attachment.htm>


More information about the drbd-user mailing list