- High Availability: General Architecture
- High Availability: Cluster Deployment with DRBD
- Axigen with Linux-HA and DRBD – Solution Deployment
- Axigen with Linux-HA and DRBD – Example Configuration
- Axigen with Linux-HA and DRBD – DRBD
- Axigen with Linux-HA and DRBD – Axigen
- Axigen with Linux-HA and DRBD – Heartbeat
Please use this contents only as a guideline. For a detailed installation and configuration guide, please read the DRBD official documentation.
Install the latest version of the DRBD package by following the official instructions. At the moment of this writing, the latest DRBD version is 8.3. The same DRBD packages must be installed on both nodes.
If you are using a CentOS 5 platform, you have the
drbd83 package and its kernel
kmod-drbd83 counterpart, from the extras repository, which is active by default. If you are using Red Hat Enterprise Linux 5 or 6, you can also include the CentOS Extras repository in your
yum configuration. After this, installing DRBD kernel and user space packages is as simple as:
(The drbd83 package should be pulled automatically as a dependency)
After a successful installation of the DRBD package on both nodes, it has to be configured by editing the
/etc/drbd.conf file. At the end, the same DRBD configuration must be present on both nodes.
Below is an example configuration for
/etc/drbd.conf on both nodes, according to the data from the corresponding section.
The data marked with bold italic is the one that must be replaced with actual data from your specific setup.
After you have successfully modified the DRBD configuration file, you may go to creating the DRBD virtual disk(s), which will store the Axigen data directory. The commands must be issued on both nodes.
First, in order to be able to work with DRBD, you have to load the drbd kernel module:
Next, you have to initialize the DRBD resource meta data. This needs to be done before a DRBD resource can be taken online for the first time, thus only on initial device creation:
A successful meta data initialization makes the DRBD resource ready for attaching to the backing device:
At the end, perform DRBD connection to the peer device, by issuing:
After doing the above disk setup on the second node, both nodes should show an Inconsistent/Inconsistent state in the output of the
drbdadm role command or the contents of the /proc/drbd file at the ds: field.
After this stage, you will need to perform the operations described only on the primary node.
The initial full synchronization of the two nodes must be performed on only one node, only on initial resource configuration, and only on the node you selected as the synchronization source. This node is the one you will consider the primary node in the future cluster setup. To perform this step, issue this command:
After issuing this command, the initial full synchronization will commence. You will be able to monitor its progress via /proc/drbd. It may take some time depending on the size of the device and overall disk and network performance. The synchronization is logged with the following two syslog messages:
Do not attempt to perform the same synchronization on the secondary node, it must be performed only once on the primary node.
File System Creation
At this final point, you have to create the file system for the DRBD resource, at your choice.
In our example, the filesystem has been created as ext3:
Remember to perform this step only on the primary node.