DRBD | |
Logo Size: | 200px |
Author: | Philipp Reisner, Lars Ellenberg |
Developer: | LINBIT HA-Solutions GmbH, Vienna and LINBIT USA LLC, Oregon |
Latest Release Version: | 9.2.4 |
Latest Release Date: | [1] |
Latest Preview Version: | 10.0.0a4 |
Latest Preview Date: | [2] |
Programming Language: | C |
Operating System: | Linux |
Genre: | Distributed storage system |
License: | GNU General Public License v2 |
Distributed Replicated Block Device (DRBD) is a distributed replicated storage system for the Linux platform. It mirrors block devices between multiple hosts, functioning transparently to applications on the host systems. This replication can involve any type of block device, such as hard drives, partitions, RAID setups, or logical volumes.[3]
DRBD is implemented as a kernel driver, several userspace management applications, and some shell scripts. DRBD is traditionally used in high availability (HA) computer clusters, but beginning with DRBD version 9, it can also be used to create larger software defined storage pools with a focus on cloud integration.[4]
The DRBD software is free software released under the terms of the GNU General Public License version 2.
DRBD is part of the Lisog open source stack initiative.
DRBD layers logical block devices (conventionally named /dev/drbd''X''
, where X is the device minor number) over existing local block devices on participating cluster nodes. Writes to the primary node are transferred to the lower-level block device and simultaneously propagated to the secondary node(s). The secondary node(s) then transfers data to its corresponding lower-level block device. All read I/O is performed locally unless read-balancing is configured.[5]
Should the primary node fail, a cluster management process promotes the secondary node to a primary state.[6] This transition may require a subsequent verification of the integrity of the file system stacked on top of DRBD, by way of a filesystem check or a journal replay. When the failed ex-primary node returns, the system may (or may not) raise it to primary level again, after device data resynchronization. DRBD's synchronization algorithm is efficient in the sense that only those blocks that were changed during the outage must be resynchronized, rather than the device in its entirety.
DRBD is often deployed together with the Pacemaker or Heartbeat cluster resource managers, although it does integrate with other cluster management frameworks.[7] [8] [9] It integrates with virtualization solutions such as Xen, and may be used both below and on top of the Linux LVM stack.[10]
DRBD allows for load-balancing configurations, allowing both nodes to access a particular DRBD in read/write mode with shared storage semantics.[11] A multiple primary (multiple read/write nodes) configuration requires the use of a distributed lock manager.
Since 2018 DRBD can also be leveraged in the block storage management software LINSTOR for replication between different nodes and to provide block storage devices to users and applications.
Conventional computer cluster systems typically use some sort of shared storage for data being used by cluster resources. This approach has a number of disadvantages, which DRBD may help offset:
A disadvantage is the lower time required to write directly to a shared storage device than to route the write through the other node.
DRBD bears a superficial similarity to RAID-1 in that it involves a copy of data on two storage devices, such that if one fails, the data on the other can be used. However, it operates in a very different way from RAID and even network RAID.
In RAID, the redundancy exists in a layer transparent to the storage-using application. While there are two storage devices, there is only one instance of the application and the application is not aware of multiple copies. When the application reads, the RAID layer chooses the storage device to read. When a storage device fails, the RAID layer chooses to read the other, without the application instance knowing of the failure.
In contrast, with DRBD there are two instances of the application, and each can read only from one of the two storage devices. Should one storage device fail, the application instance tied to that device can no longer read the data. Consequently, in that case that application instance shuts down and the other application instance, tied to the surviving copy of the data, takes over.
Conversely, in RAID, if the single application instance fails, the information on the two storage devices is effectively unusable, but in DRBD, the other application instance can take over.
Operating within the Linux kernel's block layer, DRBD is essentially workload agnostic. A DRBD can be used as the basis of:
DRBD-based clusters are often employed for adding synchronous replication and high availability to file servers, relational databases (such as MySQL), and many other workloads.
DRBD's authors originally submitted the software to the Linux kernel community in July 2007, for possible inclusion in the canonical kernel.org version of the Linux kernel.[14] After a lengthy review and several discussions, Linus Torvalds agreed to have DRBD as part of the official Linux kernel. DRBD was merged on 8 December 2009 during the "merge window" for Linux kernel version 2.6.33.[15]