BUILDING DRBD FROM SCRATCH

tested on Slackware64 14.2

BLOCK DEVICE ARCHITECTURE

three nodes, on which we are going to use 10G partitions.

storage1 -- storage2 -- storage3
sda2        sda2        sda2
sda3        sda3        sda3
sda4        sda4        sda4

and those will be setup as such,

storage1:sda2 + storage2:sda3 --> drbd1
storage2:sda2 + storage3:sda3 --> drbd2
storage3:sda2 + storage1:sda3 --> drbd3

BLOCK DEVICE SETUP

all nodes

cfdisk /dev/sda

then create sda2,3 e.g. 10G each.

slackpkg install parted #official
fdisk -l /dev/sda
partprobe
ls -lF /dev/sda2 /dev/sda3 /dev/sda4

SYSPREP

not sure NTP is that mandatory for this type of cluster, but let’s do it

make sure the nodes communicate with hostname and also IP (validate fingerprints), not sure they need to talk incl to themselves but let’s do it too

fix locales for Perl not to complain when running /usr/sbin/drbd-overview later-on

cat >> /etc/profile.d/lang.sh <<-EOF
export LC_ALL=C
export LANGUAGE="en_US:en"
EOF
. /etc/profile.d/lang.sh

REQUIREMENTS

on the build system only

assuming the D and L sets are installed

slackpkg search gc- #official
slackpkg search libffi #official

ls -lF /var/log/packages/libmpc*
ls -lF /var/log/packages/ocaml*
ls -lF /var/log/packages/coccinelle*
which spatch
ls -lF /var/log/packages/po4a*

slackpkg search libmpc #official
slackpkg search ocaml #sbo/slackonly
slackpkg search coccinelle #sbo/slackonly
slackpkg search po4a #sbo/slackonly
slackpkg search libcroco #sbo/slackonly

KERNEL MODULE VERSION

eventually have a look at libint’s official releases or those on github for v8.4 vs v9+

#git clone https://github.com/LINBIT/drbd-8.4.git
#cd drbd-8.4/

git clone https://github.com/LINBIT/drbd.git
cd drbd/

#wget https://www.linbit.com/downloads/drbd/10.0/drbd-10.0.0a1.tar.gz
#tar xzf drbd-10.0.0a1.tar.gz 
#cd drbd-10.0.0a1/

BUILD

ls -lF /lib/modules/`uname -r`/build
#make distclean
#nice make -j$j > ../drbd8.log && echo BUILT
nice make -j$j > ../drbd.log && echo BUILT
#nice make -j$j > ../drbd10.log && echo BUILT
#cat ../drbd.log
cat ../drbd9.log
#cat ../drbd10.log
make install
ls -lF /lib/modules/`uname -r`/updates/
find /lib/modules/`uname -r`/ | grep drbd
cd ../

git clone --recursive https://github.com/LINBIT/drbd-utils
cd drbd-utils/
./autogen.sh
./configure --localstatedir=/var --sysconfdir=/etc
#--prefix=/usr
nice make -j$j > ../drbd-utils.log
make install
ls -lF /etc/rc.d/init.d/drbd
cd ../

RESOURCES

3.4. Compiling packages from source https://docs.linbit.com/docs/users-guide-9.0/#s-from-source

DrBd https://wiki.debian.org/DrBd

Index of /www.linbit.com/downloads/tech-guides https://www.linbit.com/downloads/tech-guides/

DRBD Quick Command Reference https://www.linbit.com/downloads/tech-guides/DRBD_Quick_Reference_Guide.pdf

(gone) https://paste.fedoraproject.org/paste/kZTXesmKVZBBqR-iLwialA

How to Setup DRBD to Replicate Storage on Two CentOS 7 Servers https://www.tecmint.com/setup-drbd-storage-replication-on-centos-7/


Nethence | Pub | Lab | Pbraun | SNE Russia | xhtml