Mount a Specific Pool With CephFS
First let’s create a new pool, and call itwebdata. Ideally this pool
will store web content.
1
2
$ ceph osd create webdata 500
successfully created pool webdata
Then grab the pool id:
1
2
$ ceph osd dump | grep webdata
pool 5 'webdata' rep size 2 crush_ruleset 0 object_hash rjenkins pg_num 500
pgp_num 500 last_change 12 owner 0
Eventually assign
1
2
$ ceph mds add_data_pool 5
added data pool 5 to mdsmap
Mount the Ceph Filesystem:
1
$ sudo mount -t ceph 172.17.1.7:/ /srv/mds/pools/webdata
Check the layout of the directory, as we can see the pool with the
id 0 has been assigned by default to. This pool corresponds to the
default pool calleddata. By setting a new layout, we will change
the default pool by the one we created before.
1
2
3
4
5
6
7
8
9
1
0
1
$ cephfs /srv/mds/pools/webdata/ show_layout
layout.data_pool: 0
layout.object_size: 4194304
layout.stripe_unit: 4194304
layout.stripe_count: 1
$ cephfs /srv/mds/pools/webdata/lol/ set_layout -p 5 -u 4194304 -c 1 -s
4194304
$ cephfs /srv/mds/pools/webdata/lol/ show_layout
layout.data_pool: 5
layout.object_size: 4194304
评论3