ceph 存储池 绑定目录,ceph 存储池 pool 命令

1.目录 绑定到存储池
# getfattr -n ceph.dir.layout.pool /ceph

查看文件
# getfattr -n ceph.file.layout file1 
# file: file1
ceph.file.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=pool-rule-c2"

pool=存储池 

查看目录
# getfattr -n ceph.dir.layout nfs-1
# file: nfs-1
ceph.dir.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=pool-rule-c2"
1.1 设置 setfattr
# getfattr -n ceph.dir.layout nfs-2
nfs-2: ceph.dir.layout: No such attribute
[root@vcfs226 vcfs]# setfattr -n ceph.dir.layout.pool -v pool-rule-c2 nfs-2
[root@vcfs226 vcfs]# getfattr -n ceph.dir.layout.pool  nfs-2
# file: nfs-2
ceph.dir.layout.pool="pool-rule-c2"

# getfattr -n ceph.dir.layout  nfs-2
# file: nfs-2
ceph.dir.layout="stripe_unit=4194304 stripe_count=1 object_size=4194304 pool=pool-rule-c2"
2. ceph 存储池 命令

查看存储池

# ceph osd pool ls
# ceph osd lspools

查看存储池副本数

 ceph osd dump |grep size
3.创建存储池

创建存储池

# ceph osd pool create pool2 256

pool 'pool2' created

# ceph osd dump |grep size
pool 2 'pool2' replicated size 3 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 256

参考:
1.文件布局
2.存储池
3.存储池、归置组和 CRUSH 配置参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值