ceph 剔除osd

扫码查看

先将osd.2移出集群

root@ceph-monster:~# ceph osd out osd.2
marked out osd.2.

root@ceph-monster:~# ceph osd tree
ID WEIGHT  TYPE NAME             UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 0.79999 root default
-2 0.39999     host ceph-monster
 0 0.20000         osd.0              up  1.00000          1.00000
 1 0.20000         osd.1              up  1.00000          1.00000
-3 0.39999     host ceph-node1
 2 0.20000         osd.2              up        0          1.00000
 3 0.20000         osd.3              up  1.00000          1.00000
root@ceph-monster:~# ceph osd stat
     osdmap e275: 4 osds: 4 up, 3 in; 137 remapped pgs

down掉osd.2并删除

root@ceph-monster:~# ceph osd down osd.2 ; ceph osd rm osd.2
marked down osd.2.
removed osd.2

root@ceph-monster:~# ceph osd tree
ID WEIGHT  TYPE NAME             UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 0.79999 root default
-2 0.39999     host ceph-monster
 0 0.20000         osd.0              up  1.00000          1.00000
 1 0.20000         osd.1              up  1.00000          1.00000
-3 0.39999     host ceph-node1
 2 0.20000         osd.2             DNE        0
 3 0.20000         osd.3              up  1.00000          1.00000

root@ceph-monster:~# ceph osd stat
     osdmap e281: 3 osds: 3 up, 3 in; 137 remapped pgs

删除osd.2的crush map

root@ceph-monster:~# ceph osd crush rm osd.2
removed item id 2 name 'osd.2' from crush map

root@ceph-monster:~# ceph osd tree
ID WEIGHT  TYPE NAME             UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 0.59999 root default
-2 0.39999     host ceph-monster
 0 0.20000         osd.0              up  1.00000          1.00000
 1 0.20000         osd.1              up  1.00000          1.00000
-3 0.20000     host ceph-node1
 3 0.20000         osd.3              up  1.00000          1.00000

root@ceph-monster:~# ceph osd stat
     osdmap e285: 3 osds: 3 up, 3 in

删除auth

root@ceph-monster:~# ceph auth del osd.2
updated
01-22 20:10
查看更多