How to Install DRBD on Fedora Server latest
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.
Prerequisites
Before we proceed, ensure that you meet the following prerequisites:
- A Fedora server latest installation with root level privileges.
- An active internet connection on your server.
Step 1: Update System Packages
First, update your system packages to ensure that you are installing the latest updates.
sudo dnf update -y
Step 2: Add DRBD Repository
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
Step 3: Import GPG Key
Import the GPG key to the system using the below command.
sudo rpm --import https://www.linbit.com/downloads/RPM-GPG-KEY-LINBIT
Step 4: Install DRBD Packages
After adding the DRBD repository and importing the GPG key, it's time to install DRBD.
sudo dnf install drbd-utils kmod-drbd91 -y
Step 5: Configure DRBD
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.
Step 6: Start DRBD
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
Step 7: Verify DRBD
Verify the DRBD status by running the following command.
sudo cat /proc/drbd
Conclusion
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.