zoukankan      html  css  js  c++  java
  • redis 集群 新增 master 节点 与 slave 挂靠命令

    1.新增 master

    redis-cli --cluster add-node 192.168.1.113:7007 192.168.1.111:7001   

    2.slave 挂靠 master

    [root@eshop-cache01 ~]# redis-cli --cluster add-node 192.168.1.113:7008 192.168.1.112:7004  --cluster-slave --cluster-master-id a7c1dd92253e952bb2f1d93d00dd801d1bc0f7eb
    >>> Adding node 192.168.1.113:7008 to cluster 192.168.1.112:7004
    >>> Performing Cluster Check (using node 192.168.1.112:7004)
    M: a7c1dd92253e952bb2f1d93d00dd801d1bc0f7eb 192.168.1.112:7004
       slots:[1365-5460] (4096 slots) master
       1 additional replica(s)
    S: 441d74da253e86db4e8aec0e26e2ed055c709405 192.168.1.111:7001
       slots: (0 slots) slave
       replicates a7c1dd92253e952bb2f1d93d00dd801d1bc0f7eb
    M: 5a36b804152cf43a4c0d4c5fd628ff39885ae06b 192.168.1.113:7007
       slots:[0-1364],[5461-6826],[10923-12287] (4096 slots) master
    M: a5bbab4f7ff2c9e984437229e8f65fa9ac70630c 192.168.1.112:7003
       slots:[6827-10922] (4096 slots) master
       1 additional replica(s)
    S: 537fdb0807dc92d22d5b1463985184d60ef32be0 192.168.1.113:7006
       slots: (0 slots) slave
       replicates a5bbab4f7ff2c9e984437229e8f65fa9ac70630c
    M: 6cfedc8e2561185e021c9c3b3e986ea7bcebe1f8 192.168.1.111:7002
       slots:[12288-16383] (4096 slots) master
       1 additional replica(s)
    S: c42d4d0979d18d6d5c0bb931bbbe5e3c5198e375 192.168.1.113:7005
       slots: (0 slots) slave
       replicates 6cfedc8e2561185e021c9c3b3e986ea7bcebe1f8
    [OK] All nodes agree about slots configuration.
    >>> Check for open slots...
    >>> Check slots coverage...
    [OK] All 16384 slots covered.
    >>> Send CLUSTER MEET to node 192.168.1.113:7008 to make it join the cluster.
    Waiting for the cluster to join
    
    >>> Configure node as replica of 192.168.1.112:7004.
    [OK] New node added correctly.
    

      

      

  • 相关阅读:
    建立自己的开发知识库?分享制作电子书的经验
    海量Office文档搜索
    为什么要检测数据库连接是否可用
    多年的.NET开发,也只学会了这么几招
    总结一下ERP .NET程序员必须掌握的.NET技术
    菜单设计器(Menu Designer)及其B/S,C/S双重实现(B/S开源)
    软件公司为什么要加密源代码
    .NET开发中经常用到的扩展方法
    在Win8 Mertro 中使用SQLite
    SQLite
  • 原文地址:https://www.cnblogs.com/EveningWind/p/12763050.html
Copyright © 2011-2022 走看看