Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Hi,
Please create documentation for the systemd-script galera_recovery
(In old systemV version you could run mysqld --wsrep-recover to see this)
The script is used when the cluster went down in an unorganized way, for example due to a power outage. Basically this tells you which node has most transactions.
Please note that it does not protect you against losing transactions, if innodb_flush_log_at_trx_commit != 1, you may still have lost transactions. The only thing this helps you with it that it finds the node that has MOST transactions stored.
The output looks something like this:
{{[mysql@host ~]$ galera_recovery
2018-02-24 13:15:42 140092558485760 [Note] /usr/sbin/mysqld (mysqld 10.1.21-MariaDB) starting as process 4853 ...
WSREP: Recovered position 29e50a8c-c7b6-11e6-abce-c27216641a78:34877824
--wsrep_start_position=29e50a8c-c7b6-11e6-abce-c27216641a78:34877824}}
The node where 34877824 is the highest is the right node to start. To start the node, use an editor to change grastate.dat, change safe_to_bootstrap to 1, and then bootstrap the node with galera_new_cluster.