ceph 常用命令pool

添加host:for id in {0…19};do ceph osd crush add-bucket bb_host_KaTeX parse error: Expected group after '_' at position 86: …sh move bb_host_̲id root=bb_host_group;done
将osd添加到host下面:for id in {20…39};do ceph osd crush add osd.KaTeX parse error: Expected group after '_' at position 24: …08 host=bb_host_̲id;sleep 1;done

ec pool:
创建profile:poolname=bb;ceph osd erasure-code-profile set poolname"profile"k=16m=4crush−failure−domain=hostcrush−root=poolname"_profile" k=16 m=4 crush-failure-domain=host crush-root=poolname"profile"k=16m=4crushfailuredomain=hostcrushroot=poolname"_host_group"
创建ruleset:poolname=bb;ceph osd crush rule create-erasure $poolname"_ruleset" $poolname"_profile"
创建资源池:poolname=bb;ceph osd pool create $poolname 128 128 erasure $poolname"_profile" $poolname"_ruleset"
设置min_size:poolname=bb;ceph osd pool set $poolname min_size 16
设置overwrite属性:poolname=bb;ceph osd pool set $poolname allow_ec_overwrites 1 --yes-i-really-mean-it

创建副本资源池,创建副本pool:
poolname=bb;ceph osd crush rule create-simple $poolname"_ruleset" $poolname"_host_group" host firstn
poolname=bb;ceph osd pool create $poolname $pg_num $poolname"_ruleset"
poolname=bb;ceph osd pool set $poolname size $type_size
poolname=bb;ceph osd pool set $poolname min_size $type_min_size

创建副本资源池,创建副本pool:
poolname=bb;ceph osd crush rule create-simple $poolname"_ruleset" $poolname"_host_group" host firstn
poolname=bb;ceph osd pool create $poolname $pg_num $poolname"_ruleset"
poolname=bb;ceph osd pool set $poolname size $type_size
poolname=bb;ceph osd pool set $poolname min_size $type_min_size

添加错了之后:
for id in {1…19};do ceph osd crush rm bb_host_$id;done
删除资源池:ceph osd pool rm aa aa --yes-i-really-really-mean-it
查看对应的rule:ceph osd crush rule ls

创建cache-tier:
ceph osd tier add storage-cold storage-hot --force-nonempty
ceph osd tier cache-mode storage-hot writeback
ceph osd tier set-overlay storage-cold storage-hot
设置tier参数:
ceph osd pool set storage-hot hit_set_type bloom
ceph osd pool set storage-hot hit_set_count 4
ceph osd pool set storage-hot target_max_bytes 1073741824 #1G //设置最大tier池的百分之八十,注意这里单位是字节
ceph osd pool set storage-hot cache_target_dirty_ratio 0.4
ceph osd pool set storage-hot cache_target_dirty_high_ratio 0.6
ceph osd pool set storage-hot cache_target_full_ratio 0.8

重新设置ruleset:重设过后会产生大量的数据重构
ceph osd pool set fs_data crush_rule fs_data1_ruleset
ceph osd pool set fs_data_meta crush_rule fs_meta1_ruleset

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值