]>
Commit | Line | Data |
---|---|---|
4b985658 FG |
1 | Time Synchronization |
2 | -------------------- | |
1a2d79d9 DM |
3 | ifdef::wiki[] |
4 | :pve-toplevel: | |
5 | endif::wiki[] | |
4b985658 FG |
6 | |
7 | The {pve} cluster stack itself relies heavily on the fact that all | |
8 | the nodes have precisely synchronized time. Some other components, | |
9 | like Ceph, also refuse to work properly if the local time on nodes is | |
10 | not in sync. | |
11 | ||
12 | Time synchronization between nodes can be achieved with the ``Network | |
13 | Time Protocol'' (`NTP`). {pve} uses `systemd-timesyncd` as NTP client | |
14 | by default, preconfigured to use a set of public servers. This setup | |
15 | works out of the box in most cases. | |
16 | ||
17 | ||
18 | Using Custom NTP Servers | |
19 | ~~~~~~~~~~~~~~~~~~~~~~~~ | |
20 | ||
21 | In some cases, it might be desired to not use the default NTP | |
22 | servers. For example, if your {pve} nodes do not have access to the | |
23 | public internet (e.g., because of restrictive firewall rules), you | |
24 | need to setup local NTP servers and tell `systemd-timesyncd` to use | |
25 | them: | |
26 | ||
27 | .File `/etc/systemd/timesyncd.conf` | |
28 | ---- | |
29 | [Time] | |
5ec2497f | 30 | NTP=ntp1.example.com ntp2.example.com ntp3.example.com ntp4.example.com |
4b985658 FG |
31 | ---- |
32 | ||
33 | After restarting the synchronization service (`systemctl restart | |
34 | systemd-timesyncd`) you should verify that your newly configured NTP | |
35 | servers are used by checking the journal (`journalctl --since -1h -u | |
36 | systemd-timesyncd`): | |
37 | ||
38 | ---- | |
39 | ... | |
40 | Oct 07 14:58:36 node1 systemd[1]: Stopping Network Time Synchronization... | |
41 | Oct 07 14:58:36 node1 systemd[1]: Starting Network Time Synchronization... | |
42 | Oct 07 14:58:36 node1 systemd[1]: Started Network Time Synchronization. | |
43 | Oct 07 14:58:36 node1 systemd-timesyncd[13514]: Using NTP server 10.0.0.1:123 (ntp1.example.com). | |
44 | Oct 07 14:58:36 nora systemd-timesyncd[13514]: interval/delta/delay/jitter/drift 64s/-0.002s/0.020s/0.000s/-31ppm | |
45 | ... | |
46 | ---- |