Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan

12. Beyond the set up – recovery & self-healing options

by Jan Bachelor October 24, 2025

What to do when facing a Quorum Loss

What are the most common scenarios when a quorum is lost and thus the Galera cluster fails?

  • Case 1: No Arbitrator and half of the nodes go down: Imagine a case where you do not have an Arbitrator (as mentioned in the previous chapter when we use the Raspberry Pi for it) and one of the two Proxmox nodes where we run the Galera containers goes down. Then we would not have a majority of votes and the cluster would stop serving traffic.
  • Case 2: Power outage – all nodes go down: This can also happen (or more like will happen at some point whether you like it or not). When you start them up, you will notice that the cluster is not working anyway!

In either case, the cluster has to be recovered manually to prevent data loss. So it is a feature, not a bug! Please refer to this article if you have been affected by the cluster shutdown (or are just simulating it).

In a nutshell, the idea is to SSH into each node and verify which one is safe to bootstrap (the result should be 1 on one of them), then you can start a new cluster on that node. Once it is back up, you will need to restart MariaDB on each cluster node.

cat /var/lib/mysql/grastate.dat | grep safe_to_bootstrap

# Run this on whichever node results in 1:
sudo galera_new_cluster

# Watch the logs for changes
tail -n 50 /var/log/mysql/error.log

# Restart Maria DB on OTHER nodes
sudo systemctl restart mariadb

# Verify the cluster size afterwards from any node
mysql -e "SHOW STATUS LIKE 'wsrep_cluster_size';"

Self-healing options

  • Automation would be the key here. Firstly, we would run an Ansible playbook that connects to each node, verifies which node went down the last and attempts to recover it, restarting each MariaDB instance or even the entire container.
  • If that fails, we could use a tool like Terraform to start new MariaDB instances from our container template and then Ansible to trigger a playbook to run updates on each container, connect them into a cluster and to check if it can extract the dumps from a node and if not, to download them from a last known backup and import them.
    • We would also need to automatically update items in the back-end pool in our Load Balancer (such as by leveraging OPNSense API for HAProxy).

Such an approach definitely warrants its own article – let me know in the comments below if you are interested!

This concludes our rather comprehensive guide on how to deploy a Galera Cluster using technologies like Proxmox, OPNSense, HAProxy and LXC containers. Feel free to share your own experience and stack, perhaps this guide could be expanded to account for more options in the set up.

11. Entrust your Galera Cluster with data
Go back to course overview: Deploy MariaDB Galera Cluster on Proxmox

Leave a Comment Cancel Reply

Save my name, email, and website in this browser for the next time I comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 FacebookWhatsappEmail

Course Steps

  1. 1. Galera Cluster - what is it and why is it good for your home set up
  2. 2. Create your first container as a template on Proxmox
  3. 3. Create an SST user on your template container
  4. 4. Security Hardening & Logging on Galera template LXC
  5. 5. Turn the MariaDB container to a template - full vs linked clones?
  6. 6. Deploy 4x LXC containers on 2x Proxmox nodes
  7. 7. Configure Galera on each CT
  8. 8. Configure HAPRoxy for your Galera cluster
  9. 9. Understanding Quorum - When the Raspberry Pi comes in
  10. 10. Set up Monitoring - UpTime Kuma
  11. 11. Entrust your Galera Cluster with data
  12. 12. Beyond the set up - recovery & self-healing options

Other courses

Create an automated Gravity workflow that will allow...

January 19, 2024

Dynamically Populate Gravity Forms from Google Sheets (GSheets...

March 16, 2021

Concur Alternative: Import Employees’ Credit Card Expenses to...

January 19, 2024

Turn your Raspberry Pi into a Proxmox Backup...

July 13, 2025

Install iRedMail Mail Server As Proxmox VM With...

October 31, 2024

Recent Posts

  • How to get LXC containers for Proxmox outside of ready-made templates

  • How to join two Proxmox nodes into a cluster (PVE 8.x)

  • How to Rename a Proxmox Node

Facebook Twitter Instagram Pinterest Linkedin Youtube

All Rights Reserved. The theme was customized from Soledad, see PenciDesign

Bachelor Tech
  • Home
  • Tutorials
  • Tips
  • Portfolio
  • About Jan
  • Contact Jan