Building DRBD v9 kernel module

tested on ubuntu/focal and slack150

Warning

DRBD kernel module won’t build on any kernel version. Carefully read latest ChangeLog updates from the latest release and check for supported kernel version. Otherwise you will face loads of troubles.

Beside that, use kernel.org longterm, not stable.

The building system offers an online Coccinelle patching system –or– you can otherwise have it locally.

Requirements

you need the kernel source

uname -r
ls -lF /lib/modules/`uname -r`/build
ls -lF /lib/modules/`uname -r`/source

ubuntu

apt install build-essential automake

slackware

in case you don’t have the D K L sets installed

slackpkg install gc libffi libmpc automake
# kernel-source

Build & deploy

grab the latest release from LINBIT directly, as the github release tags are usually not up-to-date.

ver=9.1.11
ver=9.2.0-rc.8
ver=9.2.5

wget https://pkg.linbit.com//downloads/drbd/9/drbd-$ver.tar.gz
tar xzf drbd-$ver.tar.gz
cd drbd-$ver/drbd/

now build the DRBD v9 kernel module

#make distclean
#make clean

echo $MAKEFLAGS
make > ../../drbd.log && echo BUILT
make install >/dev/null && echo DEPLOYED
depmod -a

#ver=5.15.27
#make KVER=$ver KDIR=/usr/src/linux-$ver > ../../drbd.log && echo BUILT
#make install KVER=$ver KDIR=/usr/src/linux-$ver >/dev/null && echo DEPLOYED
#depmod -a $ver

ls -lF /lib/modules/`uname -r`/updates/
find /lib/modules/`uname -r`/ -type f | grep drbd | xargs ls -lhF

modinfo /lib/modules/`uname -r`/updates/drbd.ko
modinfo /lib/modules/`uname -r`/updates/drbd_transport_tcp.ko

Troubleshooting

See drbd-source-troubles. In a nutshell, use kernel.og longterm, not stable.

Resources

guides

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

Index of / 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/

download

libint’s official releases https://www.linbit.com/en/drbd-community/drbd-download/

releases at github https://github.com/LINBIT/drbd/releases

LINBIT https://github.com/LINBIT

Index of /downloads http://www.linbit.com/downloads/

Index of /downloads/drbd/9.0 http://www.linbit.com/downloads/drbd/9.0/

All Downloads https://www.linbit.com/linbit-software-download-page-for-linstor-and-drbd-linux-driver/

build

3.4. Compiling packages from source https://www.linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-from-source

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

Building DRBD9 https://www.alteeve.com/w/Building_DRBD9

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

DRBD 9 : Install https://www.server-world.info/en/note?os=CentOS_7&p=drbd9&f=1

Compile drbd9 on CentOS7 https://zero.latelan.com/2018-05-23/compile-drbd9-on-centos7/

How-to: Install drbd as a kernel module https://www.linode.com/community/questions/3211/how-to-install-drbd-as-a-kernel-module


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun