如何調整ceph weight權重值


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 消除

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM