PXC集群添加新节点如何使用IST方式避免使用SST方式传输数据

来源:互联网 发布:芈月传 大秦帝国 知乎 编辑:程序博客网 时间:2024/03/29 14:28

思路:
先搭建主从复制,然后将从库加入PXC集群中。

具体步骤:
选择集群中任意一个节点A,xtrabackup生成备份。
利用xtrabackup备份搭建从库B。
测试主从同步是否成功。
从库上stop slave,记录此时对应的主库binlog位置。
通过主库上的binlog位置获取数据库xid。
将主库A库grastate.dat拷贝到B库并修改seqno为对应的xid。
开启B库PXC相关配置(wsrep)。
B库start加入集群。

Question:
grastate.dat with seqno -1 on a healthy cluster. Why?
Answer:
A grastate.dat with a sequence number of -1 is fine on a running node.
When the cluster stops cleanly, the sequence number will be set to a value on each node. You’ll then have to bootstrap the cluster from the node which has the most advanced seqno.

0 0
原创粉丝点击