Thursday, June 17, 2010

DRBD-data storage replication for HA clusters(useful for Disaster Recovery)



DRBD® refers to block devices designed as a building block to form high availability (HA) clusters. This is done by mirroring a whole block device via an assigned network. DRBD can be understood as network based raid-1.

In the illustration above, the two orange boxes represent two servers that form an HA cluster. The boxes contain the usual components of a Linux™ kernel: file system, buffer cache, disk scheduler, disk drivers, TCP/IP stack and network interface card (NIC) driver. The black arrows illustrate the flow of data between these components.

The orange arrows show the flow of data, as DRBD mirrors the data of a high availably service from the active node of the HA cluster to the standby node of the HA cluster.


The upper part of this picture shows a cluster where the left node is currently active, i.e., the service's IP address that the client machines are talking to is currently on the left node.

The service, including its IP address, can be migrated to the other node at any time, either due to a failure of the active node or as an administrative action. The lower part of the illustration shows a degraded cluster. In HA speak the migration of a service is called failover, the reverse process is called failback and when the migration is triggered by an administrator it is called switchover.


Feature List

* May be used to add redundancy to existing deployments
* Fully synchronous, memory synchronous or asynchronous modes of operation
* Masking of local IO errors
* Shared secret to authenticate the peer upon connect
* Bandwidth of background resynchronization tunable
* Automatic recovery after node, network, or disk failures
* Efficient resynchronization, only blocks that were modified during the outage of a node.
* Short resynchronization time after the crash of an active node, independent of the device size.
* Automatic detection of the most up-to-date data after complete failure
* Integration scripts for use with Heartbeat
* Dual primary support for use with GFS/OCFS2
* Configurable handler scripts for various DRBD events
* Online data verification
* Optional data digests to verify the data transfer over the network
* Integration scripts for use with Xen
* Usable on LVM's logical volumes. Usable as physical volume for LVM
* Integration scripts for LVM to automatically take a snapshot before a node becomes the target of a resynchronization
* Dependencies to serialize resynchronization, in case of default all devices in parallel
* Heartbeat integration to outdate peers with broken replication links, avoids switchovers to stale data
* Many tuning parameters allow to optimize DRBD for specific machines, networking hardware, and storage subsystem
* Integration scripts for use with RedHat Cluster (excl. the GUI tools)
* Existing file systems can be integrated into new DRBD setups without the need of copying
* Support for a third, off-site node for disaster recovery (since 8.3)
* Support for compression of the bitmap exchange (since 8.3.2, keyword: use-rle)
* Support for floating peers (since 8.3.2) in drbdadm
* Feature complete OCF Heartbeat/Pacemeker resource agent (since 8.3.2)
* Resource level fencing script, using Pacemaker's constraints (since 8.3.2)
* Supports TCP/IP over Ethernet, SuperSockets over Dolphin NICs (8.3.2) and SDP over Infiniband (8.3.3)

No comments: