Changing myid of the Original Cluster
The myid values of the original cluster are 1 for ceph1, 2 for ceph2, and 3 for ceph3, which need to be changed to 80, 90, and 100 respectively.
- Find the leader node.
Run the /opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh status command on each node to determine the leader node. (For example, ceph3 is the leader node.)
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/bin-bcm/../conf/zoo.cfg Client port found: 2182. Client address: localhost. Client SSL: false. Mode: follower
- Change myid of the three nodes.
ceph1:
1echo 80 > /opt/apache-zookeeper-3.6.3-bin-bcm/zkData/myid
ceph2:
1echo 90 > /opt/apache-zookeeper-3.6.3-bin-bcm/zkData/myid
ceph3:
1echo 100 > /opt/apache-zookeeper-3.6.3-bin-bcm/zkData/myid
- Modify the cluster node configuration information in the /opt/apache-zookeeper-3.6.3-bin-bcm/conf/zoo.cfg file of each node.
1 2 3
server.80=ceph1:2889:3889;2182 server.90=ceph2:2889:3889;2182 server.100=ceph3:2889:3889;2182
- 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 restartceph2 (follower):
1/opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh restartceph3 (leader):
1/opt/apache-zookeeper-3.6.3-bin-bcm/bin/zkServer.sh restart - 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: follower [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: leader
Parent topic: Capacity Expansion Operations