[ClusterLabs] Problem with broken mysql-replication

Niels Kobschaetzki niels at kobschaetzki.net
Wed Feb 12 06:44:58 EST 2020


I am having a problem repairing a broken mysql-replication. The way I
want to use is to clone the database from the master with xtrabackup
from percona, get up to date after reactivating the replication, stop
the process and then unstandby the slave-node.
That's my understanding after reading: https://github.com/Percona-Lab/pacemaker-replication-agents/blob/master/doc/PRM-setup-guide.rst#how-to-repair-replication

The problem I am facing is that the replication immediately breaks when
I unstandby the node.
Pacemaker uses older positions for the binlog-file and the position
compared to the reality and sets those when I unstandby the node.

When I look at 'pcs property list' I see 

p_mysql_REPL_STATUS: mysql-bin.000006|154|104857600

My educated guess is that the first one is the file, the second is the
position and I have no idea about the 3rd one but the number is pretty
much exactly 100MB, thus I guess I can just keep the number.

The reality when I do a show slave status is
Master_Log_File: mysql-bin.000606            
Read_Master_Log_Pos: 101706829                  

Before I start the replication to get up-to-date I have this:
mysql-bin.000597        26926601

The only way I see to update p_mysql_REPL_STATUS is to standby the
master node which means a downtime.

'pcs property set' does not work because p_mysql_REPL_STATUS is an
unknown property and I am to afraid of a '--force'.

I am also not sure if I would need to manipulate 
p_mysql_NEW_MASTER_LAST_TRX: mysql-bin.000037@|2056,48113623ee5960084c080aa154335cd8|3007,5616c62846d51cb553015a9ec1af91cf|3958,37be58c5bc06c2e07681222f36fe31ff|4909,399e443bc63b222e76208a6297108866|@|
p_mysql_REPL_INFO: db00|mysql-bin.000037|4909
p_mysql_REPL_STATUS: mysql-bin.000006|154|104857600

Looking into the source of the replication agent on github does not help
me because I cannot find anythin about p_mysql_repl_status.

How can I fix the replication of the database without taking down the
master as well?

Cheers and thanks for any help,


More information about the Users mailing list