This guide has been released to the DRBD community, and its authors strive to improve it permanently. Feedback from readers is always welcome and encouraged. Please use the DRBD public mailing list for enhancement suggestions and corrections. Recent content additions are marked with Draft status; feedback on those sections is particularly highly appreciated.
Copyright © 2008, 2009 LINBIT Information Technologies GmbH
Copyright © 2009 LINBIT HA Solutions GmbH
Trademarks used in this guide
DRBD®, the DRBD logo, LINBIT®, and the LINBIT logo are trademarks or registered trademarks of LINBIT Information Technologies GmbH in Austria, the United States and other countries.
AMD is a registered trademark of Advanced Micro Devices, Inc.
Citrix is a registered trademark of Citrix, Inc.
Debian is a registered trademark of Software in the Public Interest, Inc.
Dolphin Interconnect Solutions and SuperSockets are trademarks or registered trademarks of Dolphin Interconnect Solutions ASA.
IBM is a registered trademark of International Business Machines Corporation.
Intel is a registered trademark of Intel Corporation.
Linux is a registered trademark of Linus Torvalds.
MySQL and MySQL Enterprise are trademarks or registered trademarks of MySQL AB and/or Sun Microsystems, Inc.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Red Hat, Red Hat Enterprise Linux, and RPM are trademarks or registered trademarks of Red Hat, Inc.
SuSE, SUSE, and SUSE Linux Enterprise Server are trademarks or registered trademarks of Novell, Inc.
Xen is a registered trademark of Citrix, Inc.
Other names mentioned in this guide may be trademarks or registered trademarks of their respective owners.
January 18, 2010
Table of Contents
- About this guide
- I. Introduction to DRBD
- 1. DRBD Fundamentals
- 2. DRBD Features
- Single-primary mode
- Dual-primary mode
- Replication modes
- Multiple replication transports
- Efficient synchronization
- On-line device verification
- Replication traffic integrity checking
- Split brain notification and automatic recovery
- Support for disk flushes
- Disk error handling strategies
- Strategies for dealing with outdated data
- Three-way replication
- Long-distance replication with DRBD Proxy
- Truck based replication
- Floating peers
- II. Building, installing and configuring DRBD
- 3. Installing pre-built DRBD binary packages
- 4. Building and installing DRBD from source
- Downloading the DRBD sources
- Checking out sources from the public DRBD source repository
- Building DRBD from source
- Building a DRBD RPM package
- Building a DRBD Debian package
- 5. Configuring DRBD
- III. Working with DRBD
- 6. Common administrative tasks
- Checking DRBD status
- Enabling and disabling resources
- Reconfiguring resources
- Promoting and demoting resources
- Enabling dual-primary mode
- Using on-line device verification
- Configuring the rate of synchronization
- Configuring checksum-based synchronization
- Configuring I/O error handling strategies
- Configuring replication traffic integrity checking
- Resizing resources
- Disabling backing device flushes
- Configuring split brain behavior
- Creating a three-node setup
- Using DRBD Proxy
- 7. Troubleshooting and error recovery
- Dealing with hard drive failure
- Dealing with node failure
- Manual split brain recovery
- IV. DRBD-enabled applications
- 8. Integrating DRBD with Pacemaker clusters
- Pacemaker primer
- Pacemaker configuration
- Using DRBD in Pacemaker clusters
- Using resource-level fencing in Pacemaker clusters
- Using stacked DRBD resources in Pacemaker clusters
- Configuring DRBD to replicate between two SAN-backed Pacemaker clusters
- 9. Integrating DRBD with Heartbeat clusters
- Heartbeat primer
- Heartbeat configuration
- Using DRBD in Heartbeat R1-style clusters
- Using DRBD in Heartbeat CRM-enabled clusters
- Using Heartbeat with
- 10. Integrating DRBD with Red Hat Cluster Suite
- 11. Using LVM with DRBD
- 12. Using GFS with DRBD
- 13. Using OCFS2 with DRBD
- 14. Using Xen with DRBD
- V. Optimizing DRBD performance
- 15. Measuring block device performance
- 16. Optimizing DRBD throughput
- 17. Optimizing DRBD latency
- VI. Learning more about DRBD
- 18. DRBD Internals
- DRBD meta data
- Generation Identifiers
- The Activity Log
- The quick-sync bitmap
- The peer fencing interface
- 19. Getting more information
- A. DRBD system manual pages
List of Figures
- 1.1. DRBD's position within the Linux I/O stack
- 2.1. DRBD resource stacking
- 8.1. DRBD resource stacking in Pacemaker clusters
- 8.2. DRBD resource stacking in Pacemaker clusters
- 8.3. Using DRBD to replicate between SAN-based clusters
- 11.1. LVM overview
- 18.1. GI tuple changes at start of a new data generation
- 18.2. GI tuple changes at start of re-synchronization
- 18.3. GI tuple changes at completion of re-synchronization
List of Tables
List of Examples
List of Equations
- 2.1. Synchronization time
- 6.1. Syncer rate example, 110MB/s effective available bandwidth
- 6.2. Syncer rate example, 80MB/s effective available bandwidth
- 18.1. Calculating DRBD meta data size (exactly)
- 18.2. Estimating DRBD meta data size (approximately)
- 18.3. Active extents calculation based on sync rate and target sync time
- 18.4. Active extents calculation based on sync rate and target sync time (example)