Skip to main content
RunBook Academy

CephLI · Host PreparationHost Preparation

Configuring time synchronisation for Ceph

Intermediate⏱ ~15 minchrony

What you'll learn

  • Configure chrony to Ceph's requirements
  • Verify synchronisation is actually achieved
  • Handle virtualised and edge hosts
  • Monitor time as an ongoing concern

Prerequisites

None — start here.

Verified against Ceph Tentacle 20.2.x · Ceph Squid 19.2.x (supported previous) · cephadm matches the verified Ceph release · podman 4.x · csi-rbd and csi-cephfs current · RBD / CephFS / RGW current (matches Ceph release) · Linux kernel 5.15+ (5.10 minimum) · Ubuntu 24.04 LTS (Ceph host baseline) · Debian 12 (Bookworm) (Ceph host baseline) · Rocky Linux / RHEL / AlmaLinux 9.x (Ceph host baseline) · Proxmox VE 9.x (cross-course integration) · Kubernetes 1.31+ (cross-course integration) · 2026-08-18

Not yet marked complete on this device.

Why this matters in production

Ceph’s tolerance is 50 milliseconds by default, which is tighter than most services require and tighter than a default installation reliably achieves. Configuring it deliberately and verifying the result is what prevents a class of confusing failures.

Configuration

# /etc/chrony.conf
server ntp1.example.com iburst
server ntp2.example.com iburst
server ntp3.example.com iburst

# step the clock if the offset is large, but only in the first few updates
makestep 1.0 3

# allow the local clock to be disciplined quickly
maxupdateskew 100.0
rtcsync
systemctl enable --now chronyd

Three or more sources so one bad server is outvoted. The same sources on every Ceph host so they converge on the same time rather than independently on nearby ones.

Verifying it works

Installing chrony is not the same as being synchronised:

chronyc tracking
Reference ID    : C0A80101 (ntp1.example.com)
Stratum         : 3
System time     : 0.000012 seconds fast of NTP time
Leap status     : Normal
FieldWhat to check
Reference IDnot 00000000 — that means unsynchronised
System timeoffset well under 50 ms
Leap statusNormal, not Not synchronised
chronyc sources -v
chronyc sourcestats

A source marked ^* is the selected one; ^? means unreachable.

Across the cluster

ceph time-sync-status
ceph -s | grep -i clock
# a direct comparison
for h in ceph-mon-01 ceph-mon-02 ceph-mon-03; do
  printf '%-16s %s\n' "$h" "$(ssh "$h" date -u +%s.%N)"
done

Virtualised hosts

Virtual machines have clocks that drift differently — the hypervisor may pause them, and time can jump on migration.

# check the clocksource
cat /sys/devices/system/clocksource/clocksource0/current_clocksource

kvm-clock or tsc are appropriate. Ensure the hypervisor is not also synchronising the guest clock independently, which fights chrony and produces oscillation.

Monitoring

chronyc tracking | awk '/System time/{print $4}'

Alert on the offset exceeding a fraction of the Ceph tolerance — perhaps 20 ms — so drift is caught before it causes symptoms rather than after.

Quiz

Knowledge check · 4 questions

  1. Q1. `chronyc tracking` reports a Reference ID of 00000000. What does this mean?

  2. Q2. The `makestep` directive is what allows a freshly-booted host with a wrong clock to synchronise in seconds rather than hours.

  3. Q3. Diagnose time problems that appear after reboots.

    A cluster works correctly until hosts are rebooted, after which MON_CLOCK_SKEW warnings appear for an hour or two and then clear on their own. chrony is installed and running on every host.

  4. Q4. Why should time offset be alerted on well below Ceph's tolerance?

Passing score: 75%. Answers are checked in this browser.

Production discipline

Verify chronyc tracking on every host rather than checking that the service is running; installed and synchronised are different states and only one of them is sufficient. Configure makestep so a rebooted host converges in seconds, since the slow-correction default produces warnings that appear after every reboot.

Cross-course references

  • Kubernetes: certificate and token validity depend on the same clock discipline
  • Linux: time synchronisation verification is standard practice with a tighter tolerance here