最後更新: 2021-02-10
介紹
DRDB = Distributed Replicated Block Device = network based raid-1
HomePage: https://www.linbit.com/drbd/
特點
* 支援 Checksum-based synchronization (所以支援 online verification)
It is a common use case to have on-line verification managed by the local cron daemon
verification source \|/ calculating a cryptographic digest(MD5, SHA-1, or CRC-32C) of every block (Linux kernel crypto API provides these) DRBD transmits just the digests, not the full blocks, online verification uses network bandwidth very efficiently. \|/ verification target
* 支援 Fixed-rate / Variable-rate synchronization (Default)
(Variable-rate: DRBD detects the available bandwidth on the synchronization network)
* Synchronously or Asynchronously (Local / Remote)
* Transparently (其他 Program 不知它的存在)
* Driver code in the kernel (Linux kernel's block layer)
* User space tools(drbdadm -call-> drbdsetup -> kernel driver)
Version
Linux DRBD
3.0 - 3.4 8.3.11
Hardware 要求
Disk system 要支援 disk flush, 如
- SATA Devices
- SCSI
- MD
- LVM2
如果 disk 有 battery-backed cache 那可以考慮停用 device flushes 去提升 Performance
Feature
V 9
- RDMA is now integrated into DRBD9 ( reducing CPU load by 50% )
- More than 2-way redundancy
- Automatic Promotion of Resources
V 8.4
- Defaults to masking I/O errors
- Defaults Variable-rate synchronization
-
multiple volumes (each corresponding to one block device)
-> A single resource may correspond to multiple volumes
-> may share a single replication connection
lrwxrwxrwx 1 root root 11 2011-07-04 09:22 /dev/drbd/by-res/nfs-root/0 -> ../../drbd2 lrwxrwxrwx 1 root root 11 2011-07-04 09:22 /dev/drbd/by-res/nfs-root/1 -> ../../drbd3
- Boolean configuration options
no-md-flushes -> md-flushes no
- syncer section no longer exists
syncer{} 的設定分到 disk{} 及 net{}
- 在 resource{} 新增了 options{}
- replication protocol can be changed on the fly
# temporarily switch a connection to asynchronous replication
drbdadm net-options --protocol=A <resource>
- "--force" option to kick off an initial resource synchronization
drbdadm primary --force <resource>
- reduce bitmap IO during resync
- Align the internal object model with drbd-9.0
- New on disk format for the AL: double capacity; 4k aligned IO
- Multiple AL changes in a single transaction
V 8.3.10
- bandwidth management for mirroring over long distance
V 8.3.2
- Resource level fencing script, using Pacemaker's constraints
- OCF Heartbeat/Pacemeker resource agent
- Support for floating peers
- compression of the bitmap exchange
V 8.3.0
- off-site node for disaster recovery
- Existing file systems can be integrated into new DRBD setups
- (add redundancy to existing deployments)
- Heartbeat integration to outdate peers with broken replication links
- (avoids switchovers to stale data)(Short resynchronization)
- Optional data digests to verify the data transfer over the network
- Integration scripts for LVM to automatically take a snapshot before a node becomes the target of a resynchronization
- Online data verification
- Configurable handler scripts for various DRBD events
- Dual primary support for use with GFS/OCFS2
- Automatic detection of the most up-to-date data after complete failure
- Automatic recovery after node, network, or disk failures