On this page
Short answer
After a Galera split or full outage, bootstrap from the most advanced node only. Check wsrep_cluster_status on every node first: if one node is Primary, rejoin the others to it. If none is, find the highest seqno with grastate.dat or mysqld --wsrep-recover, then promote that node with pc.bootstrap=YES or start it with galera_new_cluster. Bootstrapping from any other node can lose data.
After a Galera split or a full outage, bootstrap from the most advanced node and no other. On each node run SHOW GLOBAL STATUS LIKE 'wsrep_cluster_status'. If any node reports Primary, rejoin the others to it. If none does, find the highest seqno, then promote that node with pc.bootstrap=YES or start it with galera_new_cluster. Steps are from the MariaDB Galera documentation, read 3 December 2026. For quorum design and node counts, see our Galera production guide, which this post does not repeat.
If a cluster is already down, our mariadb consulting engineers work through the same order of checks.
Is the cluster split, or is it completely down?
The two cases need different actions. A split-brain leaves both halves non-Primary, and a simultaneous crash or shutdown that loses quorum also needs a manual bootstrap. A single node failure loses no data: the node reconnects and runs a state transfer.
| Status variable | Healthy | Trouble |
|---|---|---|
wsrep_cluster_status | Primary | non-Primary (isolated) or Disconnected |
wsrep_ready | ON | OFF means the node rejects almost all queries |
wsrep_cluster_size | Matches expected node count | Smaller means a partition |
wsrep_local_state_comment | Synced | Donor, Joining, Joined or Initialized during transfers |
The documentation says to step in only if no node returns Primary.
How do you find the most advanced node?
- Stop and check. Do not restart anything yet. Collect
wsrep_cluster_statusfrom every node. - Read
grastate.datin each datadir. After an orderly shutdown it holds aseqno. After a full crash it showsseqno: -1. - Recover the position. Run
--wsrep-recover(writtenmysqld --wsrep-recoverin the docs) on each node. It reads the InnoDB logs and reports the last known transaction position. - Compare. The most advanced node has the highest
seqno. - Look at
safe_to_bootstrap. It is1on the last node to shut down in an orderly stop. After a full crash all nodes show0, which is why you compare positions yourself.
Galera refuses to bootstrap a node marked as unsafe and logs a message, so a refusal is a signal to re-check, not to force it.
How do you bring the cluster back?
If at least one node is alive but non-Primary, the least disruptive route is to run this on the most advanced node:
SET GLOBAL wsrep_provider_options='pc.bootstrap=YES';
The documentation describes this as non-destructive, and it can keep the GCache, which helps other nodes rejoin by incremental state transfer instead of a full snapshot. If the wsrep_provider plugin is enabled, use SET GLOBAL wsrep_provider_pc_bootstrap=ON; instead.
If every node is stopped, set safe_to_bootstrap: 1 in grastate.dat on the most advanced node, start it with galera_new_cluster (a systemd wrapper that runs the server with --wsrep-new-cluster) and start the others normally. Never use --wsrep-new-cluster when joining an existing cluster.
What happens when the other nodes rejoin?
A rejoining node gets an incremental state transfer (IST) if a donor's write-set cache still holds what it missed, and otherwise a full state snapshot transfer (SST). Watch wsrep_local_state_comment move from Joining to Synced on each node, and confirm wsrep_cluster_size matches before letting the application back in. pc.recovery is on by default and can restore the last saved component automatically after a full outage.
For a written runbook around this, see our Galera quorum loss support use case.
Why does a Galera cluster split into non-Primary halves?
A Galera cluster stays Primary only while a node can see more than half of the last known members, which is the primary component. With three nodes, one failure leaves two nodes that still hold quorum. With two nodes, or with an even number split evenly across two data centers, a network partition leaves each side holding exactly half, so neither side has quorum and both turn non-Primary. That is the split-brain case this post is about, and it is why an odd number of nodes is the usual advice. A Galera Arbitrator (garbd) can act as a voting member that stores no data, which gives a two-node cluster a third vote. Sizing the voting members is covered in the production guide linked above.
What should you check before the application reconnects?
Treat the first minutes after a bootstrap as a verification window, not a finish line.
- Run
SHOW GLOBAL STATUS LIKE 'wsrep%'on every node and confirmwsrep_cluster_statusisPrimary,wsrep_readyisONandwsrep_cluster_sizeis the node count you expect. - Check how your proxy, such as MaxScale or ProxySQL, decides a node is healthy, and let traffic back only to nodes that report
Synced. - Read the MariaDB error log on each node for state transfer messages and for any node that refused to join.
- Before you edit
grastate.dator force a bootstrap, copy the datadir or at least that file, so a wrong choice of node can be examined afterwards rather than guessed at. - Once the cluster is stable, take a fresh backup and write down which node was bootstrapped and why. The next outage review will want that record.
Sources
- Resetting the quorum (cluster bootstrap), MariaDB documentation, read 3 December 2026.
- Recovering a primary component, MariaDB documentation, read 3 December 2026.
- MariaDB Galera Cluster guide, MariaDB documentation, read 3 December 2026.
- Understanding quorum, monitoring and recovery and Monitoring MariaDB Galera Cluster, MariaDB documentation, read 3 December 2026.
- Getting started with MariaDB Galera Cluster, MariaDB Knowledge Base, read 3 December 2026.
Frequently Asked Questions
What does non-Primary mean in MariaDB Galera?
The node is not part of a component that has quorum, so it rejects almost all queries. wsrep_cluster_status reports non-Primary for an isolated node and Disconnected when the node cannot reach a cluster. The data on the node is not lost.
What is safe_to_bootstrap in grastate.dat?
It marks whether a node may start a new cluster. It is set to 1 on the last node to shut down cleanly. After a full crash every node shows 0, so you compare positions with mysqld --wsrep-recover and set it by hand on the most advanced node.
Can I bootstrap from any node?
No. MariaDB's documentation warns that starting the cluster from any node other than the most advanced one can result in data loss. Compare seqno values across nodes first.
Talk to an engineer
Need a hand with MariaDB?
Senior engineers who run it in production. Get a quote or a free consultation, no sales pitch.

