redis cluster所有节点IP修改处理方案

方案一:删除原Cluster信息,重新生成Cluster 节点信息

1.暂停cluster各个node节点

2.删除持久化文件和节点信息文件:

[root@centos1 6380]# ls
appendonly.aof  dump.rdb  nodes_6380.conf  redis.conf
[root@centos1 6380]# pwd
/usr/local/cluster/6380
[root@centos1 6380]# rm -f appendonly.aof dump.rdb nodes_6380.conf 

不删除aof rdb文件会在接下来重新创建节点过程中出现原节点存在数据(Not Empty)异常

3.利用redis-trib.rb 初始化集群信息

redis-trib.rb create --replicas 1 10.11.239.131:6379 10.11.239.131:6380 10.11.234.246:6379 10.11.234.246:6380 10.11.238.50:6379 10.11.238.50:6380

猜你喜欢

转载自my.oschina.net/LucasZhu/blog/1811986