Redis 3.0.7版不支持带密码的cluster rebalance操作

一、前言

因业务需要扩容,考虑到集群单实例容量已经超过10GB,算是比较大的情况了。所以不能直接调整maxmemory参数进行扩容,需要加节点动态扩容。

业务集群版本是3.0.7版本的。

二、操作

2.1 模拟和执行

在对3.0.7版带密码的集群加好新主从,模拟迁槽位没有问题:

./redis-trib.rb rebalance --password "xxx" --use-empty-masters --simulate xx:xx1
...
...

但是真正执行的时候出问题了:

./redis-trib.rb rebalance --password "xxx" --use-empty-masters xx:xx1
>>> Performing Cluster Check (using node xx:xx1)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
[WARNING] Node xx:xx1 has slots in migrating state (13107).
[WARNING] Node xx:xx2 has slots in importing state (13107).
[WARNING] The following slots are open: 13107
>>> Check slots coverage...
[OK] All 16384 slots covered.
*** Please fix your cluster problems before rebalancing

错误输出提示需要先 fix 集群的问题才能继续做rebalance操作。

2.2 fix

进行fix操作

./redis-trib.rb fix --password "xxx" xx:xx1
>>> Fixing open slot 13107
Set as migrating in: xx:xx1
Set as importing in: xx:xx2
Moving slot 13107 from xx:xx to xx:xx1: 
[ERR] Calling MIGRATE: ERR s
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值