我要评分
获取效率
正确性
完整性
易理解

Modifying the Configuration of the Original Cluster

  1. Modify the cluster configuration information in /opt/apache-zookeeper-3.6.3-bin-bcm/conf/zoo.cfg of the original cluster.
    1
    2
    3
    4
    5
    server.80=ceph1:2889:3889;2182
    server.90=ceph2:2889:3889;2182
    server.100=ceph3:2889:3889;2182
    server.4=ceph4:2889:3889;2182
    server.5=ceph5:2889:3889;2182
    
  2. Restart the ZooKeeper server on follower nodes in ascending order based on myid and then the leader node.

    ceph1 (follower):

    1
    /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh restart
    

    ceph2 (follower):

    1
    /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh restart
    

    ceph3 (leader):

    1
    /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh restart
    
  3. Run the /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh status command on each node to check the original cluster status.
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    [root@ceph3 bin]# /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh status
    ZooKeeper JMX enabled by default
    Using config: /opt/apache-zookeeper-3.6.3-bin-bcm/bin/../conf/zoo.cfg
    Client port found: 2182. Client address: localhost. Client SSL: false.
    Mode: leader
    [root@ceph1 bin]# /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh status
    ZooKeeper JMX enabled by default
    Using config: /opt/apache-zookeeper-3.6.3-bin-bcm/bin/../conf/zoo.cfg
    Client port found: 2182. Client address: localhost. Client SSL: false.
    Mode: follower
    [root@ceph2 bin]# /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh status
    ZooKeeper JMX enabled by default
    Using config: /opt/apache-zookeeper-3.6.3-bin-bcm/bin/../conf/zoo.cfg
    Client port found: 2182. Client address: localhost. Client SSL: false.
    Mode: follower