Comments - Galera Cluster Recovery
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
If all servers are offline at the same time (such as during a power outage), then the cluster will need to be re-created following a crash procedure.
1. Check each node and see if they all have a zero in the "safe_to_bootstrap" value. If any have a 1 as the value, that is the server you start first.
2. If they all have an invalid seqno of -1 and none have a value of 1 in "safe_to_bootstrap" then you need to temporary start the database service on each server with a recovery option so you can see the number associated to the "Recovered Position"
srv-db1 shows position is 31:
srv-db2 shows position is 29:
srv-db3 shows position is 30:
3. In this example, srv-db1 has the highest transaction number of 31 and should be the 1st node to be started in the cluster. Modify the grastate.dat and change "safe_to_bootstrap" to 1.
4. Now you can follow the normal procedure to start a new Galera cluster using this server as the starting node.