服务器信息
| 主机名 |
IP地址 |
角色 |
| ceph1 |
172.16.1.12 |
deploy,mon,mds,mgr,osd |
| ceph2 |
172.16.1.13 |
osd |
| ceph3 |
172.16.1.14 |
osd |
| ceph4 |
172.16.1.15 |
Client |
| ceph5 |
172.16.1.16 |
Client |
deploy节点执行
启用cephfs
创建pool
1 2 3 4 5
| [root@ceph1 ceph] [root@ceph1 ceph]
|
启动用pool
查看cephfs
1 2
| [root@ceph1 ceph] name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
|
查看mon监视器IP
1 2 3 4 5 6 7 8 9
| [root@ceph1 ceph] dumped monmap epoch 1 epoch 1 fsid 5a28f45d-b1f1-4f75-a735-80d5021763f0 last_changed 2021-01-17 16:27:23.152888 created 2021-01-17 16:27:23.152888 0: 172.16.1.12:6789/0 mon.ceph1 1: 172.16.1.13:6789/0 mon.ceph2 2: 172.16.1.18:6789/0 mon.ceph3
|
查看cephx认证密钥
1 2 3
| [root@ceph1 ceph] [client.admin] key = AQAE9QNgiTJsJBAAQgDSeDp2gA1+RUVMsLmDzQ==
|
客户端(一)执行
创建本地目录
执行mount挂载
验证
1 2 3
| [root@ceph4 ~] 文件系统 类型 容量 已用 可用 已用% 挂载点 172.16.1.12:6789,172.16.1.13:6789,172.16.1.18:6789:/ ceph 60G 3.1G 57G 6% /cephfs_data
|
尝试写入数据
1 2 3 4
| [root@ceph4 ~] [root@ceph4 cephfs_data] [root@ceph4 cephfs_data] hello.txt
|
客户端(二)执行
本次为了方便直接用ceph集群中host-node3节点来验证
挂载
验证
1 2 3 4 5 6 7
| [root@ceph5 ~] [root@ceph5 cephfs_data] hello.txt [root@ceph5 cephfs_data] SuccessFuily [root@ceph5 cephfs_data] 172.16.1.12:6789,172.16.1.13:6789,172.16.1.18:6789:/ ceph 60G 3.1G 57G 6% /cephfs_data
|