O'Reilly logo

CentOS High Performance by Gabriel Cánepa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required