Ceph Reduced data availability: 1 pg inactive pg 1.0 is stuck inactive for 9d, current state unknown, last acting []

资料出处:https://www.cnblogs.com/jiaxzeng/p/15917582.html

报错如下:

Ceph Reduced data availability: 1 pg inactive pg 1.0 is stuck inactive for 9d, current state unknown, last acting []

问题示意:

1个pg无法使用,

修复流程:

  1. 直接使用如下查看故障的pg
    [root@storage-ceph01 ~]# ceph pg dump_stuck inactive
    ok
    PG_STAT  STATE    UP  UP_PRIMARY  ACTING  ACTING_PRIMARY
    1.0      unknown  []          -1      []              -1
  2. 接下来请求gp测试
    [root@storage-ceph01 ~]# ceph pg 1.0 query
    Error ENOENT: i don‘t have pgid 1.0
  3. 重建pg
    [root@storage-ceph01 ~]# ceph osd force-create-pg 1.0 --yes-i-really-mean-it
    pg 1.0 now creating, ok

    file

  4. 验证pg状态
    [root@storage-ceph01 ~]# ceph pg 1.0 query | head
    {
    "snap_trimq": "[]",
    "snap_trimq_len": 0,
    "state": "active+clean",
    "epoch": 100,
    "up": [
        3,
        0,
        1
    ],

    file

  5. 查看ceph状态
[root@storage-ceph01 ~]# ceph -s
  cluster:
    id:     4d8fec26-e363-4753-b60f-49d69ab44cab
    health: HEALTH_OK

  services:
    mon: 3 daemons, quorum storage-ceph03,storage-ceph02,storage-ceph01 (age 13m)
    mgr: storage-ceph01(active, since 13m), standbys: storage-ceph02, storage-ceph03
    mds:  3 up:standby
    osd: 5 osds: 5 up (since 11m), 5 in (since 11m)

  data:
    pools:   1 pools, 1 pgs
    objects: 0 objects, 0 B
    usage:   5.1 GiB used, 340 GiB / 345 GiB avail
    pgs:     1 active+clean

重建的过程会有以下几个阶段:

  • 退化阶段:
    file
  • 重建阶段:
    file

发表回复

登录... 后才能评论