3 Node Cluster

Overview

We have prepared 3 machines with RedHat 8 operating system in the same network:

10.1.1.2 vprotect1.local 10.1.1.3 vprotect2.local 10.1.1.4 vprotect3.local

We will use IP 10.1.1.5/23 for floating IP of our cluster.

1. Storware server installation

Run that steps on all machines under pacemaker cluster:

  1. Add Storware repository

    vi /etc/yum.repos.d/vProtect.repo
    # Storware Backup & Recovery - Enterprise backup solution for virtual environments repository
    [vprotect]
    name = vProtect
    baseurl = https://repo.storware.eu/storware/current/el8/
    gpgcheck = 0
  2. Add MariaDB repository

    vi /etc/yum.repos.d/MariaDB.repo
    # MariaDB 10.10 RedHatEnterpriseLinux repository list - created 2023-08-23 08:49 UTC
    # https://mariadb.org/download/
    [mariadb]
    name = MariaDB
    # rpm.mariadb.org is a dynamic mirror if your preferred mirror goes offline. See https://mariadb.org/mirrorbits/ for details.
    # baseurl = https://rpm.mariadb.org/10.10/rhel/$releasever/$basearch
    baseurl = https://mirror.creoline.net/mariadb/yum/10.10/rhel/$releasever/$basearch
    # gpgkey = https://rpm.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgkey = https://mirror.creoline.net/mariadb/yum/RPM-GPG-KEY-MariaDB
    gpgcheck = 1
  3. Install Storware server

    dnf install -y vprotect-server
  4. Initialize Storware server

    vprotect-server-configure
  5. Redirect 8181 port to 443 on firewall

    /opt/vprotect/scripts/server/ssl_port_forwarding_firewall-cmd.sh
  6. Add redirection to allow local node to communicate with server on cluster IP

    firewall-cmd --permanent --direct --add-rule ipv4 nat OUTPUT 0 -p tcp -o lo --dport 443 -j REDIRECT --to-ports 8181
    firewall-cmd --complete-reload
  7. Open firewall for MariaDB replication:

    firewall-cmd --add-port=3306/tcp --permanent
    firewall-cmd --complete-reload

2. Configuration custom SSL certificate

All steps run as root user. All steps execute on first node of cluster.

Follow steps from enabling HTTPS connectivity for nodes

3. Storware node installation

Execute on all pacemaker nodes, and other Storware node machines.

  1. Add Storware repository

  2. Install Storware node

  3. Initialize Storware node

  4. Only when we want backup Proxmox by export strategy.

4. Backup destination configuration

For multi-node/cluster environment for backup destination we suggest to use NFS, Object Storage, Deduplication appliances. In this example we use NFS.

Execute on all Storware node machines.

  1. Add entry in /etc/fstab for automount NFS

  2. Create directories for mount NFS share:

  3. Mount NFS share

  4. Create subdirectories for backup destinations (run only on single node)

  5. Add privileges for newly created shares

5. Cluster Configuration

Cluster is controlled by pacemaker.

5.1 Prepare operating system

All steps run as root user. Run that steps on all machines in pacemaker cluster:

  1. Stop all services controlled by cluster, and disable autostart.

5.2 Set MariaDB replication

All steps run as root user. Run on all cluster nodes:

  1. Create MariaDB user replication with password vPr0tect for replication:

  2. Add changes to /etc/my.cnf.d/server.cnf in mysqld section:

  3. Add changes to /etc/my.cnf.d/server.cnf in mysqld section:

    On vprotect1.local:

    On vprotect2.local:

    On vprotect3.local:

  4. Restart MariaDB service:

  5. On each host show output from command:

    Output from vprotect3.local:

    Output from vprotect1.local:

    Output from vprotect2.local:

  6. Set replication on each MariaDB server:

    Execute on vprotect1.local:

    Execute on vprotect2.local:

    Execute on vprotect3.local:

  7. Start replication MariaDB: Execute on vprotect1.local:

    Show output from command:

    Wait until you see in output:

    Repeat last step on host vprotect2.local and vprotect3.local.

5.2.1 Make same passwords for vprotect user in MariaDB

Execute only on first node of cluster.

  1. Copy password from file /opt/vprotect/payara.properties

  2. Log in to MariaDB

  3. Set password for vprotect user:

  4. Copy configuration files from vprotect1.local to other cluster hosts

  5. Add permissions for copied files

5.3 Configure pacemaker

All steps run as root user.

5.3.1 Run on every node in cluster

  1. Install pacemaker packages

  2. Create SSH keys, and add them on other hosts to known.

  3. Open ports on firewall

  4. Start pcsd service

  5. Set same password for user hacluster

5.3.2 Run only on first node of cluster

  1. Authenticate nodes of cluster

  2. Create cluster

  3. Run cluster

  4. Power off stonith

  5. Create floating IP in cluster

  6. Add vprotect-server to cluster

  7. Add vprotect-node to cluster

6. Register Storware node on server (on all hosts)

  1. Add certificate to trusted

  2. Register node on server

7. Useful commands to control cluster:

For update, or service Storware unmanage services from cluster:

Back to manage:

Show status of cluster:

Stop cluster node:

Stop all nodes of cluster:

Start all nodes of cluster:

Clear old errors in cluster:

Last updated