Setting-up DRBD v9 with drbd-manage

tested on RHEL7

Install

see Building DRBD9 on CentOS/RHEL7

Requirements

yum -y install lvm2

Prep

warning: the hostname should correspond to the cluster name

note: apparently no SSH keys are mandatory, it goes through it even if that fails

all nodes

echo lin1 > /etc/hostname
echo lin2 > /etc/hostname
echo lin3 > /etc/hostname

vi /etc/hosts

10.3.3.231      lin1
10.3.3.232      lin2
10.3.3.233      lin3

#172.16.7.201    lin1hb
#172.16.7.202    lin2hb
#172.16.7.203    lin3hb

systemctl | grep NetworkManager #should be empty
ls -lhF /etc/resolv.conf
ping -c1 opendns.com

LVM2

pvcreate /dev/xvdb
vgcreate vdisks /dev/xvdb

Cluster setup

lin1

for host in lin1 lin2 lin3; do
    ping -c1 $host
done; unset host

drbdmanage init lin1
drbdmanage init 10.3.3.231
drbdmanage add-node lin2hb 172.16.7.202
drbdmanage add-node lin3hb 172.16.7.203

copy/paste the joining commands on the resp. nodes

drbdmanage join -p 6999 172.16.7.202 1 lin1hb 172.16.7.201 0 ...
drbdmanage join -p 6999 172.16.7.203 2 lin1hb 172.16.7.201 0 ...

check

drbdmanage list-nodes

Resource setup

deploying only on two out of three nodes

#drbdmanage add-resource web
#drbdmanage add-volume web 200MB
#drbdmanage deploy-resource web 2
drbdmanage add-volume web 200MB --deploy 2

check

drbdmanage list-volumes

you will notice that web_00 logical volume on all the nodes

lvs

however the /dev/drbd<MINOR> will only be available on two of those

ll /dev/drbd[0-9]*

Ready to go

on only one node

file /dev/drbd100
mkfs.ext4 /dev/drbd100 

drbdmanage 2>&1 | less
drbdmanage list-free-space 1

man drbdmanage-add-volume
man drbdmanage-deploy-resource

Resources

install

Building and installing the DRBD software https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#p-build-install-configure

setup

DRBDmanage installation is now easier! https://www.linbit.com/drbdmanage-now-easy/

Create a 3 Node DRBD 9 Cluster Using DRBD Manage https://www.theurbanpenguin.com/create-3-node-drbd-9-cluster-using-drbd-manage/

Distributed Replicated Block Device (DRBD) https://developweekly.com/docs/drbd/ –> and LVM write cache

Installing DRBD-SDS From The LINBIT Ubuntu PPA https://www.theurbanpenguin.com/installing-drbd-sds-linbit-ubuntu-ppa/

news

The Latest Tech Blogs and Updates https://www.linbit.com/blog/

Building and installing the DRBD software https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#p-build-install-configure


HOME | GUIDES | BENCHMARKS | html