Codis Codis-ha after the master-slave switch server marked as offline, mainly based on data security considerations, this time requires manual operation to restore master-slave relations
After the offline node executes the Add to group command, the offline host is re-established with the same group as the master host.
[Email protected]_168_171_137 sample]$. /bin/codis-config-c config.ini-l./log/cconfig.log server add 4 192.168.171.140:6381 slave
{
"MSG": "OK",
"ret": 0
}
Start
Nohup. /bin/codis-server./redis_conf/6381.conf &>./log/redis_6381.log &
Nohup. /bin/codis-server./redis_conf/6382.conf &>./log/redis_6382.log &
Delete a group
.. /bin/codis-config-c config.ini-l./log/config.log Server Remove-group 4
A single host
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Promote 1 192.168.174.135:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Promote 2 192.168.174.136:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Remove 1 192.168.174.135:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Remove 2 192.168.174.136:6381
./codis-ha--codis-config=192.168.171.135:18087--productname=redis_cluster1 &
This article is from the "years, the Allure" blog, please be sure to keep this source http://alca0126.blog.51cto.com/7826974/1769647
Codis-ha server marked as offline after master-slave switchover