请注意,本文编写于 1636 天前,最后修改于 1202 天前,其中某些信息可能已经过时。
现象
使用ceph health
查看集群状态,提示HEALTH_WARN
,使用ceph -s
查看详细信息如下:
[root@ceph12 ~]# ceph -s
cluster:
id: 50d4affa-9be6-4e55-9185-59602d63d844
health: HEALTH_WARN
1 pool(s) do not have an application enabled
services:
mon: 3 daemons, quorum ceph12,ceph13,ceph14 (age 3m)
mgr: ceph12(active, since 2m), standbys: ceph13, ceph14
osd: 3 osds: 3 up (since 3m), 3 in (since 104m)
rgw: 3 daemons active (ceph12, ceph13, ceph14)
task status:
data:
pools: 6 pools, 137 pgs
objects: 188 objects, 5.9 KiB
usage: 3.1 GiB used, 1.5 TiB / 1.5 TiB avail
pgs: 137 active+clean
解决
运行ceph health detail
查看详情,提示如下
[root@ceph12 ~]# ceph health detail
HEALTH_WARN 1 pool(s) do not have an application enabled
[WRN] POOL_APP_NOT_ENABLED: 1 pool(s) do not have an application enabled
application not enabled on pool 'test'
use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications.
根据提示信息,启用相应application后,再次查看集群状态正常
[root@ceph12 ~]# ceph osd pool application enable test rgw
enabled application 'rgw' on pool 'test'
[root@ceph12 ~]# ceph health detail
HEALTH_OK