In this tutorial, we will guide you on how to install DRBD, a distributed replicated block device, which is used to mirror the data over networks. We will install it on latest Fedora Server.
Before we proceed, ensure that you meet the following prerequisites:
First, update your system packages to ensure that you are installing the latest updates.
sudo dnf update -y
DRBD is not included in the Fedora official packages, so we will add the DRBD repository to the system using the below command.
sudo dnf config-manager --add-repo=http://packages.linbit.com/drbdlinbit.repo
Import the GPG key to the system using the below command.
sudo rpm --import https://www.linbit.com/downloads/RPM-GPG-KEY-LINBIT
After adding the DRBD repository and importing the GPG key, it's time to install DRBD.
sudo dnf install drbd-utils kmod-drbd91 -y
Edit the DRBD configuration file /etc/drbd.d/drbd.conf
. Set the instance, device, and disk configuration as shown below.
resource r0 {
device /dev/drbd0;
disk /dev/VolGroupName/LogVolName;
on hostname1 {
address IP_Address1:7789;
}
on hostname2 {
address IP_Address2:7789;
}
}
Save and close the configuration file.
Start the DRBD service and set it to start automatically on system startup using the following commands.
sudo systemctl enable drbd.service
sudo systemctl start drbd.service
Verify the DRBD status by running the following command.
sudo cat /proc/drbd
In summary, DRBD is a distributed replicated block device that is used to mirror data over networks. You have successfully installed DRBD on your Fedora Server latest installation.
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!