删除监视器(手动)-连长Q629412693-20190820

删除监视器(手动)
此过程ceph-mon从群集中删除守护程序。如果此过程仅导致两个监视器守护程序,则可以添加或删除另一个监视器,直到您有许多ceph-mon可以达到仲裁的守护程序。
1.查看当前ceph mon stat
[root@node5 mon]# ceph mon stat
e2: 4 mons at {new-node5=192.168.110.7:6799/0,node1=192.168.110.3:6789/0,node2=192.168.110.4:6789/0,node3=192.168.110.5:6789/0}, election epoch 56, leader 0 node1, quorum 0,1,2,3 node1,node2,node3,new-node5

[root@node5 mon]# ceph mon dump
dumped monmap epoch 2
epoch 2
fsid 4fde6dd1-7e32-4f07-8f6f-9bb4577a041a
last_changed 2019-08-20 15:27:30.483648
created 2019-08-16 17:12:19.181235
0: 192.168.110.3:6789/0 mon.node1
1: 192.168.110.4:6789/0 mon.node2
2: 192.168.110.5:6789/0 mon.node3
3: 192.168.110.7:6799/0 mon.new-node5

2.停止显示器。
查看ceph服务,看到mon([email protected])服务
[root@node5 mon]# systemctl list-units | grep ceph
  var-lib-ceph-osd-ceph\x2d3.mount                                                    loaded active mounted   /var/lib/ceph/osd/ceph-3
  [email protected]                                                              loaded active running   Ceph cluster monitor daemon
  [email protected]                                                                  loaded active running   Ceph object storage daemon osd.3
  system-ceph\x2dmon.slice                                                            loaded active active    system-ceph\x2dmon.slice
  system-ceph\x2dosd.slice                                                            loaded active active    system-ceph\x2dosd.slice
  ceph-mds.target                                                                     loaded active active    ceph target allowing to start/stop all [email protected] instances at once
  ceph-mgr.target                                                                     loaded active active    ceph target allowing to start/stop all [email protected] instances at once
  ceph-mon.target                                                                     loaded active active    ceph target allowing to start/stop all [email protected] instances at once
  ceph-osd.target                                                                     loaded active active    ceph target allowing to start/stop all [email protected] instances at once
  ceph.target                                                                         loaded active active    ceph target allowing to start/stop all ceph*@.service instances at once
  
[root@node5 mon]# systemctl stop ceph-mon@node5 

3.从群集中删除监视器。
ceph mon remove {mon-id}
    [root@node5 mon]# ceph mon remove new-node5
    removing mon.new-node5 at 192.168.110.7:6799/0, there will be 3 monitors
    [root@node5 mon]# ceph -s
      cluster:
        id:     4fde6dd1-7e32-4f07-8f6f-9bb4577a041a
        health: HEALTH_OK
     
      services:
        mon: 3 daemons, quorum node1,node2,node3
        mgr: node1(active), standbys: node2, node3
        osd: 4 osds: 4 up, 4 in
     
      data:
        pools:   1 pools, 50 pgs
        objects: 18 objects, 7.87MiB
        usage:   4.04GiB used, 75.9GiB / 80.0GiB avail
        pgs:     50 active+clean

4.从中删除监视器条目ceph.conf。    
    删除new-node5和192.168.110.7
    [global]
    fsid = 4fde6dd1-7e32-4f07-8f6f-9bb4577a041a
    mon_initial_members = node1, node2, node3,node5
    mon_host = 192.168.110.3,192.168.110.4,192.168.110.5,192.168.110.7
    auth_cluster_required = cephx
    auth_service_required = cephx
    auth_client_required = cephx
    public network = 192.168.110.0/24
    cluster network = 192.168.110.0/24
    mon clock drift allowed = 2
    mon clock drift warn backoff = 30

你可能感兴趣的:(删除监视器(手动)-连长Q629412693-20190820)