Ubuntu 18.04
Sponsored Link

Ceph : Use as File System2018/12/25

 
Configure Clients to use Ceph Storage like follows.
                                         |
        +--------------------+           |           +--------------------+
        |   [dlp.srv.world]  |10.0.0.30  |   10.0.0.x| [client.srv.world] |
        |    Ceph-Deploy     +-----------+-----------+                    |
        |                    |           |           |                    |
        +--------------------+           |           +--------------------+
            +----------------------------+----------------------------+
            |                            |                            |
            |10.0.0.51                   |10.0.0.52                   |10.0.0.53 
+-----------+-----------+    +-----------+-----------+    +-----------+-----------+
|   [node01.srv.world]  |    |   [node02.srv.world]  |    |   [node03.srv.world]  |
|     Object Storage    +----+     Object Storage    +----+     Object Storage    |
|     Monitor Daemon    |    |                       |    |                       |
|                       |    |                       |    |                       |
+-----------------------+    +-----------------------+    +-----------------------+

 
For example, mount as Filesystem on a Client.
[1] Configure MDS (MetaData Server) on a Node which you'd like to set MDS. It sets to [node01] on this exmaple.
ubuntu@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/
# create pools

ubuntu@node01:~$
sudo ceph osd pool create cephfs_data 128

pool 'cephfs_data' created
ubuntu@node01:~$
sudo ceph osd pool create cephfs_metadata 8

pool 'cephfs_metadata' created
# enable pools

ubuntu@node01:~$
sudo ceph fs new cephfs cephfs_metadata cephfs_data

new fs with metadata pool 4 and data pool 3
# show list

ubuntu@node01:~$
sudo ceph fs ls

name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
ubuntu@node01:~$
sudo ceph mds stat

cephfs-1/1/1 up {0=node01=up:active}
[3] Mount CephFS on a Client.
root@client:~#
apt -y install ceph-fuse
# get admin key

root@client:~#
ssh ubuntu@node01.srv.world "sudo ceph-authtool -p /etc/ceph/ceph.client.admin.keyring" > admin.key

ubuntu@node01.srv.world's password:
root@client:~#
chmod 600 admin.key
root@client:~#
mount -t ceph node01.srv.world:6789:/ /mnt -o name=admin,secretfile=admin.key

root@client:~#
df -hT

Filesystem                  Type      Size  Used Avail Use% Mounted on
udev                        devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs                       tmpfs     395M  624K  394M   1% /run
/dev/mapper/ubuntu--vg-root ext4       29G  2.3G   25G   9% /
tmpfs                       tmpfs     2.0G     0  2.0G   0% /dev/shm
tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
tmpfs                       tmpfs     2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs                       tmpfs     395M     0  395M   0% /run/user/0
10.0.0.51:6789:/            ceph      8.5G     0  8.5G   0% /mnt
Matched Content