- Lab
- A Cloud Guru
Install and Configure a DRBD Device
The Distributed Replicated Block Device (DRBD) is a replicated storage solution for Linux. DRBD allows low-level storage block devices to be replicated and synchronized between two host machines, and, in the case of three-way replication, three host machines. In this learning activity, you will set up low-level storage and then use DRBD to replicate and synchronize that block device.
Path Info
Table of Contents
-
Challenge
(Both nodes) Import the GPG signing key and install the repository for `elrepo`.
On both nodes, import the signing key and install the repository.
-
Challenge
(Both nodes) Install the required packages for DRBD.
On each node, install the kernel module and utilities.
-
Challenge
(Both nodes) Load the DRBD kernel module.
Load the
drbd
kernel module. -
Challenge
(Both nodes) Start and enable the DRBD service.
Start the service and then enable the service.
-
Challenge
(Both nodes) Create a 500 megabyte logical volume named `lv-drbd` with a volume group named `vg-drbd` from the `/dev/xvdg disk`.
Create the physical volume, the volume group, and the logical volume.
-
Challenge
(Both nodes) Set protocol C in global config file.
Set replication mode to synchronous in
global_common.conf
and addprotocol C
to the net section. After that, we'll create the resource configuration file fordrbd1
. The resource isdrbd1
, the device is/dev/drbd1
, disk is/dev/vg-drbd/lv-drbd
, meta-disk is internal, and each node listens on7790
. -
Challenge
(Both nodes) Create the device metadata for `drbd1`.
Use
drbdadm
to create device metadata. -
Challenge
(Both nodes) Start up the DRBD device.
Use
drbdadm
to start up the device. -
Challenge
Set the DRBD device on `drbd-server1` to be the primary.
Use the
drbdadm primary
command to setdrbd1
ondrbd-server1
to primary. -
Challenge
On `drbd-server1`, create an `ext4` file system on the DRBD device and mount it on `/mnt/hr`.
Create the
ext4
file system and mount/dev/drbd1
on/mnt/hr
.
What's a lab?
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Provided environment for hands-on practice
We will provide the credentials and environment necessary for you to practice right within your browser.
Guided walkthrough
Follow along with the author’s guided walkthrough and build something new in your provided environment!
Did you know?
On average, you retain 75% more of your learning if you get time for practice.