CEPH故障以其处理方法

1. Slow OSD heartbeats

# ceph -s
health: HEALTH_WARN
       Slow OSD heartbeats on back (longest 6181.010ms)
       Slow OSD heartbeats on front (longest 5953.232ms)

OSDs之间会相互测试(ping)访问速度,若两个OSDs之间的连接延迟高于1s,则表示OSDs之间的延迟太高,不利于CEPH集群的数据存储和访问。两个OSDs之间可以通过内网(存储服务器之间 / back)检测其延迟,也可以通过外网(存储服务器到使用服务器 / front)检测其延迟。若延迟过高,会将相应的OSDs down掉,进而可能导致CEPH数据丢失。

一般情况下OSDs之间延迟高的原因是因为网络原因导致的。通过查看详细的OSDs延迟信息查找延迟较高的主机,再进行解决。

# ceph health detail

[WRN] OSD_SLOW_PING_TIME_BACK: Slow OSD heartbeats on back (longest 11846.602ms)
    Slow OSD heartbeats on back from osd.12 [] to osd.25 [] 11846.602 msec
    Slow OSD heartbeats on back from osd.8 [] to osd.17 [] 3617.281 msec
    Slow OSD heartbeats on back from osd.16 [] to osd.27 [] 2784.517 msec
    Slow OSD heartbeats on back from osd.21 [] to osd.17 [] 1678.064 msec
    Slow OSD heartbeats on back from osd.11 [] to osd.15 [] 1675.884 msec
    Slow OSD heartbeats on back from osd.20 [] to osd.13 [] 1073.790 msec
[WRN] OSD_SLOW_PING_TIME_FRONT: Slow OSD heartbeats on front (longest 11427.677ms)
    Slow OSD heartbeats on front from osd.12 [] to osd.25 [] 11427.677 msec
    Slow OSD heartbeats on front from osd.8 [] to osd.17 [] 3787.868 msec
    Slow OSD heartbeats on front from osd.16 [] to osd.27 [] 3465.298 msec
    Slow OSD heartbeats on front from osd.11 [] to osd.15 [] 1469.591 msec
    Slow OSD heartbeats on front from osd.21 [] to osd.17 [] 1341.135 msec
    Slow OSD heartbeats on front from osd.20 [] to osd.13 [] 1224.235 msec
    Slow OSD heartbeats on front from osd.5 [] to osd.16 [] 1101.175 msec

通过以上信息查看,可以发现有一台主机和其它主机的OSDs延迟都比较高,将该主机的光纤网线拔下擦拭干净并重新插上得以解决。

2. slow ops

# ceph -s
     21 slow ops, oldest one blocked for 29972 sec, mon.ceph1 has slow ops

先保证所有存储服务器上的时间同步一致,再重启相应主机上的moniter服务解决。

3. pgs not deep-scrubbed in time

# ceph -s
    47 pgs not deep-scrubbed in time

应该是OSDs掉线后,CEPH自动进行数据恢复。再将相应的OSDs重新加入后,则需要将恢复的数据再擦除掉。于是提示相应的警告信息,正在进行删除相关的操作,且其pgs的数量会不断变少。等待一段时间后,则恢复正常,此时ceph文件系统性能很差。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据