[DRBD-user] DRBD 2 groups in drbd.conf

AdMod admods at gmail.com
Tue Apr 17 07:42:56 CEST 2007

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


Hi,

Your drbd.conf with 2 groups would look like this:
====================
global {
    # we want to be able to use up to 2 drbd devices
    minor-count 2;
    dialog-refresh 1; # 5 seconds
}

resource r0 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 2 ; halt -f";

  startup {
    wfc-timeout  0;
    degr-wfc-timeout 120;    # 2 minutes.
  }

  disk {
    on-io-error   detach;
  }

  syncer {
    rate 10M;
    group 1;
    al-extents 257; # must be a prime number
  }

  net {
    max-buffers     2048;
    ko-count 4;
    on-disconnect reconnect;
  }

  on drbd1 {
    device     /dev/drbd0;
    disk       /dev/sda2;
    address    192.168.1.69:7788;
    meta-disk  internal;
  }

  on drbd2 {
    device    /dev/drbd0;
    disk      /dev/sda2;
    address   192.168.1.73:7788;
    meta-disk internal;
  }
}

resource r1 {
  protocol C;
  incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 2 ; halt -f";

  startup {
    wfc-timeout  0;
    degr-wfc-timeout 120;    # 2 minutes.
  }

  disk {
    on-io-error   detach;
  }

  syncer {
    rate 10M;
    group 2;
    al-extents 257; # must be a prime number
  }

  net {
    max-buffers     2048;
    ko-count 4;
    on-disconnect reconnect;
  }

  on drbd1 {
    device     /dev/drbd1;
    disk       /dev/sda3;
    address    192.168.1.69:7789;
    meta-disk  internal;
  }

  on drbd2 {
    device    /dev/drbd1;
    disk      /dev/sda3;
    address   192.168.1.73:7789;
    meta-disk internal;
  }
}
====================


On Monday 16 April 2007, prashant wrote:
> Hi All,
>
> Any one know how to have 2 groups in a single drbd.conf
>
> I am using DRBD  Version: 0.7.23 (api:79)
>
> That is
> Group1 - managing resources /dev/drbd0 and mounting it as primary on node1
> Group2 -  managing /dev/drbd1and mounting it as primary on node 2
>
> My current drbd.conf with only one group
>
> If this can be done please send me some some hints - if not please tell
> me why?
>
> Many thanks





More information about the drbd-user mailing list