< Back to index
DRBD is an acronym for Distributed Replicated Block Device. It is a Linux kernel module, that, working together with some scripts, offer a distributed storage system, frequently used on high availability clusters. DRBD works as a kind of network RAID.
How it works
Each involved device (locally treated as partitions) has a state, which can be either primary or secondary. DRBD creates, on all nodes, a link between a virtual device /dev/drbdX and a local partition, not accessible directly. All the writing is done on the primary node, that will transfer the data to the lower-level block device (the partition) and propagate to the remaining nodes. These secondary nodes just transfer data to the lower-level block device. All the reading is done locally.
Should the primary node fail, DRBD will raise a secondary node to a primary state. Since DRBD does not work on the file system level, only on hard-disk block level, if the file system requires consistancy checks, a verification of the integrity of the file system should follow the secondary-primary transition. This will mean running 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 (lowering the current node to secondary level again) after a data synchronization. However, on the configuration mode called legacy, the primary node will continue to control the distributed filesystem until it fails or service is stopped.
Although DRBD has its own way to determinate which node should be primary, a cluster manager is frequently used to handle state transitions. Together with these state transitions, the cluster manager must also mount the filesystem it uses on top of the virtual device created by DRBD.
This entry uses material from from Wikipedia, the leading user-contributed encyclopedia. It is licensed under the GNU Free Documentation License. Disclaimer.