此map为我生成环境 故障域为rack

rack rack-05 {

        id -26          # do not change unnecessarily

        # weight 78.336

        alg straw

        hash 0  # rjenkins1

        item sjz-ceph-p-online-17 weight 19.584

        item sjz-ceph-p-online-18 weight 19.584

        item sjz-ceph-p-online-19 weight 19.584

        item sjz-ceph-p-online-20 weight 19.584

}

root rc {

        id -1           # do not change unnecessarily

        # weight 391.680

        alg straw

        hash 0  # rjenkins1

        item rack-01 weight 78.336

        item rack-02 weight 78.336

        item rack-03 weight 78.336

        item rack-04 weight 78.336

        item rack-05 weight 78.336

}

# rules

rule replicated_ruleset {

        ruleset 0

        type replicated

        min_size 1

        max_size 10

        step take rc

        step chooseleaf firstn 0 type host

        step emit

}

rule vms {

        ruleset 1

        type replicated

        min_size 1

        max_size 10

        step take rc

        step chooseleaf firstn 0 type rack

        step emit

}

rule volumes {

        ruleset 2

        type replicated

        min_size 1

        max_size 10

        step take rc

        step chooseleaf firstn 0 type rack

        step emit

}

rule p_w_picpaths {

        ruleset 3

        type replicated

        min_size 1

        max_size 10

        step take rc

        step chooseleaf firstn 0 type rack

}

其中p_w_picpaths 没有应用 测试如果应用p_w_picpaths的rule 对应glance无法正确提供镜像

rbd create k8s/mysql-sonar --size 5G --p_w_picpath-format 2 --p_w_picpath-feature layering