Chapter 4. Building and installing DRBD from source

Table of Contents

Downloading the DRBD sources
Checking out sources from the public DRBD source repository
Building DRBD from source
Checking build prerequisites
Preparing the kernel source tree
Compiling DRBD as a kernel module
Patching DRBD into the kernel
Installing DRBD
Building a DRBD RPM package
Building a DRBD Debian package

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/drbd-8.3.0.tar.gz 
tar -xzf drbd-8.3.0.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 book assume /usr/src.