ceph报错及解决

too many PGs per OSD

ceph -s

too many PGs per OSD (394 > max 250)

解决:
编辑/etc/ceph/ceph.conf
在[global]下添加如下配置

mon_max_pg_per_osd = 1000

说明:这个参数mon_pg_warn_max_per_osd = 1000不会生效。

application not enabled on 2 pool

ceph -s 
  cluster:
    id:     41732856-b7e0-4d00-969d-bbbaf9f2b187
    health: HEALTH_WARN
            application not enabled on 2 pool(s)
 
  services:
    mon: 3 daemons, quorum ceph01,ceph03,ceph02
    mgr: ceph01(active), standbys: ceph02, ceph03
    mds: cephfs-1/1/1 up  {0=ceph03=up:active}, 2 up:standby
    osd: 6 osds: 6 up, 6 in
 
  data:
    pools:   22 pools, 1248 pgs
    objects: 8.64k objects, 32.4GiB
    usage:   88.4GiB used, 255GiB / 343GiB avail
    pgs:     1248 active+clean

查看详细输出

ceph health detail
HEALTH_WARN application not enabled on 2 pool(s)
POOL_APP_NOT_ENABLED application not enabled on 2 pool(s)
    application not enabled on pool 'k8s-volumes'
    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.

根据调试设置下pool即可

ceph osd pool application enable k8s-volumes .cephfs.rbd.rgw
ceph osd pool application enable test .cephfs.rbd.rgw

再次查看ceph健康状况

ceph health
HEALTH_OK

版权声明:本文为weixin_40548182原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。