Book Image

CentOS High Performance

By : Gabriel Cánepa
Book Image

CentOS High Performance

By: Gabriel Cánepa

Overview of this book

CentOS is the enterprise level Linux OS, which is 100% binary compatible to Red Hat Enterprise Linux (RHEL). It acts as a free alternative to RedHat's commercial Linux offering, with only a change in the branding. A high performance cluster consists in a group of computers that work together as one set parallel, hence minimizing or eliminating the downtime of critical services and enhancing the performance of the application. Starting with the basic principles of clustering, you will learn the necessary steps to install a cluster with two CentOS 7 servers. We will then set up and configure the basic required network infrastructure and clustering services. Further, you will learn how to take a proactive approach to the split-brain issue by configuring the failover and fencing of the cluster as a whole and the quorum of each node individually. Further, we will be setting up HAC and HPC clusters as a web server and a database server. You will also master the art of monitoring performance and availability, identifying bottlenecks, and exploring troubleshooting techniques. At the end of the book, you’ll review performance-tuning techniques for the recently installed cluster, test performance using a payload simulation, and learn the necessary skills to ensure that the systems, and the corresponding resources and services, are being utilized to their best capacity.
Table of Contents (13 chapters)
CentOS High Performance
About the Author
About the Reviewers

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_
  3. Create a configuration file (/etc/drbd.d/drbd1.res) for the new DRBD resource (drbd1), and based on the configuration file for the first replicated storage resource, edit the settings accordingly and use a different port:

    resource drbd1 {
            disk /dev/drbd_db_vg/drbd_db_vol...