next up previous
Next: HA and heartbeat Up: DRBD Previous: DRBD

drbd.conf

After we have started and synced the mirrored devices, we need to set up a configuration file for the boot process /etc/drbd.conf. By correctly configuring this file and using the init.d/drbd script you can easily make drbd come up correctly when a machine boots up.

#
# /etc/drbd.conf

resource drbd0 {
  protocol = C
  fsckcmd = /bin/true
      # if inittimeout is positive will fore primary status if
      # connection could not be established within that time
      # (seconds). *this may compromise your data integrity*
      #
      # a negative value indicates that drbd should stay WFConnection
      # secondary/unknown and just continue the boot process, thus
      # leaving the decision to the cluster manager
      #
      # not given/0: wait until the partner node shows up, or
      # some operator intervenes; do not timeout.
  inittimeout=60
      # skip-wait is actually skip-wait-for-sync ...
      # we wait for connection regardless (but see inittimeout above)
  skip-wait
  disk { disk-size = 66099411 }
      # you can reconfigure the sync rate at runtime using
      # drbdsetup on the primary.
  net {
      sync-nice = 19
      sync-min = 4M
      sync-max = 600M     # if you don't care about network saturation
      tl-size = 5000
      timeout = 60
      connect-int = 10
      ping-int = 10
}

  on campeche {
      device = /dev/nb0
      disk = /dev/sda6
      address = 172.16.1.1
      port = 7788
  }

  on chihuahua {
      device = /dev/nb0
      disk = /dev/sda6
      address = 172.16.1.2
      port = 7788
  }
}


next up previous
Next: HA and heartbeat Up: DRBD Previous: DRBD