Ceph 壞盤

語言: CN / TW / HK

Ceph壞盤

[Adding/Removing OSDs — Ceph Documentation](https://docs.ceph.com/en/nautilus/rados/operations/add-or-rm-osds/?highlight=removing osd#removing-the-osd)

[[email protected] my-cluster]# ceph osd tree
ID CLASS WEIGHT  TYPE NAME      STATUS REWEIGHT PRI-AFF
-1       0.14635 root default
-3       0.04878     host node1
 0   hdd 0.01949         osd.0      up  1.00000 1.00000
 3   hdd 0.02930         osd.3      up  1.00000 1.00000
-5       0.04878     host node2
 1   hdd 0.01949         osd.1      up  1.00000 1.00000
 4   hdd 0.02930         osd.4      up  1.00000 1.00000
-7       0.04878     host node3
 2   hdd 0.01949         osd.2      up  1.00000 1.00000
 5   hdd 0.02930         osd.5      up  1.00000 1.00000

# 檢視 OSD 延遲狀況,以防壞道情況拖垮 ceph 叢集
[[email protected] my-cluster]# ceph osd perf
osd commit_latency(ms) apply_latency(ms)
  5                  0                 0
  4                  0                 0
  0                  0                 0
  1                  0                 0
  2                  0                 0
  3                  0                 0

# 刪除步驟
ceph osd out {osd-num}
ceph osd crush remove {name}
ceph auth del osd.{osd-num}
ceph osd rm {osd-num}

#for example
ceph osd out osd.5 
ceph osd crush remove osd.5 
ceph auth del osd.5
ceph osd rm osd.5