Chapter 4. Common administrative tasks - DRBD Manage

DRBD Manage is an abstraction layer which takes over management of logical volumes (LVM) and management of configuration files for DRBD. Features of DRBD Manage include creating, resizing, and removing of replicated volumes. Additionally, DRBD Manage handles taking snapshots and creating volumes in consistency groups.

This chapter outlines typical administrative tasks encountered during day-to-day operations. It does not cover troubleshooting tasks, these are covered in detail in Chapter 7, Troubleshooting and error recovery.

4.1. Initializing your cluster

We assume that the following steps are accomplished on all cluster nodes:

  1. The DRBD9 kernel module is installed and loaded
  2. drbd-utils are installed
  3. LVM tools are installed
  4. drbdmanage and its dependencies are installed

Note that drbdmanage uses dbus-activation to start its server component when necessary, do not start the server manually.

The first step is to review the configuration file of drbdmanage (/etc/drbdmanaged.cfg) and to create an LVM volume group with the name specified in the configuration. In the following we use the default name, which is drbdpool, and assume that the volume group consists of /dev/sda6 and /dev/sda7. Creating the volume group is a step that has to be executed on every cluster node:

# vgcreate drbdpool /dev/sda6 /dev/sda7

The second step is to initialize the so called control volume, which is then used to redundantly store your cluster configuration. If the node has multiple interfaces, you have to specify the IP address of the network interface that DRBD should use to communicate with other nodes in the cluster, otherwise the IP is optional. This step must only be done on exactly one cluster node.

# drbdmanage init 10.43.70.2

We recommend using drbdpool as the name of your LVM volume group as it is the default value and makes your administration life easier. If, for whatever reason, you decide to use a different name, make sure that the option drbdctrl-vg is set accordingly in /etc/drbdmanaged.cfg. Configuration will be discussed in Section 4.3, “Cluster configuration”.