ceph修改crush规则,修改故障域为osd

修改故障域从host到osd

 

[root@cluster9 ceph-cluster]# cd /etc/ceph/
[root@cluster9 ceph]# ceph osd getcrushmap -o /etc/ceph/crushmap
18
[root@cluster9 ceph]# crushtool -d /etc/ceph/crushmap -o /etc/ceph/crushmap.txt
[root@cluster9 ceph]# sed -i 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' /etc/ceph/crushmap.txt
[root@cluster9 ceph]# grep 'step chooseleaf' /etc/ceph/crushmap.txt
step chooseleaf firstn 0 type osd
[root@cluster9 ceph]# crushtool -c /etc/ceph/crushmap.txt -o /etc/ceph/crushmap-new
[root@cluster9 ceph]# ceph osd setcrushmap -i /etc/ceph/crushmap-new
19

 

 

 

 

 

参考 https://www.cnblogs.com/boshen-hzb/p/13305560.html

https://www.cnblogs.com/sunbines/p/17384473.html

posted @ 2025-06-11 16:16  mofy  阅读(39)  评论(0)    收藏  举报