1、将节点重新加入集群
6387为主节点,6388为从节点
步骤看上一篇
2、重新分配槽号redis-cli --cluster reshard 192.168.1.138:6381
说明:
ip:port:为集群中任意一个节点就行
步骤一:
>>> Performing Cluster Check (using node 192.168.1.138:6381)
M: c790b5f9584777ba8d9f96be5fe42b2efe646635 192.168.1.138:6381
slots:[0-5460] (5461 slots) master
1 additional replica(s)
S: 7599539245821b1a2e185439f3170b896b287106 192.168.1.138:6388
slots: (0 slots) slave
replicates ca77bc2a223c64a7af727b24172ae8f43d3e9b5a
S: b264b25c716863096d0c2fe39483130cbfeba894 192.168.1.138:6385
slots: (0 slots) slave
replicates f9200d36046d8325817c8014155e8f9950760da4
S: 33add5fdf6d9cc3eb8656c865403a34b237b4b73 192.168.1.138:6384
slots: (0 slots) slave
replicates 691e5855e8f274a6ea61dc95dbed89da87ed6053
S: d7bbc7bb0b501b421d527f6c302a8abe00aa535b 192.168.1.138:6386
slots: (0 slots) slave
replicates c790b5f9584777ba8d9f96be5fe42b2efe646635
M: f9200d36046d8325817c8014155e8f9950760da4 192.168.1.138:6383
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
M: ca77bc2a223c64a7af727b24172ae8f43d3e9b5a 192.168.1.138:6387
slots: (0 slots) master
1 additional replica(s)
M: 691e5855e8f274a6ea61dc95dbed89da87ed6053 192.168.1.138:6382
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
How many slots do you want to move (from 1 to 16384)? 4096
继续阅读redis学习(10)—redis哈希槽扩容与缩小