Question

I understand that pt-table-checksum can do checksum compares between a master's DB and a slave's DB easily.

However, let's say your master has two slaves replicating from it for the same DB, i.e. Slave 1 and Slave 2.

Is there a way to use pt-table-checksum to run a direct checksum comparison between Slave 1 and Slave 2's databases? In this scenario, I am not as concerned with comparing any of the slaves with the master itself.

Thanks IS

Was it helpful?

Solution

If I'm not mistaken the pt-table-checksum uses report_host value to find slaves.

May I suggest:

  1. stop slave2. Note its current position.
  2. Temporarily set up slave2 to replicate slave1 (binglog needs to be enabled on slave1)
  3. Start only the io thread to get replication chain (i.e. start slave io_thread;)
  4. Run pt-table-checksum from slave1
  5. After check is done, stop slave and restore original replication on slave2 with saved position

This way you don't run the risk of messing up any slave.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top