Chapter 4. Building and installing DRBD from source

Table of Contents

4.1. Downloading the DRBD sources
4.2. Checking out sources from the public DRBD source repository
4.3. Building DRBD from source
4.3.1. Checking build prerequisites
4.3.2. Preparing the kernel source tree
4.3.3. Preparing the DRBD build tree
4.3.4. Building DRBD userspace utilities
4.3.5. Compiling DRBD as a kernel module
4.4. Building a DRBD RPM package
4.5. Building a DRBD Debian package

4.1. Downloading the DRBD sources

The source tarballs for both current and historic DRBD releases are available for download from http://oss.linbit.com/drbd/. Source tarballs, by convention, are named drbd-x.y.z.tar.gz, where x, y and z refer to the major, minor and bugfix release numbers.

DRBD’s compressed source archive is less than half a megabyte in size. To download and uncompress into your current working directory, issue the following commands:

$ wget http://oss.linbit.com/drbd/8.4/drbd-latest.tar.gz
$ tar -xzf drbd-latest.tar.gz
[Note]Note

The use of wget for downloading the source tarball is purely an example. Of course, you may use any downloader you prefer.

It is recommended to uncompress DRBD into a directory normally used for keeping source code, such as /usr/src or /usr/local/src. The examples in this guide assume /usr/src.