集群删除节点
删除redis服务:
192.168.2.111:6381主节点
192.168.2.111:6382从节点
一: 删除主节点
1:先清除主节点所有的哈希槽 -- 分片
[root@192 ~]# redis-cli --cluster reshard 192.168.2.111:6381
结果:
>>> Performing Cluster Check (using node 192.168.2.111:6381)
M: 4ca16d842ea07379be11371aa2381529a9b5d7bc 192.168.2.111:6381
slots:[0-165],[5461-5627],[10923-11088] (499 slots) master
S: f3dbdddc6c2dc23e1dde2e6e6662c6c5ebf167e9 192.168.2.111:6380
slots: (0 slots) slave
replicates 75b477ef4967c1bf50502cb834df3fd5660cfa22
M: ebc80d8dcabe30645b96fdfe08de84f52a42cbff 192.168.2.113:6379
slots:[11089-16383] (5295 slots) master
1 additional replica(s)
M: 75b477ef4967c1bf50502cb834df3fd5660cfa22 192.168.2.112:6379
slots:[5628-10922] (5295 slots) master
1 additional replica(s)
M: 63cfbaf1e7d7d9fce095d0f485776ba15404bf8a 192.168.2.111:6379
slots:[166-5460] (5295 slots) master
1 a