Building DRBD utils from scratch

tested on Slackware current (aug 2021) and ubuntu/focal

good thing is, the init script works for both DRBD v8 and v9

slackware

slackpkg install libgcrypt libgpg-error libxml2 flex gc git
# libxslt only required for building docs

shared

git clone --recursive https://github.com/LINBIT/drbd-utils
cd drbd-utils/
./autogen.sh
./configure \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --with-xen \
  --with-heartbeat \
  --without-pacemaker \
  --without-rgmanager \
  --with-bashcompletion \
  --with-prebuiltman

and since we’re running it on a minimal system

# --with-prebuiltman
--without-manual

more options

# --with-udev

finally proceed with the build

make clean
echo $MAKEFLAGS
make > ../drbd-utils.log && echo BUILT
make install >/dev/null && echo DEPLOYED
ls -lF /etc/init.d/drbd

and to avoid this error while starting the service

/etc/rc.d/rc.drbd: line 148: /var/lib/linstor/loop_device_mapping: No such file or directory

eventually disable that bit

vi /etc/init.d/drbd

    (start)
    #handle_linstor_loopback "$1"

    (stop)
            #handle_linstor_loopback "$1"

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