After setting up the MARIADB galera cluster, how to start the whole cluster after it is stopped, we must start the node, today I try to stop all the cluster machines, and then start a node arbitrarily, found the following error:
170620 21:32:55 [ERROR] wsrep:it may isn't safe to bootstrap the cluster from this node. It was wasn't the last one to leave the cluster and may not be contain all the updates. To force cluster bootstrap with this node, edit the Grastate.dat file manually and set Safe_to_bootstrap to 1.
It means that the node is not the last node to leave the cluster (the last node that was stopped), it may not contain all the updated data, force it to start from that node, manually edit the Grastate.dat file, set the Safe_to_bootstrap=1, and, of course, We do not need to force the start from this node, we will each of the nodes under the Grastate.dat file (the file in the data directory), locate the Safe_to_bootstrap=1 node, and then start on that node.
Like the node I found here is node 3.
[Email protected] data]# more Grastate.dat
# Galera saved state
version:2.1
Uuid:43caaa91-54bf-11e7-9321-c60bd8969b24
seqno:2919
Safe_to_bootstrap:1
The first mariadb startup method in the cluster:
/etc/init.d/mysql start--wsrep-new-cluster
Other data startup methods in the cluster:
/etc/init.d/mysql start
MARIADB Galera Startup problem