Not the answer you need?
Register and ask your own question!

Problem with master info when creating a slave from an existing slave with Xtrabackup

turagittechturagittech EntrantInactive User Role Beginner
We tried a couple of days ago to create a slave using an existing slave as the place to copy from, we are using mariadb 10.0.14.

We tried a couple of ways to point that slave to the master and in the end had to use the original slave as the master for this slave, creating a daisy chain instead of two slave directly pointing to the one master.
That slave has log_bin enabled and the log_bin file numbers on it are at a higher number than the current master. This occurred due to this slave having been a master previously and us not disabling log_bin when restarting the slave after switching masters.
Using the notes at http://www.percona.com/doc/percona-xtrabackup/2.1/howtos/setting_up_replication.html to create a slave from an existing slave left us a little short and had to work a couple of things out.
The xtrabackup_slave_info file contained change master to slave_pos for GTID not being fully across GTID I wasn't sure how the slave was supposed to sync first with a file and position number.
There are a few steps missing for mariadb in that note now pertaining to how mariadb gtid is implemented
My question is what are the steps to take this from a copied sslave to getting it to sync to the master not the other slave as its mater creating a daisy chain?
Should I enable GTID as we are not currently using it?
Was it just a case of entering "Change master to master_host Master_user, Master_password" without master_file and position
followed by Change master to slave_pos
and then Slave Start?
Would that have allowed that slave to join the actual master and rectify the Log_bin file numbers and position being different?
master mysql-bin.000018
slave 1 mysql-bin.000021


Should I now enable gtid so allowing me to switch from slave 1 as the master for slave two or is this problem of position number being higher a real problem?
I do have the option of turning the bin_log off on slave 1 forcing a change in behaviour but perhaps other don't and I may not at some stage in the future.

Any assistance is greatly appreciated

Peter

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.