I searched the Redis cluster official documentation and found no way to restart and shut down the cluster. Why not, guess Redis cluster at least three nodes to run, three at the same time the possibility of hanging off relatively small, as long as not at the same time, hanging off the machine after the addition of the cluster, the cluster can be good operation, in case of hanging at the same time, the data is not backed up, there is a big trouble.
The nodes in the Redis cluster cluster are basically peers and have no management nodes. If you want all nodes to shut down, only the process is closed # pkill-9 Redis
All clusters are shut down and then restarted, the following error is reported
# redis-trib.rb Create--replicas 1 xxx.xxx.xxx.xxx:6379 etc.
will report the following error,
[ERR] Node 192.168.10.219:6379 is not empty. Either the node already knows other nodes (check with CLUSTER nodes) or contains some key in database 0.
The first launch of the cluster,/etc/redis under the only redis.conf, so I want to remove all but redis.conf other files removed, in the boot is certainly possible, but the cluster is data, so the configuration files and data files are preserved.
# Cd/etc/redis
# rm-f *.aof nodes-63*
# ll//retains configuration files and data files
Total Dosage 204
-rw-r--r--1 root root 18 May 7 11:21 Dump-6379.rdb
-rw-r--r--1 root root 18 May 7 11:21 Dump-6380.rdb
-rw-r--r--1 root root 18 May 7 11:21 Dump-6381.rdb
-rw-r--r--1 root root 41412 April 23:30 redis-6379.conf
-rw-r--r--1 root root 41412 April 23:39 redis-6380.conf
-rw-r--r--1 root root 41412 April 23:39 redis-6381.conf
This is possible to start, but the original data is lost, do not know that their own ideas are not right, or Redis cluster did not consider, all nodes will be hung off the situation.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Redis cluster cluster restart shutdown