freenode
Kernel & Low-Level

LINBIT posts a decade of DRBD 9 work for the mainline kernel

The series brings multi-peer replication into the in-tree driver while keeping existing drbd-utils working.

Christoph Böhmwalder has posted a 20-patch series that replays roughly 10 to 15 years of out-of-tree DRBD development into the mainline kernel, aiming to close a split that left the in-tree driver stuck on the old two-node model.

DRBD, the kernel's distributed replicated block device, is what many high-availability setups use to mirror storage between machines. The version shipped with Linux is still the 8.4 design. DRBD 9, which LINBIT released in 2015, added replication among more than two peers, quorum, and a different administration model. That code lived in an out-of-tree module that, as Böhmwalder wrote, "has severely diverged from the in-tree version." The series is meant to land in linux-next through the block tree after a period of maturing there. RDMA and load-balancing TCP transports are held back for a later submission.

The architectural change is the point, not the size of the diff. State that used to live on a single device, replication progress, UUIDs, resync bookkeeping, moves to a per-peer scope. Cluster-wide operations such as role changes, connect and disconnect, and resize use a two-phase commit, with nested rounds forwarded through intermediate nodes when the cluster is not fully connected. A quorum mechanism, including a tiebreaker for even-sized clusters, can suspend or fail I/O if a node loses more than half its peers. Conflict detection between application writes and resync moves from coarse extent locks to an interval tree, and writes can carry ordering tags so a sync source can reorder replies safely.

Userspace is the constraint the series is written around. The existing "drbd" generic netlink family stays at version 1, with its wire format and UAPI header untouched, so every shipped drbd-utils release keeps working and still sees single-peer semantics. DRBD 9's own tools speak a new family, "drbd2", specified with the kernel's YAML netlink format. The driver registers both and translates them onto one core; multi-peer administration is reachable only through the new family. A Kconfig option, on by default, keeps the deprecated 8.4 /proc interface and on-disk metadata format. Without it, the old netlink family is not registered at all.

A few operational details matter to anyone running the driver. Administrative commands now also require CAP_SYS_ADMIN, on top of the netlink admin permission they already needed. If metadata sits on persistent memory, an optional DAX path maps that region directly instead of reading and writing full blocks, and stores the activity log in place rather than as a journal. Böhmwalder called the series a start and invited review, noting that grouping a decade of changes by topic still does not make it easy to read.