Building DRBD9 Debian packages

There are a few ostacles in the build process I like to spare you.

Install the Debian packages (as root or with sudo):

aptitude install git build-essential debhelper dkms docbook-xsl help2man python-all python-dbus python-gobject xsltprochelp2man dh-systemd flex autoconf automake

Work on as ordinary user. Lets asume the following folder structure: <your home dir>/drbd9

cd
mkdir drbd9
cd drbd9

Download the source from the git repository. Note: The tar.gz.-files from the drbd.community site do not include the "debian" folders required for packaging.

git clone --recursive git://git.linbit.com/drbd-9.0.git
git clone --recursive git://git.linbit.com/drbdmanage.git
git clone --recursive git://git.linbit.com/drbd-utils.git
ls -l
drwxr-xr-x 8 volker volker 4096 Jan 6 21:25 drbd-9.0
drwxr-xr-x 10 volker volker 4096 Jan 6 22:04 drbdmanage
drwxr-xr-x 9 volker volker 4096 Jan 6 22:09 drbd-utils

Build the kernel module package first:

cd drbd-9.0 
make clean
make
dpkg-buildpackage -rfakeroot -b -uc

Then we build the drbdmanager

cd ../drbdmanage
dpkg-buildpackage -rfakeroot -b -uc

And at last we build the drbd-utils

cd ../drbd-utils
./autgen.sh
dpkg-buildpackage -rfakeroot -b -uc

Finally we install the packages:

cd ..
<become root>
aptitude install lvm2 python-natsort thin-provisioning-tools
dpkg -i drbd-dkms_9.0.6-1_all.deb drbd-utils_8.9.10-1_i386.deb python-drbdmanage_0.98.2-1_all.deb