# DRBD8 HA /etc/drbd.conf configuration file resource r0 { protocol C; # protocol between devices startup { wfc-timeout 120; # wait 2min for other peers degr-wfc-timeout 120; # wait 2min if peer was already # down before this node was rebooted become-primary-on both; } net { allow-two-primaries; cram-hmac-alg "sha1"; # algo to enable peer authentication shared-secret "xyz"; # handle split-brain situations after-sb-0pri discard-least-changes;# if no primary auto sync from the # node that touched more blocks during # the split brain situation. after-sb-1pri discard-secondary; # if one primary after-sb-2pri disconnect; # if two primaries # solve the cases when the outcome # of the resync decision is incompatible # with the current role assignment in # the cluster rr-conflict disconnect; # no automatic resynchronization # simply disconnect } disk { on-io-error detach; # detach the device from its # backing storage if the driver of # the lower_device reports an error # to DRBD } syncer { rate 256M; } on db01 { device /dev/drbd0; disk /dev/sda3; address 1.2.3.4:7789; meta-disk internal; } on db02 { device /dev/drbd0; disk /dev/sda3; address 1.2.3.5:7789; meta-disk internal; } }