Setting up a Network Time Protocol server by using ntpd
Before you begin
In a Db2 pureScale® environment, to synchronize operations and facilitate time sensitive operations, the system clocks of all members must be synchronized.
For this reason, either ntpd or chronyd must be setup on all hosts in the cluster. On AIX, the Db2 installer installs and sets up the ntpd server and clients. On Linux, the ntpd server is used only if it was already set up prior to Db2 installation or if chronyd packages are not installed already. Regardless of ntpd or chronyd, the NTP server is the primary CF by default. You can use the steps in this topic to change the default setting and assign another host to act as the NTP server.
The Db2 database manager checks whether NTP is correctly set up on each member and verifies the presence of the NTP daemon. The Db2 database manager also periodically compares time stamps between members to check that they differ by less than the value set by the MAX_TIME_DIFF database manager configuration parameter.
In a Db2 pureScale environment, the value of MAX_TIME_DIFF represents the maximum number of minutes allowed between the system clocks of two members; the default is 1 minute. For each member, if NTP is not correctly set up or the NTP daemon is not present, or if time stamps between members differ by more than the value of MAX_TIME_DIFF, warnings are written to the db2diag log files.
About this task
- Choose the host that you will setup as an NTP server.
- Setup the NTP daemon to synchronize to its own system clock.
Edit /etc/ntp.conf and add the following lines:
server 127.127.1.0 prefer # the logical IP address for the NTP server to sync to its own system clock fudge 127.127.1.0 driftfile /etc/ntp.drift tracefile /etc/ntp.trace
- Configure the NTP server to start at system restart.
- On AIX® operating systems,
edit the file /etc/rc.tcpip and uncomment the following entry:
start /usr/sbin/xntpd -x "$src_running"
- On Linux® operating systems, run the chkconfig ntp on command.
- On AIX® operating systems, edit the file /etc/rc.tcpip and uncomment the following entry:
- Start the NTP server:
- On AIX operating systems,
startsrc -s xntpdcommand.
- On Linux operating systems, run the service ntp start command.
- On AIX operating systems, run the