无数据丢失情况 root@ceph:~# ceph osd ok-to-stop 2 OSD(s) 2 are ok to stop without reducing availability or risking data, provided there are no other concurrent failures or interventions. 70 PGs are likely to be degraded (but remain available) as a result.
有数据丢失情况 root@ceph:~# ceph osd ok-to-stop 2 Error EBUSY: 18 PGs are already too degraded, would become too degraded or might become unavailable
3、标记OSD out, ceph osd out {osd-num}
1 2 3 4 5 6 7 8 9 10 11
root@ceph:~# ceph osd out 3 marked out osd.3. root@ceph:~# ceph osd tree ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF -1 0.08997 root default -3 0.08997 host ceph 0 ssd 0.02249 osd.0 up 1.00000 1.00000 1 ssd 0.02249 osd.1 up 1.00000 1.00000 2 ssd 0.02249 osd.2 up 1.00000 1.00000 3 ssd 0.02249 osd.3 down 0 1.00000
root@ceph:~# ceph osd tree ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF -1 0.06747 root default -3 0.06747 host ceph 0 ssd 0.02249 osd.0 up 1.00000 1.00000 1 ssd 0.02249 osd.1 up 1.00000 1.00000 2 ssd 0.02249 osd.2 up 1.00000 1.00000