现象:
Ceph集群健康状态提示“pool(s) do not have an application enabled”
[root@ceph1 ~]# ceph -s cluster: id: 65eec0fe-7b48-11ef-8331-0050562d5487 health: HEALTH_WARN 1 pool(s) do not have an application enabled services: mon: 3 daemons, quorum ceph1,ceph3,ceph2 (age 5m) mgr: ceph1.rayllt(active, since 18m), standbys: ceph3.vtywtw osd: 3 osds: 3 up (since 18m), 3 in (since 3d) data: pools: 2 pools, 33 pgs objects: 13 objects, 3.5 MiB usage: 876 MiB used, 599 GiB / 600 GiB avail pgs: 33 active+clean
原因:
创建池时未配置应用程序导致
解决:
1、通过命令(ceph health detail)查看提示对应的池名称
[root@ceph1 ~]# 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 'rbd' use 'ceph osd pool application enable <pool-name> <app-name>', where <app-name> is 'cephfs', 'rbd', 'rgw', or freeform for custom applications.
2、通过命令(ceph osd pool application enable PoolName cephfs|rbd|rgw)启用解决
[root@ceph1 ~]# ceph osd pool application enable rbd rbd enabled application 'rbd' on pool 'rbd' [root@ceph1 ~]# ceph -s cluster: id: 65eec0fe-7b48-11ef-8331-0050562d5487 health: HEALTH_OK services: mon: 3 daemons, quorum ceph1,ceph3,ceph2 (age 7m) mgr: ceph1.rayllt(active, since 20m), standbys: ceph3.vtywtw osd: 3 osds: 3 up (since 21m), 3 in (since 3d) data: pools: 2 pools, 33 pgs objects: 13 objects, 3.5 MiB usage: 876 MiB used, 599 GiB / 600 GiB avail pgs: 33 active+clean