Distributed Replicated Block Device (DRBD)

Contents

11.1. Installing DRBD Services
11.2. Configuring the DRBD Service
11.3. Testing the DRBD Service
11.4. Troubleshooting DRBD
11.5. Additional Information

DRBD allows you to create a mirror of two block devices that are located at two different sites across an IP network. When used with OpenAIS, DRBD supports distributed high-availability Linux clusters.

[Important]

The data traffic between mirrors is not encrypted. For secure data exchange, you should deploy a virtual private network (VPN) solution for the connection.

Data on the primary device is replicated to the secondary device in a way that ensures that both copies of the data are always identical. When using a cluster aware file system such as ocfs2, it is also possible to run both nodes as primary devices.

By default, DRBD uses the TCP port 7788 for communications between DRBD nodes. Make sure that your firewall does not prevent communication on this port.

You must set up the DRBD devices before creating file systems on them. Everything to do with user data should be done solely via the /dev/drbd<n> device, not on the raw device, because DRBD uses the last 128 MB of the raw device for metadata. Make sure to create file systems only on the /dev/drbd<n> device, not on the raw device.

For example, if the raw device is 1024 MB in size, the DRBD device has only 896 MB available for data, with 128 MB hidden and reserved for the metadata. Any attempt to access the space between 896 MB and 1024 MB fails because it is not available for user data.

Installing DRBD Services

To install the needed packages for drbd, Install the High Availability Extension Add-On product on both SUSE Linux Enterprise Server machines in your networked cluster as described in Part I, “Installation and Setup”. Installing High Availability Extension also installs the drbd program files.

If you do not need the complete cluster stack but just want to use drbd, you may also add the High Availability Extension Add-On product, and proceed with installing drbd. This will also install the needed kernel modules.