[pve-devel] [PATCH docs] sysadmin: add section about NTP configuration

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Oct 7 15:28:31 CEST 2016


based on wiki article Configuration_of_Time_Syncronization_(NTP)

---
Note: to be extended with information about ntpd once bug #998
has been fixed
Note: feel free to change file name and placement within chapter

 Makefile             |  3 ++-
 sysadmin.adoc        |  2 ++
 system-timesync.adoc | 44 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 system-timesync.adoc

diff --git a/Makefile b/Makefile
index 6cd5684..95c3e52 100644
--- a/Makefile
+++ b/Makefile
@@ -112,7 +112,8 @@ SYSADMIN_PARTS=					\
 	system-software-updates			\
 	pve-disk-health-monitoring		\
 	local-lvm				\
-	local-zfs
+	local-zfs				\
+	system-timesync
 
 SYSADMIN_SOURCES=				\
 	$(addsuffix .adoc, ${SYSADMIN_PARTS})	\
diff --git a/sysadmin.adoc b/sysadmin.adoc
index c9e0ae6..8746a5c 100644
--- a/sysadmin.adoc
+++ b/sysadmin.adoc
@@ -56,6 +56,8 @@ include::system-software-updates.adoc[]
 
 include::pve-network.adoc[]
 
+include::system-timesync.adoc[]
+
 include::pve-disk-health-monitoring.adoc[]
 
 include::local-lvm.adoc[]
diff --git a/system-timesync.adoc b/system-timesync.adoc
new file mode 100644
index 0000000..6e752a4
--- /dev/null
+++ b/system-timesync.adoc
@@ -0,0 +1,44 @@
+Time Synchronization
+--------------------
+include::attributes.txt[]
+
+The {pve} cluster stack itself relies heavily on the fact that all
+the nodes have precisely synchronized time. Some other components,
+like Ceph, also refuse to work properly if the local time on nodes is
+not in sync.
+
+Time synchronization between nodes can be achieved with the ``Network
+Time Protocol'' (`NTP`). {pve} uses `systemd-timesyncd` as NTP client
+by default, preconfigured to use a set of public servers. This setup
+works out of the box in most cases.
+
+
+Using Custom NTP Servers
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+In some cases, it might be desired to not use the default NTP
+servers. For example, if your {pve} nodes do not have access to the
+public internet (e.g., because of restrictive firewall rules), you
+need to setup local NTP servers and tell `systemd-timesyncd` to use
+them:
+
+.File `/etc/systemd/timesyncd.conf`
+----
+[Time]
+Servers=ntp1.example.com ntp2.example.com ntp3.example.com ntp4.example.com
+----
+
+After restarting the synchronization service (`systemctl restart
+systemd-timesyncd`) you should verify that your newly configured NTP
+servers are used by checking the journal (`journalctl --since -1h -u
+systemd-timesyncd`):
+
+----
+...
+Oct 07 14:58:36 node1 systemd[1]: Stopping Network Time Synchronization...
+Oct 07 14:58:36 node1 systemd[1]: Starting Network Time Synchronization...
+Oct 07 14:58:36 node1 systemd[1]: Started Network Time Synchronization.
+Oct 07 14:58:36 node1 systemd-timesyncd[13514]: Using NTP server 10.0.0.1:123 (ntp1.example.com).
+Oct 07 14:58:36 nora systemd-timesyncd[13514]: interval/delta/delay/jitter/drift 64s/-0.002s/0.020s/0.000s/-31ppm
+...
+----
-- 
2.1.4





More information about the pve-devel mailing list