.
|
+--------------------+ | +-------------------+
| [dlp.server.world] |10.0.0.30 | 10.0.0.x| [ Client ] |
| Ceph-Deploy +-----------+-----------+ |
| | | | |
+--------------------+ | +-------------------+
+----------------------------+----------------------------+
| | |
|10.0.0.51 |10.0.0.52 |10.0.0.53
+-----------+-----------+ +-----------+-----------+ +-----------+-----------+
| [node01.server.world] | | [node02.server.world] | | [node03.server.world] |
| Object Storage +----+ Object Storage +----+ Object Storage |
| Monitor Daemon | | | | |
| | | | | |
+-----------------------+ +-----------------------+ +-----------------------+
|
For example, mount as Filesystem on a Client.
| |
| [1] | Create MDS (MetaData Server) on a Node which you'd like to set MDS. It sets to node01 on this exmaple. |
| [cent@dlp ceph]$
ceph-deploy mds create node01
|
| [2] | Create at least 2 RADOS pools on MDS Node and activate MetaData Server. For pg_num which is specified at the end of a creating command, refer to official document and decide appropriate value. ⇒ http://docs.ceph.com/docs/master/rados/operations/placement-groups/ |
| [cent@node01 ~]$
# create pools
[cent@node01 ~]$
ceph osd pool create cephfs_data 128
pool 'cephfs_data' created [cent@node01 ~]$
ceph osd pool create cephfs_metadata 128
pool 'cephfs_metadata' created
# enable pools
[cent@node01 ~]$
ceph fs new cephfs cephfs_metadata cephfs_data
new fs with metadata pool 2 and data pool 1
# show list
[cent@node01 ~]$
ceph fs ls
name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ] [cent@node01 ~]$
ceph mds stat
e5: 1/1/1 up {0=node01=up:active} |
| [3] | Mount CephFS on a Client. |
[root@client ~]#
yum -y install http://download.ceph.com/rpm-infernalis/el7/noarch/ceph-release-1-1.el7.noarch.rpm
[root@client ~]#
yum -y install ceph-fuse
# get admin key
[root@client ~]#
ssh cent@node01.server.world "sudo ceph-authtool -p /etc/ceph/ceph.client.admin.keyring" > admin.key
cent@node01.server.world's password: [root@client ~]#
chmod 600 admin.key
mount -t ceph node01.server.world:6789:/ /mnt -o name=admin,secretfile=admin.key
[root@client ~]#
df -hT
Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/centos-root xfs 27G 1.3G 26G 5% / devtmpfs devtmpfs 2.0G 0 2.0G 0% /dev tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm tmpfs tmpfs 2.0G 8.3M 2.0G 1% /run tmpfs tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/vda1 xfs 497M 151M 347M 31% /boot 10.0.0.51:6789:/ ceph 80G 19G 61G 24% /mnt |
Nenhum comentário:
Postar um comentário