DRBD
DRBD (Distributed Replicated Block Device) is a virtual block device that is distributed across two or more machines.
Installation
On a clean installation of RHEL 7 or equivalent, run updates, and ensure that you have NTP and a recent kernel installed.
From ElRepo
Get the DRBD packages from ELRepo:
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum install drbd84-utils kmod-drbd84
From Source
Install prerequisites:
yum install gcc flex make autoconf m4
Get the source from their git repository. Releases from tarballs may fail depending on which kernel version you're using.
git clone git://git.drbd.org/drbd-8.4.git cd drbd-8.4 make make install
The make install should have loaded the module and you can verify this:
lsmod | grep drbd
If it isn't loaded, load it using modprobe
modprobe drbd
Compile the userspace utilities:
git clone git://git.drbd.org/drbd-utils.git cd drbd-utils ./aclocal.sh ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc make make install
Note: I got errors about man pages not being found. Ugh.
See Also
- https://drbd.linbit.com/users-guide/s-build-from-source.html
- http://unix-linux-server.blogspot.ca/2014/10/drbd-on-centos-70-oracle-linux-70-and.html
- http://wiki.centos.org/HowTos/Ha-Drbd (CentOS 5)
- http://wiki.openvz.org/HA_cluster_with_DRBD_and_Heartbeat