[DRBD-user] Three nodes configuration (chained)

Ehud Karni ehud at unix.mvs.co.il
Tue Apr 21 13:59:21 CEST 2009

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


I have configured a three node DRBD in a chained way. In theory it can
be enlarged to any number of nodes.

This is the nodes topography:

 source   2nd (non-stacked) --\
    |             |           |
    \----->   (stacked)       \---->  3rd target

In theory it can be chained to more targets:

 source   2nd (non-stacked) --\   3rd (non-stacked) --\
    |             |           |           |           |
    \----->   (stacked)       \---->  (stacked)       \----> 4th target


Below is the working drbd.conf (the source is sw-nfs, the 2nd is bu-pro2,
the 3rd is rmt-fs, in a remote location)

Ehud.



global {
    usage-count no;
}

common {
  protocol A;

  startup {
    wfc-timeout  60;
  }

  disk {
      on-io-error  pass_on ;
  }

  net {
    # this is the size of the tcp socket send buffer increase it _carefully_ !!
    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     4096;
    unplug-watermark   2048;

    # The highest number of data blocks between two write barriers.
    # max-epoch-size     2048;

    data-integrity-alg "md5";

  }

  syncer {
    verify-alg md5 ;

    # Configures the size of the active set. Each extent is 4M,
    # 257 Extents ~> 1GB active set size.
    # BTW, the hash algorithm works best if the number of al-extents is prime.
    al-extents  499;

  }

}

resource rmt {
  disk {
    ## stack size 1459913168 K
    ##  meta size     262144 K (256 MB)
             size 1460175312K;
           no-md-flushes ;
  }

  startup {
    become-primary-on bu-pro2 ;
  }

  # rate is given in units of _byte_ not bit
  syncer {
    rate 15M ;
  }

  on bu-pro2 {
    device     /dev/drbd0;
    disk       /dev/sdb1;
    address    10.253.0.84:7789;
    meta-disk  /dev/sda4[1];
  }

  on rmt-fs {
    device     /dev/drbd0;
    disk       /dev/md_d0p2;
    address    10.253.144.87:7788;
    meta-disk  /dev/cciss/c0d0p3[0];
  }

}


resource lcl {
  disk {
    size 1459913168K;
  }

  startup {
    become-primary-on  sw-nfs ;
  }

  # rate is given in units of _byte_ not bit
  syncer {
    rate 30M ;
  }

  on sw-nfs {
    device     /dev/drbd0;
    disk       /dev/sdb;
    address    10.253.239.1:7789;
    meta-disk  internal;
  }

  stacked-on-top-of rmt {
    device     /dev/drbd1;
    address    10.253.239.2:7788;
  }

}




--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry



More information about the drbd-user mailing list