Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the problem of time non-synchronization in Ceph system

Shulou Source: shulou.com Published: 2022-05-31 22:07:23 11月13日 Update

This article shows you how to solve the problem of time non-synchronization in the Ceph system. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

After my ceph cluster has been running for a period of time, I report the following warning:

# ceph-s cluster c6e7e7d9-2b91-4550-80b0-6fa46d0644f6 health HEALTH_WARN clock skew detected on mon.c pgs stuck inactive 896 pgs stuck unclean noscrub flag (s) set Monitor clock skew detected monmap e1: 5 mons at {adept 101.71.4.11 Election epoch 101.71.4.15 osdmap 6789 osds 0} TB 28, objects 0 GB used 1 TB / 386 TB avail 4096 active+clean 896 creating

The core message is clock skew detected on mon.c.

Monitor clock skew detected.

I use the following methods to solve the problem:

1. Execute the following command on each MON machine to shut down the ntpd service

Service ntpd stop

two。 Execute ntpupdate command to synchronize time information

[root@gnop029-ct-zhejiang_wenzhou-16-14] # ntpdate us.pool.ntp.org 5 Dec 16:27:20 ntpdate [30359]: adjust time server 209.118.204.201 offset 0.000712 sec

3. Restart the ntpd service

Service ntpd start

4. After restarting ceph-s, it was found that the cluster no longer reported a time problem:

[root@gnop029-ct-zhejiang_wenzhou-16-14 ~] # ceph-s cluster c6e7e7d9-2b91-4550-80b0-6fa46d0644f6 health HEALTH_WARN pgs stuck inactive 896 pgs stuck unclean noscrub flag (s) set monmap e1: 5 mons at {adept 101.71.4.11 Election epoch 101.71.4.15 osdmap 6789 osds 0} TB 28, objects 0 GB used 1 TB / 386 TB avail 4096 active+clean 896 creating

Actions can be placed in periodic tasks through the crontab command

Crontab-e

Add the following information

10 * / usr/sbin/ntpdate us.pool.ntp.org

Restart the service again

Service crond restartStopping crond: [OK] Starting crond: [OK] the above content is how to solve the problem of time non-synchronization in Ceph system. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Problems synchronization information commands services systems content that is skills knowledge clustering concise concise tasks methods actions can be passed cycle article time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei Redmi OPPO Reno Shulou Technology