1. 程式人生 > >如何調整ceph weight權重值

如何調整ceph weight權重值

感覺 1.2 weight 不一定 cep 查看 eal 通過 之前

1.通過命令ceph -s 或者ceph health檢查ceph 狀態,有osd near full

cluster bef6d01c-631b-4355-94fe-77d4eb1a6322
health HEALTH_WARN
4 near full osd(s)

2.ceph health detail 查看具體near full 的osd

osd.137 is near full at 86%
osd.169 is near full at 85%
osd.183 is near full at 86%
osd.199 is near full at 85%

3.通過ceph osd tree |grep osd.137查看具體的osd的weight值

137 1.63539 osd.137 up 1.00000 1.00000

169 1.63538 osd.169 up 0.89999 1.00000

4.調整osd的權重ceph osd crush reweight osd.134 1.5

單盤1.8TB,系統容量為1.635,權重為1.63539

1.635*0.86=1.406TB 那麽從1.63539假設調到1.5那麽1.406*1.5/1.63539=1.29TB,1.29/1.635=0.789,那麽即調整後的使用率會降為0.79

但實際結果為:82.4%(因此感覺也不一定按照比列來調整,具體什麽原因,有大神知道的,麻煩解答)

137 1.50000 1.00000 1674G 1379G 294G 82.40 1.13 258

而且在你調整完一個osd的weight後有可能新增其他的osd near full,而之前near full的osd也可能消失,因此感覺這個還是取決於crush map的pg分配,不是按照比列來的

5.ceph osd df|grep osd.x 查看reweight後的osd使用率

6.ceph -s 確認near full 的osd warning 消除

如何調整ceph weight權重值