Product SiteDocumentation Site

7.3. Configure DRBD

There is no series of commands for building a DRBD configuration, so simply run this on both nodes to use this sample configuration:
# cat <<END >/etc/drbd.d/wwwdata.res
resource wwwdata {
 protocol C;
 meta-disk internal;
 device /dev/drbd1;
 syncer {
  verify-alg sha1;
 net {
 on pcmk-1 {
  disk   /dev/centos_pcmk-1/drbd-demo;
 on pcmk-2 {
  disk   /dev/centos_pcmk-2/drbd-demo;


Edit the file to use the hostnames, IP addresses and logical volume paths of your nodes if they differ from the ones used in this guide.


Detailed information on the directives used in this configuration (and other alternatives) is available in the DRBD User’s Guide. The allow-two-primaries option would not normally be used in an active/passive cluster. We are adding it here for the convenience of changing to an active/active cluster later.