介绍 在用openstack的时候,有sas盘,有ssd盘,想将外挂卷用sas盘,故通过改crush规则实现
实现方式 创建 创建两条rule host分别指定为ssd/hdd
代码语言:javascript复制ceph osd crush rule create-replicated rule-ssd default host ssd
ceph osd crush rule create-replicated rule-hdd default host hdd
修改pool绑定的rule
代码语言:javascript复制ceph osd pool set images crush_rule rule-ssd
ceph osd pool set volumes crush_rule rule-hdd
ceph osd pool set vms crush_rule rule-ssd
查看规则内容
代码语言:javascript复制ceph osd crush rule dump
获取crush map
代码语言:javascript复制ceph osd getcrushmap -o crushmapgot
反编译crush map
代码语言:javascript复制crushtool -d crushmapgot -o decrushmap