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 配置参考