1. 程式人生 > >Redis叢集重啟

Redis叢集重啟

[[email protected] opt]# cd /opt/redis
[[email protected] redis]# 
[[email protected] redis]# src/redis-trib.rb create --replicas 1 192.168.251.51:6371 192.168.251.51:6372 192.168.251.51:6373 192.168.251.51:6374 192.168.251.51:6375 192.168.251.51:6376
>>> Creating cluster
>>> Performing hash slots allocation on 6 nodes...
Using 3 masters:
192.168.251.51:6371
192.168.251.51:6372
192.168.251.51:6373
Adding replica 192.168.251.51:6374 to 192.168.251.51:6371
Adding replica 192.168.251.51:6375 to 192.168.251.51:6372
Adding replica 192.168.251.51:6376 to 192.168.251.51:6373
M: 601190311b907e03b62704c160b368b82fcad806 192.168.251.51:6371
   slots:0-5460 (5461 slots) master
M: 2d7430d3ffd28f12194966b16f569044b6d28506 192.168.251.51:6372
   slots:5461-10922 (5462 slots) master
M: 58ae303b38add3ba69dcd9529cf1c25bd16c872b 192.168.251.51:6373
   slots:10923-16383 (5461 slots) master
S: 41f0b8c7e91a010432d6bf338373b85b57f395ed 192.168.251.51:6374
   replicates 601190311b907e03b62704c160b368b82fcad806
S: e689c8437b826fdc8677822f5837ef376bc44229 192.168.251.51:6375
   replicates 2d7430d3ffd28f12194966b16f569044b6d28506
S: a82c996a01bceb07fe64087502fe1297111e7c49 192.168.251.51:6376
   replicates 58ae303b38add3ba69dcd9529cf1c25bd16c872b
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join...
>>> Performing Cluster Check (using node 192.168.251.51:6371)
M: 601190311b907e03b62704c160b368b82fcad806 192.168.251.51:6371
   slots:0-5460 (5461 slots) master
M: 2d7430d3ffd28f12194966b16f569044b6d28506 192.168.251.51:6372
   slots:5461-10922 (5462 slots) master
M: 58ae303b38add3ba69dcd9529cf1c25bd16c872b 192.168.251.51:6373
   slots:10923-16383 (5461 slots) master
M: 41f0b8c7e91a010432d6bf338373b85b57f395ed 192.168.251.51:6374
   slots: (0 slots) master
   replicates 601190311b907e03b62704c160b368b82fcad806
M: e689c8437b826fdc8677822f5837ef376bc44229 192.168.251.51:6375
   slots: (0 slots) master
   replicates 2d7430d3ffd28f12194966b16f569044b6d28506
M: a82c996a01bceb07fe64087502fe1297111e7c49 192.168.251.51:6376
   slots: (0 slots) master
   replicates 58ae303b38add3ba69dcd9529cf1c25bd16c872b
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
[
[email protected]
redis]#