Ceph實驗室:第八課:查看Ceph CRUSH map
查看CRUSH map
- 從monitor節點上獲取CRUSH map
[root@ceph ceph]# ceph osd getcrushmap -o crushmap_compiled_file
- 反編譯CRUSH map
[root@ceph ceph]# crushtool -d crushmap_compiled_file -o crushmap_decompiled_file
- 修改完成後,我們需要編譯他
[root@ceph ceph]# crushtool -d crushmap_decompiled_file -o newcrushmap
- 將新CRUSH map導入集群中
[root@ceph ceph]# ceph osd setcrushmap -i newcrushmap
[root@ceph ceph]# cat crushmap_decompiled_file
# begin crush map
tunable choose_local_tries 0
tunable choose_local_fallback_tries 0
tunable choose_total_tries 50
tunable chooseleaf_descend_once 1
tunable chooseleaf_vary_r 1
tunable straw_calc_version 1
# devices
device 0 osd.0
device 1 osd.1
device 2 osd.2
# types
type 0 osd
type 1 host
type 2 chassis
type 3 rack
type 4 row
type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root
# buckets
host ceph-node1 {
id -2 # do not change unnecessarily
# weight 0.000
alg straw
hash 0 # rjenkins1
}
host ceph {
id -3 # do not change unnecessarily
# weight 0.044
alg straw
hash 0 # rjenkins1
item osd.2 weight 0.015
item osd.1 weight 0.015
item osd.0 weight 0.015
}
root default {
id -1 # do not change unnecessarily
# weight 0.044
alg straw
hash 0 # rjenkins1
item ceph-node1 weight 0.000
item ceph weight 0.044
}
# rules
rule replicated_ruleset {
ruleset 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
# end crush map
最後更新:2017-04-08 00:29:58