[MDEV-15410] Create documentation for galera_recovery command Created: 2018-02-24  Updated: 2020-07-22

Status: Open
Project: MariaDB Server
Component/s: Documentation, Galera
Fix Version/s: None

Type: Task Priority: Major
Reporter: Michaël de groot Assignee: Ian Gilfillan
Resolution: Unresolved Votes: 1
Labels: 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.



 Comments   
Comment by Jan Lindström (Inactive) [ 2019-12-12 ]

greenman Can you put this on some priority queue to be done.

Comment by Geoff Montee (Inactive) [ 2020-07-22 ]

I added some basic documentation about this a while ago:

https://mariadb.com/kb/en/systemd/#recovering-a-nodes-cluster-position

https://mariadb.com/kb/en/getting-started-with-mariadb-galera-cluster/#determining-the-most-advanced-node

Generated at Thu Feb 08 08:21:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.