Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

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.

Google Cloud Platform icon

Path Info

Clock icon Advanced
Clock icon 1h 0m
Clock icon Nov 12, 2018

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. 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.

  2. Challenge

    (Both nodes) Install the required packages for DRBD.

    On each node, install the kernel module and utilities.

  3. Challenge

    (Both nodes) Load the DRBD kernel module.

    Load the drbd kernel module.

  4. Challenge

    (Both nodes) Start and enable the DRBD service.

    Start the service and then enable the service.

  5. 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.

  6. Challenge

    (Both nodes) Set protocol C in global config file.

    Set replication mode to synchronous in global_common.conf and add protocol C to the net section. After that, we'll create the resource configuration file for drbd1. The resource is drbd1, the device is /dev/drbd1, disk is /dev/vg-drbd/lv-drbd, meta-disk is internal, and each node listens on 7790.

  7. Challenge

    (Both nodes) Create the device metadata for `drbd1`.

    Use drbdadm to create device metadata.

  8. Challenge

    (Both nodes) Start up the DRBD device.

    Use drbdadm to start up the device.

  9. Challenge

    Set the DRBD device on `drbd-server1` to be the primary.

    Use the drbdadm primary command to set drbd1 on drbd-server1 to primary.

  10. 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.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

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.

Start learning by doing today

View Plans