当你的ceph集群出现如下状况时,
$ ceph -s
cluster 3a4399c0-2458-475f-89be-ff961fbac537
health HEALTH_WARN clock skew detected on mon.1, mon.2
monmap e17: 3 mons at {0=192.168.0.5:6789/0,1=192.168.0.6:6789/0,2=192.168.0.7:6789/0}, election epoch 6, quorum 0,1,2 0,1,2
mdsmap e39: 0/0/1 up
osdmap e127: 3 osds: 3 up, 3 in
pgmap v280: 576 pgs, 3 pools, 0 bytes data, 0 objects
128 MB used, 298 GB / 298 GB avail
576 active+clean
$ ceph -s
cluster 3a4399c0-2458-475f-89be-ff961fbac537
health HEALTH_WARN clock skew detected on mon.1, mon.2
monmap e17: 3 mons at {0=192.168.0.5:6789/0,1=192.168.0.6:6789/0,2=192.168.0.7:6789/0}, election epoch 6, quorum 0,1,2 0,1,2
mdsmap e39: 0/0/1 up
osdmap e127: 3 osds: 3 up, 3 in
pgmap v280: 576 pgs, 3 pools, 0 bytes data, 0 objects
128 MB used, 298 GB / 298 GB avail
576 active+clean
$ ceph health detail
HEALTH_WARN clock skew detected on mon.1, mon.2
mon.1 addr 192.168.0.6:6789/0 clock skew 8.37274s > max 0.05s (latency 0.004945s)
mon.2 addr 192.168.0.7:6789/0 clock skew 8.52479s > max 0.05s (latency 0.005965s)
这说明几个节点之间的时间同步出现了问题。
一个简单的解决办法就是:
1)停掉所有节点的ntpd服务,如果有的话
$ /etc/init.d/ntpd stop
2) 同步国际时间
$ ntpdate time.nist.gov
3) 如果执行完以上两步仍有报错,则需要重启所有monitor
另外一个办法就是重新配置ntp服务。