[root@ceph141ceph]# ceph osd pool create cephfs_data
pool 'cephfs_data' created
[root@ceph141ceph]# ceph osd pool create cephfs_metadata
pool 'cephfs_metadata' created
复制代码
2.创建一个文件系统,名称为"zhiyong18-cephfs"
[root@ceph141ceph]# ceph fs new zhiyong18-cephfs cephfs_metadata cephfs_data
Pool 'cephfs_data' (id '10') has pg autoscale mode 'on' but is not marked as bulk.
Consider setting the flag by running
# ceph osd pool set cephfs_data bulk true
new fs with metadata pool 11 and data pool 10
复制代码
3.查看创建的存储池
[root@ceph141ceph]# ceph fs ls
name: zhiyong18-cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
[root@ceph141ceph]# ceph mds stat
zhiyong18-cephfs:0
[root@ceph141ceph]# ceph -s
cluster:
id: 12fad866-9aa0-11ef-8656-6516a17ad6dd
health: HEALTH_ERR
1 filesystem is offline
1 filesystem is online with fewer MDS than max_mds
1 pool(s) do not have an application enabled
services:
mon: 3 daemons, quorum ceph141,ceph142,ceph143 (age 73m)
mgr: ceph141.yvswvf(active, since 73m), standbys: ceph142.gtcikx
mds: 0/0 daemons up
osd: 7 osds: 7 up (since 73m), 7 in (since 38h)
data:
volumes: 1/1 healthy
pools: 6 pools, 129 pgs
objects: 50 objects, 18 MiB
usage: 335 MiB used, 3.3 TiB / 3.3 TiB avail
pgs: 129 active+clean
复制代码
发现:存储池的状态无法正常使用,而且集群是有错误的(HEALTH_ERR),因此我们须要先办理这个题目
在web页面中也有提示:All MDS ranks are unavailable. The MDS daemons managing metadata are down, rendering the filesystem offline.
[root@ceph142ceph]# mount -t ceph ceph141:6789,ceph142:6789,ceph143:6789:/ /mnt -o name=wenzhiyongfs,secret=AQCOfitnDobhOBAAdJT9D0JVIjRch+kOQl8q3g==
2024-11-06T23:35:58.145+0800 7f21d1629100 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.wenzhiyongfs.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory