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.
Before you start with the DRBD installation, make sure that you have the following prerequisites in place:
The first step is to update Clear Linux by running the command below:
sudo swupd update
To install DRBD on Clear Linux, follow the steps below:
sudo tdnf install -y drbd83-utils
sudo tdnf install -y drbd9
sudo systemctl start drbd
sudo systemctl enable drbd
To configure DRBD on Clear Linux, follow the steps below:
sudo nano /etc/drbd.d/drbd0.res
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
sudo drbdadm up drbd0
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.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!