Installing DRBD on Ubuntu prepares a node with the userspace tools that define and manage replicated block devices. The distribution package path fits hosts that can use the DRBD kernel driver provided for the running Ubuntu kernel.

Ubuntu provides drbd-utils in the main archive. The package installs drbdadm, drbdsetup, and drbdmeta, while the kernel driver comes from the running kernel's module set rather than from the userspace package itself.

A completed install should show the drbd-utils package installed, resolve drbdadm from /usr/sbin, and load the drbd kernel module without a fatal module error. Hosts that specifically need the current LINBIT DRBD 9 kernel stack should use one consistent LINBIT-supported package source instead of mixing Ubuntu archive utilities with a separate module source.

Steps to install DRBD on Ubuntu:

  1. Open a terminal with sudo privileges.
  2. Refresh the package index.
    $ sudo apt update
  3. Install the DRBD userspace package.
    $ sudo apt install drbd-utils

    drbd-utils installs the command-line tools used to parse resource files, create metadata, and bring resources up. The backing disk and resource definition are configured separately.

  4. Confirm the installed package version.
    $ dpkg-query --show drbd-utils
    drbd-utils	9.22.0-1.2build1

    The exact version changes with the active Ubuntu release and update pocket.

  5. Confirm the administrative command is on the system path.
    $ command -v drbdadm
    /usr/sbin/drbdadm
  6. Load the DRBD kernel module.
    $ sudo modprobe drbd

    No output means the running kernel accepted the module. If modprobe reports FATAL: Module drbd not found on an Ubuntu kernel, install the matching extra modules package with sudo apt install "linux-modules-extra-$(uname -r)" and retry.

  7. Check that the kernel interface is present.
    $ cat /proc/drbd
    version: 8.4.11 (api:1/proto:86-101)
    ##### snipped #####

    The kernel-driver version depends on the Ubuntu kernel or LINBIT module source in use. This check should return version information instead of No such file or directory.

  8. Repeat the install checks on the peer node before creating a resource.

    DRBD resources normally need matching packages, compatible kernel modules, and planned backing storage on every participating node.
    Related: How to create a DRBD resource