Ceph Crush进阶【十五】

PG与OSD映射调整

#默认情况下,crush 算法自行对创建的 pool 中的 PG 分配 OSD,但是可以手动基于权重设置crush 算法分配数据的倾向性
#比如 1T的磁盘权重是 1,2T的就是 2,推荐使用相同大小的设备。

weight 表示设备(device)的容量相对值,比如 1TB 对应 1.00,那么 500G的 OSD 的 weigh就应该是 0.5,weight 是基于磁盘空间分配 PG 的数量
让 crush 算法尽可能往磁盘空间大的 OSD 多分配 PG.往磁盘空间小的 OSD 分配较少的 PG.

Reweight 参数的目的是重新平衡 ceph 的 CRUSH 算法随机分配的 PG,默认的分配是概率上的均衡,
即使 OSD 都是一样的磁盘空间也会产生一些 PG 分布不均匀的情况
此时可以通过调整 reweight 参数,让 ceph 集群立即重新平衡当前磁盘的 PG,以达到数据均衡分布的目的,REWEIGHT是PG已经分配完成,
要在 ceph 集群重新平衡PG的分布。
root@ceph-deploy:~# ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP     META     AVAIL    %USE  VAR   PGS  STATUS
 0    hdd  0.02930   1.00000   30 GiB  350 MiB   49 MiB   15 KiB  301 MiB   30 GiB  1.14  0.98  146      up
 1    hdd  0.02930   1.00000   30 GiB  371 MiB   61 MiB   13 KiB  309 MiB   30 GiB  1.21  1.03  160      up
 2    hdd  0.02930   1.00000   30 GiB  364 MiB   63 MiB   15 KiB  301 MiB   30 GiB  1.19  1.01  143      up
 3    hdd  0.02930   1.00000   30 GiB  351 MiB   53 MiB   15 KiB  297 MiB   30 GiB  1.14  0.98  156      up
 4    hdd  0.02930   1.00000   30 GiB  356 MiB   63 MiB   18 KiB  293 MiB   30 GiB  1.16  0.99  148      up
 5    hdd  0.02930   1.00000   30 GiB  359 MiB   58 MiB   11 KiB  301 MiB   30 GiB  1.17  1.00  145      up
 6    hdd  0.02930   1.00000   30 GiB  348 MiB   42 MiB   12 KiB  305 MiB   30 GiB  1.13  0.97  152      up
 7    hdd  0.02930   1.00000   30 GiB  344 MiB   47 MiB   10 KiB  297 MiB   30 GiB  1.12  0.96  145      up
 8    hdd  0.02930   1.00000   30 GiB  390 MiB   84 MiB   21 KiB  306 MiB   30 GiB  1.27  1.09  152      up
                       TOTAL  270 GiB  3.2 GiB  521 MiB  136 KiB  2.6 GiB  267 GiB  1.17
MIN/MAX VAR: 0.96/1.09  STDDEV: 0.04

#修改weight并验证
root@ceph-deploy:~# ceph osd crush reweight osd.1 1.5 #修改某个指定ID的osd的权重,会触发数据的重新分配
reweighted item id 1 name 'osd.1' to 1.5 in crush map
root@ceph-deploy:~# ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP     META     AVAIL    %USE  VAR   PGS  STATUS
 0    hdd  0.02930   1.00000   30 GiB  354 MiB   49 MiB   15 KiB  305 MiB   30 GiB  1.15  0.99   52      up
 1    hdd  1.50000   1.00000   30 GiB  355 MiB   61 MiB   13 KiB  293 MiB   30 GiB  1.16  0.99  382      up #明显pgs变多了
 2    hdd  0.02930   1.00000   30 GiB  365 MiB   63 MiB   15 KiB  301 MiB   30 GiB  1.19  1.02   56      up
 3    hdd  0.02930   1.00000   30 GiB  351 MiB   53 MiB   15 KiB  297 MiB   30 GiB  1.14  0.98  134      up
 4    hdd  0.02930   1.00000   30 GiB  356 MiB   63 MiB   18 KiB  293 MiB   30 GiB  1.16  1.00  128      up
 5    hdd  0.02930   1.00000   30 GiB  359 MiB   58 MiB   11 KiB  301 MiB   30 GiB  1.17  1.00  137      up
 6    hdd  0.02930   1.00000   30 GiB  348 MiB   43 MiB   12 KiB  305 MiB   30 GiB  1.13  0.97  147      up
 7    hdd  0.02930   1.00000   30 GiB  344 MiB   47 MiB   10 KiB  297 MiB   30 GiB  1.12  0.96  127      up
 8    hdd  0.02930   1.00000   30 GiB  390 MiB   84 MiB   21 KiB  306 MiB   30 GiB  1.27  1.09  115      up
                       TOTAL  270 GiB  3.1 GiB  522 MiB  136 KiB  2.6 GiB  267 GiB  1.17
MIN/MAX VAR: 0.96/1.09  STDDEV: 0.04

#修改 REWEIGHT 并验证
#OSD 的 REWEIGHT 的值默认为 1,值可以调整,范围在 0~1 之间,值越低 PG 越小,如果调整了任何一个 OSD 的 REWEIGHT 值
#那么 OSD 的 PG 会立即和其它 OSD 进行重新平衡,即数据的重新分配,用于当某个 OSD 的 PG 相对较多需要降低其 PG 数量的场景。
root@ceph-deploy:~# ceph osd reweight 8 0.7
reweighted osd.8 to 0.7 (b333)
root@ceph-deploy:~# ceph osd df
ID  CLASS  WEIGHT   REWEIGHT  SIZE     RAW USE  DATA     OMAP     META     AVAIL    %USE  VAR   PGS  STATUS
 0    hdd  0.02930   1.00000   30 GiB  355 MiB   50 MiB   15 KiB  305 MiB   30 GiB  1.16  0.98   40      up
 1    hdd  1.50000   1.00000   30 GiB  404 MiB  107 MiB   13 KiB  297 MiB   30 GiB  1.32  1.11  400      up
 2    hdd  0.02930   1.00000   30 GiB  366 MiB   64 MiB   15 KiB  301 MiB   30 GiB  1.19  1.00   47      up
 3    hdd  0.02930   1.00000   30 GiB  353 MiB   52 MiB   15 KiB  301 MiB   30 GiB  1.15  0.97  142      up
 4    hdd  0.02930   1.00000   30 GiB  361 MiB   64 MiB   18 KiB  297 MiB   30 GiB  1.18  0.99  128      up
 5    hdd  0.02930   1.00000   30 GiB  358 MiB   57 MiB   11 KiB  301 MiB   30 GiB  1.17  0.98  140      up
 6    hdd  0.02930   1.00000   30 GiB  343 MiB   33 MiB   12 KiB  309 MiB   30 GiB  1.12  0.94  162      up
 7    hdd  0.02930   1.00000   30 GiB  353 MiB   52 MiB   10 KiB  301 MiB   30 GiB  1.15  0.97  143      up
 8    hdd  0.02930   0.70000   30 GiB  385 MiB   92 MiB   21 KiB  294 MiB   30 GiB  1.25  1.06   96      up #
                       TOTAL  270 GiB  3.2 GiB  572 MiB  136 KiB  2.6 GiB  267 GiB  1.19
MIN/MAX VAR: 0.94/1.11  STDDEV: 0.06

Crush运行图管理

#通过工具将 ceph 的 crush 运行图导出并进行编辑,然后导人
#注:导出的 crush 运行图为二进制格式,无法通过文本编辑器直接打开,需要使用 crushtool工具转换为文本格式后才能通过 vim 等文本编辑宫工具打开和编辑。
1.将运行图导出到一个本地二进制文件
root@ceph-mon3:~# mkdir /data/ceph -p
root@ceph-mon3:~# ceph osd getcrushmap -o /data/ceph/crushmap-v1
33

2.将二进制文件转换为文本文件
root@ceph-mon3:~# apt install -y ceph-base
root@ceph-mon3:~# crushtool -d /data/ceph/crushmap-v1 > /data/ceph/crushmap-v1.txt
root@ceph-mon3:~# file /data/ceph/crushmap-v1.txt
/data/ceph/crushmap-v1.txt: ASCII text
root@ceph-mon3:~# head /data/ceph/crushmap-v1.txt -n 30
# 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 chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# 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


3.修改文本文件
#修改副本数为12 max_size
root@ceph-mon3:~# vim /data/ceph/crushmap-v1.txt
        max_size 12

4.将文本文件转换为二进制
root@ceph-mon3:~# crushtool -c /data/ceph/crushmap-v1.txt -o /data/ceph/crushmap-v2


5.导入新的二进制文件(将ceph当前的强制覆盖)
root@ceph-mon3:~# ceph osd setcrushmap -i /data/ceph/crushmap-v2
34

6.验证crush运行图是否生效
root@ceph-mon3:~# ceph osd crush rule dump
[
    {
        "rule_id": 0,
        "rule_name": "replicated_rule",
        "ruleset": 0,
        "type": 1,
        "min_size": 1,
        "max_size": 12,
        "steps": [
            {
                "op": "take",
                "item": -1,
                "item_name": "default"
            },
            {
                "op": "chooseleaf_firstn",
                "num": 0,
                "type": "host"
            },
            {
                "op": "emit"
            }
        ]
    }
]

Crush文件解释

root@ceph-mon3:/data/ceph# cat crushmap-v1.txt
# 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 chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# 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 zone
type 10 region
type 11 root

# buckets
host ceph-node1 {
        id -3           # do not change unnecessarily
        id -4 class hdd         # do not change unnecessarily
        # weight 1.559
        alg straw2
        hash 0  # rjenkins1
        item osd.0 weight 0.029
        item osd.1 weight 1.500
        item osd.2 weight 0.029
}
host ceph-node2 {
        id -5           # do not change unnecessarily
        id -6 class hdd         # do not change unnecessarily
        # weight 0.088
        alg straw2
        hash 0  # rjenkins1
        item osd.3 weight 0.029
        item osd.4 weight 0.029
        item osd.5 weight 0.029
}
host ceph-node3 {
        id -7           # do not change unnecessarily
        id -8 class hdd         # do not change unnecessarily
        # weight 0.088
        alg straw2
        hash 0  # rjenkins1
        item osd.6 weight 0.029
        item osd.7 weight 0.029
        item osd.8 weight 0.029
}
root default {
        id -1           # do not change unnecessarily
        id -2 class hdd         # do not change unnecessarily
        # weight 1.734
        alg straw2
        hash 0  # rjenkins1
        item ceph-node1 weight 1.559
        item ceph-node2 weight 0.088
        item ceph-node3 weight 0.088
}

# rules
rule replicated_rule {
        id 0
        type replicated
        min_size 1
        max_size 12
        step take default
        step chooseleaf firstn 0 type host
        step emit
}

# end crush map

Crush 数据分配管理

Ceph crush 算法分配的 PG 的时候可以将 PG 分配到不同主机的 OSD 上,以实现以主机为单位的高可用,这也是默认机制
但是无法保证不同 PG 位于不同机柜或者机房的主机,如果要实现基于机柜或者是更高级的IDC 等方式的数据高可用
而且也不能实现A项目的数据在 SSD,B 项目的数据在机械盘,如果想要实现此功能则需要导出 crush 运行图并手动编辑
之后再导人并覆盖原有的 crush 运行图。

#导出crush运行图
root@ceph-mon3:/data/ceph# ceph osd getcrushmap -o /data/ceph/crushmap-v3
34

#将运行图转换为文本
root@ceph-mon3:/data/ceph# crushtool -d /data/ceph/crushmap-v3 > /data/ceph/crushmap-v3.txt
root@ceph-mon3:/data/ceph# file /data/ceph/crushmap-v3.txt
/data/ceph/crushmap-v3.txt: ASCII text

#添加自定义配置
root@ceph-mon3:/data/ceph# cat /data/ceph/crushmap-v3.txt
# begin crush map #可调整的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 chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices #当前的设备列表
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# types #当前支持的bucket类型
type 0 osd #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 #一个数据中心或IDC
type 9 zone 
type 10 region #一个区域 比如AWS宁夏中卫数据中心
type 11 root #bucket分层的最顶部,根

# buckets 
host ceph-node1 { #类型Host名称为:ceph-node1
        id -3           # do not change unnecessarily   #ceph生成的OSD ID 非必要不要改
        id -4 class hdd         # do not change unnecessarily
        # weight 1.558
        alg straw2 #算法 管理OSD角色
        hash 0  # rjenkins1  #使用是哪个hash算法,0表示选择rjenkinks1这种hash算法
        item osd.0 weight 0.029  #osd0 权重比例,crush 会自动根据磁盘空间计算,不同的磁盘空间的权重不一样
        item osd.1 weight 1.500
        item osd.2 weight 0.029
}
host ceph-node2 {
        id -5           # do not change unnecessarily
        id -6 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.3 weight 0.029
        item osd.4 weight 0.029
        item osd.5 weight 0.029
}
host ceph-node3 {
        id -7           # do not change unnecessarily
        id -8 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.6 weight 0.029
        item osd.7 weight 0.029
        item osd.8 weight 0.029
}
root default { #根的配置
        id -1           # do not change unnecessarily
        id -2 class hdd         # do not change unnecessarily
        # weight 1.735
        alg straw2
        hash 0  # rjenkins1
        item ceph-node1 weight 1.559
        item ceph-node2 weight 0.088
        item ceph-node3 weight 0.088
}

# rules 
rule replicated_rule { #副本池的默认配置
        id 0
        type replicated
        min_size 1
        max_size 12 #默认最大时10
        step take default #基于default定义的主机分配OSD
        step chooseleaf firstn 0 type host #选择主机。故障域类型为主机
        step emit #弹出配置即返回给客户端
}

# end crush map

为了更加的高效的管理机械盘和固态盘可以进行分配使用磁盘

 

#实验中的磁盘都是 hdd的 实验模拟 每个节点的最后一块盘为ssd 
#osd.2/5/8:SSD
#osd0/1/3/4/6/7:HDD

root@ceph-mon3:/data/ceph# vim crushmap-v4.txt
# begin crush map #可调整的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 chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices #当前的设备列表
device 0 osd.0 class hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# types #当前支持的bucket类型
type 0 osd #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 #一个数据中心或IDC
type 9 zone
type 10 region #一个区域 比如AWS宁夏中卫数据中心
type 11 root #bucket分层的最顶部,根

# buckets
host ceph-node1 { #类型Host名称为:ceph-node1
        id -3           # do not change unnecessarily   #ceph生成的OSD ID 非必要不要改
        id -4 class hdd         # do not change unnecessarily
        # weight 1.558
        alg straw2 #算法 管理OSD角色
        hash 0  # rjenkins1  #使用是哪个hash算法,0表示选择rjenkinks1这种hash算法
        item osd.0 weight 0.029  #osd0 权重比例,crush 会自动根据磁盘空间计算,不同的磁盘空间的权重不一样
        item osd.1 weight 1.500
        item osd.2 weight 0.029
}
host ceph-node2 {
        id -5           # do not change unnecessarily
        id -6 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.3 weight 0.029
        item osd.4 weight 0.029
        item osd.5 weight 0.029
}
host ceph-node3 {
        id -7           # do not change unnecessarily
        id -8 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.6 weight 0.029
        item osd.7 weight 0.029
        item osd.8 weight 0.029
}
root default { #根的配置
        id -1           # do not change unnecessarily
        id -2 class hdd         # do not change unnecessarily
        # weight 1.735
        alg straw2
        hash 0  # rjenkins1
        item ceph-node1 weight 1.559
        item ceph-node2 weight 0.088
        item ceph-node3 weight 0.088
}

#Test SSD Conf
host ceph-ssdnode1 { #类型Host名称为:ceph-node1
        id -13           # do not change unnecessarily   #ceph生成的OSD ID 非必要不要改
        id -14 class hdd         # do not change unnecessarily
        # weight 1.558
        alg straw2 #算法 管理OSD角色
        hash 0  # rjenkins1  #使用是哪个hash算法,0表示选择rjenkinks1这种hash算法
        item osd.2 weight 0.029
}
host ceph-ssdnode2 {
        id -15           # do not change unnecessarily
        id -16 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.5 weight 0.029
}
host ceph-ssdnode3 {
        id -17           # do not change unnecessarily
        id -18 class hdd         # do not change unnecessarily
        # weight 0.087
        alg straw2
        hash 0  # rjenkins1
        item osd.8 weight 0.029
}
#Test Bucket
root ssd { #根的配置
        id -21           # do not change unnecessarily
        id -22 class hdd         # do not change unnecessarily
        # weight 1.735
        alg straw2
        hash 0  # rjenkins1
        item ceph-ssdnode1 weight 1.559
        item ceph-ssdnode2 weight 0.088
        item ceph-ssdnode3 weight 0.088
}
#Test rules
rule ssd_replicated_rule { #副本池的默认配置
        id 30
        type replicated
        min_size 1
        max_size 6
        step take ssd
        step chooseleaf firstn 0 type host
        step emit
}

# rules
rule replicated_rule { #副本池的默认配置
        id 0
        type replicated
        min_size 1
        max_size 12 #默认最大时10
        step take default #基于default定义的主机分配OSD
        step chooseleaf firstn 0 type host #选择主机。故障域类型为主机
        step emit #弹出配置即返回给客户端
}

# end crush map

root@ceph-mon3:/data/ceph# crushtool -c /data/ceph/crushmap-v5.txt -o /data/ceph/crushmap-v5
root@ceph-mon3:/data/ceph# ceph osd setcrushmap -i /data/ceph/crushmap-v5
36

root@ceph-mon3:/data/ceph# ceph osd crush rule dump
[
    {
        "rule_id": 0,
        "rule_name": "replicated_rule",
        "ruleset": 0,
        "type": 1,
        "min_size": 1,
        "max_size": 12,
        "steps": [
            {
                "op": "take",
                "item": -1,
                "item_name": "default"
            },
            {
                "op": "chooseleaf_firstn",
                "num": 0,
                "type": "host"
            },
            {
                "op": "emit"
            }
        ]
    },
    {
        "rule_id": 30,
        "rule_name": "ssd_replicated_rule",
        "ruleset": 30,
        "type": 1,
        "min_size": 1,
        "max_size": 6,
        "steps": [
            {
                "op": "take",
                "item": -21,
                "item_name": "ssd"
            },
            {
                "op": "chooseleaf_firstn",
                "num": 0,
                "type": "host"
            },
            {
                "op": "emit"
            }
        ]
    },
    {
        "rule_id": 40,
        "rule_name": "hdd_replicated_rule",
        "ruleset": 40,
        "type": 1,
        "min_size": 1,
        "max_size": 8,
        "steps": [
            {
                "op": "take",
                "item": -31,
                "item_name": "hdd"
            },
            {
                "op": "chooseleaf_firstn",
                "num": 0,
                "type": "host"
            },
            {
                "op": "emit"
            }
        ]
    }
]



##测试创建存储池
#测试SSD
root@ceph-mon3:/data/ceph#  ceph osd pool create dzzz-ssdpool 32 32 ssd_replicated_rule #创建一个ssd_replicated_rule规则的存储池
pool 'dzzz-ssdpool' created
root@ceph-mon3:/data/ceph# ceph pg ls-by-pool dzzz-ssdpool | awk '{print $1,$2,$15}' #可以看到的确实在我们指定的osd2/5/8中进行存放数据
PG OBJECTS ACTING
15.0 0 [2,8,5]p2
15.1 0 [2,8,5]p2
15.2 0 [2,5,8]p2
15.3 0 [2,5,8]p2
15.4 0 [2,8,5]p2
15.5 0 [2,8,5]p2
15.6 0 [2,5,8]p2
15.7 0 [2,5,8]p2
15.8 0 [2,8,5]p2
15.9 0 [2,5]p2
15.a 0 [2,8,5]p2
15.b 0 [2,5]p2
15.c 0 [2]p2
15.d 0 [2,8,5]p2
15.e 0 [2,5,8]p2
15.f 0 [2,5,8]p2
15.10 0 [2,8,5]p2
15.11 0 [5,2,8]p5
15.12 0 [2,5,8]p2
15.13 0 [2,5,8]p2
15.14 0 [2,8,5]p2
15.15 0 [2,8,5]p2
15.16 0 [2,8,5]p2
15.17 0 [2,5,8]p2
15.18 0 [2,5]p2
15.19 0 [2,5,8]p2
15.1a 0 [2,5,8]p2
15.1b 0 [2,5]p2
15.1c 0 [2,8,5]p2
15.1d 0 [2,5,8]p2
15.1e 0 [2,8,5]p2
15.1f 0 [2,8,5]p2

* NOTE: afterwards

#测试HDD
root@ceph-mon3:/data/ceph# ceph osd pool create dzzz-hddpool 32 32 hdd_replicated_rule
pool 'dzzz-hddpool' created
root@ceph-mon3:/data/ceph# ceph pg ls-by-pool dzzz-hddpool | awk '{print $1,$2,$15}'
PG OBJECTS ACTING
16.0 0 [1,3,7]p1
16.1 0 [1,6,4]p1
16.2 0 [1,4,6]p1
16.3 0 [1,7,3]p1
16.4 0 [1,7,4]p1
16.5 0 [1,6,3]p1
16.6 0 [1,6,4]p1
16.7 0 [1,7,4]p1
16.8 0 [1,6]p1
16.9 0 [1,6,4]p1
16.a 0 [1,4,6]p1
16.b 0 [1,4,6]p1
16.c 0 [1,7,4]p1
16.d 0 [1,4]p1
16.e 0 [1,4,7]p1
16.f 0 [1,4,7]p1
16.10 0 [1,7,4]p1
16.11 0 [1,6,4]p1
16.12 0 [1,6,3]p1
16.13 0 [1,3,6]p1
16.14 0 [1,3,6]p1
16.15 0 [3,1,6]p3
16.16 0 [1,4]p1
16.17 0 [1,6,3]p1
16.18 0 [1,6,3]p1
16.19 0 [1,6,3]p1
16.1a 0 [1,7,3]p1
16.1b 0 [1,6,3]p1
16.1c 0 [1,7,4]p1
16.1d 0 [1,7,3]p1
16.1e 0 [1,4,6]p1
16.1f 0 [3,1,6]p3

* NOTE: afterwards

 

posted @ 2024-03-18 16:40  しみずよしだ  阅读(73)  评论(0)    收藏  举报