博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ceph修复pg inconsistent
阅读量:7240 次
发布时间:2019-06-29

本文共 1410 字,大约阅读时间需要 4 分钟。

异常情况

1、收到异常情况如下:

HEALTH_ERR 37 scrub errors; Possible data damage: 1 pg inconsistent

2、查看详细信息

#ceph health detailHEALTH_ERR 37 scrub errors; Possible data damage: 1 pg inconsistentOSD_SCRUB_ERRORS 37 scrub errorsPG_DAMAGED Possible data damage: 1 pg inconsistentpg 1.dbc is active+clean+inconsistent, acting [55,71,25]

3、预处理办法

一般情况采用 ceph pg [pgid],但是经过观察,并不能解决。

参考处理办法

Just move the object away with the following:

  • stop the OSD that has the wrong object responsible for that PG
  • flush the journal (ceph-osd -i <id> --flush-journal)
  • move the bad object to another location
  • start the OSD again
  • call ceph pg repair 17.1c1

我的处理过程

找出异常的 pg,然后到对应的osd所在主机上修复。

root@CLTQ-064-070:~# ceph osd find 55{    "osd": 55,    "ip": "172.29.64.76:6817/789571",    "crush_location": {        "host": "CLTQ-064-076",        "root": "default"    }}

这里表示是主机CLTQ-064-076

然后到 进行修复

1、停止osd

systemctl stop ceph-osd@55.server

2、刷入日志

ceph-osd -i 55 --flush-journal

3、启动osd

systemctl start ceph-osd@55.server

4、修复(一般不需要)

ceph pg repair 1.dbc

5、查看pg所在osd

# ceph pg ls|grep 1.dbc1.dbc      3695                  0        0         0       0 12956202159 1578     1578                active+clean 2018-04-03 19:34:45.924642  2489'4678 2494:19003 [55,71,25]         55 [55,71,25]             55  2489'4678 2018-04-03 18:32:56.365327       2489'4678 2018-04-03 18:32:56.365327

可以确认集群恢复OK。PG还是在 osd.55上。

转载于:https://blog.51cto.com/3168247/2094597

你可能感兴趣的文章
Astar 求两点之间最短路径算法(转载+自己注释)
查看>>
我的友情链接
查看>>
换行和回车的区别 有趣
查看>>
我的友情链接
查看>>
html使用a标签不通过后台实现直接下载
查看>>
搭建高可用mongo分布式---具体操作
查看>>
Netty内存池之PoolThreadCache详解
查看>>
java笔记8
查看>>
利用JAVA的BitSet实现数组排序
查看>>
华为USG防火墙基本配置
查看>>
centos6.3(x64) squid透明代理服务器(详细安装步骤)
查看>>
Java&keytool生成RSA密钥
查看>>
我的友情链接
查看>>
adb 调试时出现device not found的几种解决方式
查看>>
JSON.stringify
查看>>
我的友情链接
查看>>
Eureka Server启用 https服务指北
查看>>
动画小结
查看>>
在Felix中使用Metatype Service并在OSGi中获得更新
查看>>
软件包管理 之 文件解压缩
查看>>