From Gentoo Wiki
Jump to: navigation, search
The information in this article is representative of former times and has been archived. It can be used for reference, but is most likely not appropriate for current usage. Generally archived articles should not be edited.
As of 2019, DRBD is no longer include in Gentoo's main package repository. It may be available somewhere in an overlay.

DRBD (or Distributed Replicated Block Device) is a network block device that provides reliability when storing data across multiple network nodes.

From the kernel documentation:

DRBD is a shared-nothing, synchronously replicated block device. It is designed to serve as a building block for high availability clusters and in this context, is a "drop-in" replacement for shared storage. Simplistically, you could see it as a network RAID 1.



KERNEL Enable CONFIG_BLK_DEV_DRBD in the kernel
Device Drivers --->  Block devices --->
<*>   DRBD Distributed Replicated Block Device support


Install sys-cluster/drbd:

root #emerge --ask sys-cluster/drbd

This package installs the userland utilities to interact with, and control DRBD. Also known as drbdsetup and drbdadm.



"ERROR: unknown cs for drbd0 : BrokenPipe, Update/DUnknown"

This error means connection state has a problem, link needs fixing, or drbd version updating. Upstream states "we had some issues with discarding the first successful connection and getting in a connect/brokenpipe loop."

Run this command to extract useful information:

root #cat /proc/drbd