CentOS 7
Sponsored Link

DRBD 8 : Install2016/01/27

 
Install DRBD (Distributed Replicated Block Device) to configure Distributed Storage System.
This example is based on the environment like follows.
+----------------------+          |          +----------------------+
| [   DRBD Server#1  ] |10.0.0.51 | 10.0.0.52| [   DRBD Server#2  ] |
|   node01.srv.world   +----------+----------+   node02.srv.world   |
|                      |                     |                      |
+----------------------+                     +----------------------+

It's necessarry the server you'd like to install DRBD has free block-device.
This example shows to configure to use a device [/dev/vg_r0/lv_r0].
[1] Update system and install required packages first and reboot on all Nodes.
[root@node01 ~]#
yum -y update

[root@node01 ~]#
yum -y install gcc gcc-c++ make automake autoconf libxslt libxslt-devel flex rpm-build kernel-devel

[root@node01 ~]#
[2]
Install DRBD on all Nodes.
Download DRBD 8 from the official site below.
⇒ https://www.linbit.com/en/drbd-community/drbd-download/
By the way, drbd-km package is built with the current version of kernel, so if you will update kernel in the future, then you need to re-build DRBD again with the version of kernel.
[root@node01 ~]#
mkdir -p rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

[root@node01 ~]#
wget www.linbit.com/downloads/drbd/8.4/drbd-8.4.11-1.tar.gz \
www.linbit.com/downloads/drbd/utils/drbd-utils-9.5.0.tar.gz
[root@node01 ~]#
tar zxvf drbd-8.4.11-1.tar.gz

[root@node01 ~]#
cd drbd-8.4.11-1

[root@node01 drbd-8.4.11-1]#
make km-rpm

[root@node01 drbd-8.4.11-1]#
[root@node01 ~]#
tar zxvf drbd-utils-9.5.0.tar.gz

[root@node01 ~]#
cd drbd-utils-9.5.0

[root@node01 drbd-utils-9.5.0]#
vi drbd.spec.in
# line 34: add

%bcond_without sbinsymlinks
%undefine with_sbinsymlinks
[root@node01 drbd-utils-9.5.0]#
./configure

[root@node01 drbd-utils-9.5.0]#
make rpm

[root@node01 drbd-utils-9.5.0]#
cd /root/rpmbuild/RPMS/x86_64
[root@node01 x86_64]#
rpm -Uvh drbd-km-3.10.0_862.6.3.el7.x86_64-8.4.11-1.x86_64.rpm \
drbd-utils-9.5.0-1.el7.x86_64.rpm \
drbd-bash-completion-9.5.0-1.el7.x86_64.rpm

Preparing...                          ################################# [100%]
Updating / installing...
   1:drbd-utils-9.5.0-1.el7           ################################# [ 33%]
   2:drbd-km-3.10.0_862.6.3.el7.x86_64################################# [ 67%]
   3:drbd-bash-completion-9.5.0-1.el7 ################################# [100%]
Matched Content