Redis Cluster--运维管理
# src/redis-trib.rbinfo 172.16.101.54:6379172.16.101.54:6379 (610aa838...) -> 3 keys | 7220 slots | 1 slaves.
172.16.101.66:6379 (58a08dff...) -> 0 keys | 866 slots | 0 slaves.
172.16.101.55:6379 (4c7348ac...) -> 1 keys | 4096 slots | 1 slaves.
172.16.101.56:6379 (ece3a80f...) -> 1 keys | 4202 slots | 1 slaves.
5 keys in 4 masters.
0.00 keys per slot on average.
# src/redis-trib.rb reshard 172.16.101.54:6379
>>> Performing Cluster Check (using node 172.16.101.54:6379)
M: 610aa83831404be545b25cc7f7322e987da1dd33 172.16.101.54:6379
slots:866-6826,10923-12181 (7220 slots) master
1 additional replica(s)
S: b50ba506525ee547823b3d9a7e5a095933e3ff42 172.16.101.59:6379
slots: (0 slots) slave
replicates 4c7348ac575a1a3bd4357e937a8f94f1654193cf
M: 58a08dff7169bb0ce289c19a6520c85131bb44da 172.16.101.66:6379
slots:0-865 (866 slots) master
0 additional replica(s)
S: 28e8d5c8fd12533622d8110f8d262cb50120ca02 172.16.101.58:6379
slots: (0 slots) slave
replicates 610aa83831404be545b25cc7f7322e987da1dd33
M: 4c7348ac575a1a3bd4357e937a8f94f1654193cf 172.16.101.55:6379
slots:6827-10922 (4096 slots) master
1 additional replica(s)
M: ece3a80f6989fa7f8316d73ee30ceea84340f24e 172.16.101.56:6379
slots:12182-16383 (4202 slots) master
1 additional replica(s)
S: c79de1092011ed395ee772969274c0567c2b5dd1 172.16.101.60:6379
slots: (0 slots) slave
replicates ece3a80f6989fa7f8316d73ee30ceea84340f24e
All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
All 16384 slots covered.
How many slots do you want to move (from 1 to 16384)? 866
What is the receiving node ID?610aa83831404be545b25cc7f7322e987da1dd33
Please enter all the source node IDs.
Type 'all' to use all the nodes as source nodes for the hash slots.
Type 'done' once you entered all the source nodes IDs.
Source node #1:58a08dff7169bb0ce289c19a6520c85131bb44da
Source node #2:done
......
Moving slot 864 from 58a08dff7169bb0ce289c19a6520c85131bb44da
Moving slot 865 from 58a08dff7169bb0ce289c19a6520c85131bb44da
Do you want to proceed with the proposed reshard plan (yes/no)?
Moving slot 0 from 172.16.101.66:6379 to 172.16.101.54:6379:
Moving slot 1 from 172.16.101.66:6379 to 172.16.101.54:6379:
Moving slot 2 from 172.16.101.66:6379 to 172.16.101.54:6379:
......
# src/redis-trib.rb info 172.16.101.54:6379
172.16.101.54:6379 (610aa838...) -> 3 keys | 8086 slots | 1 slaves.
172.16.101.66:6379 (58a08dff...) -> 0 keys | 0 slots | 0 slaves.
172.16.101.55:6379 (4c7348ac...) -> 1 keys | 4096 slots | 1 slaves.
172.16.101.56:6379 (ece3a80f...) -> 1 keys | 4202 slots | 1 slaves.
5 keys in 4 masters.
0.00 keys per slot on average.
# src/redis-trib.rb del-node 172.16.101.54:6379'58a08dff7169bb0ce289c19a6520c85131bb44da'
页:
[1]