ceph指定磁盘类型创建存储池

介绍

在用openstack的时候,有sas盘,有ssd盘,想将外挂卷用sas盘,故通过改crush规则实现

实现方式

创建

1
2
3
4
5
6
7
8
9

创建两条rule host分别指定为ssd/hdd
# ceph osd crush rule create-replicated rule-ssd default host ssd
# ceph osd crush rule create-replicated rule-hdd default host hdd

修改pool绑定的rule
# 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

查看规则内容

1
ceph osd crush rule dump

获取crush map

1
ceph osd getcrushmap -o crushmapgot

反编译crush map

1
crushtool -d crushmapgot -o decrushmap
Donate