- 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
The following steps must be performed on both nodes unless specified otherwise.
Please use this content 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, DRBD packages are not available through the official CentOS repositories.
However you could install the drbd package (at this moment version 8.4) and its kernel kmod-drbd counterpart from ELRepo third-party repository, which could be added according to their instructions.
After adding ELRepo repository the installation could continue:
After a successful installation of the DRBD package on both nodes, we will add a new resource configuration file (for example /etc/drbd.d/AxigenData.res) that in the end must be present on both nodes.
Below is an example, according to the data from the corresponding section, and should be modified to reflect your specific configuration.
The data marked with bold italic is the one that must be replaced with actual data from your specific setup.
If you are using default SELinux security policies the cluster will not be able to run and manage DRBD resources. Therefore we will simply exempt DRBD processes from SELinux control:
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:
Configure CentOS to load drbd module at boot time running the following command:
Next, you have to initialize the DRBD resource meta data. This need to be done before a DRBD resource can be taken online for the first time, thus only on initial device creation:
If you are receiving an error like
you probably have to check the differences between reported node hostnames and the ones used in the configuration file.
At the end, bring DRBD resource up, 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 within 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 ext4:
Remember to perform this step only on the primary node.