This guide describes DRBD version 8.4.x. For 9.0 please look here(8.3).

Chapter 5. Configuring DRBD

Table of Contents

5.1. Preparing your lower-level storage
5.2. Preparing your network configuration
5.3. Configuring your resource
5.3.1. Example configuration
5.3.2. The global section
5.3.3. The common section
5.3.4. The resource sections
5.4. Enabling your resource for the first time
5.5. The initial device synchronization
5.6. Using truck based replication

5.1. Preparing your lower-level storage

After you have installed DRBD, you must set aside a roughly identically sized storage area on both cluster nodes. This will become the lower-level device for your DRBD resource. You may use any type of block device found on your system for this purpose. Typical examples include:

  • A hard drive partition (or a full physical hard drive),
  • a software RAID device,
  • an LVM Logical Volume or any other block device configured by the Linux device-mapper infrastructure,
  • any other block device type found on your system.

You may also use resource stacking, meaning you can use one DRBD device as a lower-level device for another. Some specific considerations apply to stacked resources; their configuration is covered in detail in Section 6.18, “Creating a three-node setup”.


While it is possible to use loop devices as lower-level devices for DRBD, doing so is not recommended due to deadlock issues.

It is not necessary for this storage area to be empty before you create a DRBD resource from it. In fact it is a common use case to create a two-node cluster from a previously non-redundant single-server system using DRBD (some caveats apply — please refer to Section 17.1, “DRBD meta data” if you are planning to do this).

For the purposes of this guide, we assume a very simple setup:

  • Both hosts have a free (currently unused) partition named /dev/sda7.
  • We are using internal meta data.

This guide describes DRBD version 8.4.x. For 9.0 please look here(8.3).