Setting up a high-availability database with replicated storage

The last part of this chapter focuses on setting up a HA MariaDB database with replicated storage. To begin, we will have to set up another DRBD resource as we did earlier. We will review the necessary steps here for clarity:

  1. Add another virtual disk to each virtual machine (a 2 GB disk will do).
  2. Create a partition on the newly added disk and then go through the process of creating a Physical Volume (PV) on /dev/sdc1, a Volume Group (VG, named drbd_db_vg), and finally a Logical Volume (LV, drbd_db_vol):
    parted /dev/sdc mklabel msdos
    parted /dev/sdc mkpart p 0% 100%
    pvcreate /dev/sdc1
    vgcreate drbd_db_vg /dev/sdc1
    lvcreate -n drbd_db_vol -l 100%FREE drbd_db_vg
  3. Create a configuration file ...

Get CentOS High Performance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.