How to Install DRBD on Clear Linux Latest
DRBD (Distributed Replicated Block Device) is a high availability software that allows data to be replicated and synchronized between two or more Linux systems. This tutorial will guide you through the process of installing DRBD on Clear Linux Latest.
Prerequisites
Before you start with the DRBD installation, make sure that you have the following prerequisites in place:
- Clear Linux Latest
- Root access on the Clear Linux system
- Basic knowledge of the Terminal
Step 1: Update Clear Linux
The first step is to update Clear Linux by running the command below:
sudo swupd update
Step 2: Install DRBD on Clear Linux
To install DRBD on Clear Linux, follow the steps below:
- Open the Terminal and run the command below to add the DRBD repository to your system:
sudo tdnf install -y drbd83-utils
- Once the repository has been added, install DRBD by running the command below:
sudo tdnf install -y drbd9
- After the installation is complete, start the DRBD service with the command below:
sudo systemctl start drbd
- To ensure that the DRBD service starts automatically on system boot, run the following command:
sudo systemctl enable drbd
Step 3: Configure DRBD on Clear Linux
To configure DRBD on Clear Linux, follow the steps below:
- Create the configuration file for DRBD by running the command below:
sudo nano /etc/drbd.d/drbd0.res
- In the configuration file, specify the DRBD block device, the two nodes between which data is replicated, and other settings, as shown in the example below:
resource drbd0 {
protocol C;
startup {
wfc-timeout 0;
degr-wfc-timeout 120;
}
disk {
on-io-error detach;
}
on <hostname of node 1> {
device /dev/drbd0;
disk /dev/<block device>;
address <IP address of node 1>:7788;
meta-disk internal;
}
on <hostname of node 2> {
device /dev/drbd0;
disk /dev/<block device>;
address <IP address of node 2>:7788;
meta-disk internal;
}
}
Save the configuration file and exit.
Run the command below to create the DRBD block device:
sudo drbdadm create-md drbd0
- Use the command below to start and synchronize the DRBD devices:
sudo drbdadm up drbd0
- Verify the status of DRBD devices with the command below:
sudo drbdadm status
If everything is set up correctly, you should see output similar to:
drbd0 role:Secondary
disk:UpToDate
peer-disk:Unknown
Congratulations! You have successfully installed and configured DRBD on Clear Linux Latest.