Hardware Clock having wrong time on cluster node

  • 7011375
  • 15-Nov-2012
  • 15-Nov-2012

Environment

SUSE Linux Enterprise Server 11 Service Pack 1
SUSE Linux Enterprise Server 11 Service Pack 2
SUSE Linux Enterprise High Availability Extension 11 Service Pack 2
Novell Open Enterprise Server 11 (OES 11) Linux Support Pack 1
Novell Open Enterprise Server 11 (OES 11)

Situation

The time of the hardware clock is wrong.
The server has been fenced and not shutdown in a normal way.

Resolution

In /etc/sysconfig/ntp there have been added 2 new parameters:
## Type:           boolean
## Default:        "no"
#
# Force time synchronization befor start ntpd
#
NTPD_FORCE_SYNC_ON_STARTUP="no"

## Type:           boolean
## Default:        "no"
#
# Force time synchronization of hwclock befor start ntpd
# This works only if NTPD_FORCE_SYNC_ON_STARTUP is set
# to yes.
#
NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP="no"


By default these are set to "no". When set to "yes", the time will be set to the hardware clock when ntpd starts.

Cause

Normally the hardware clock will be set to the time from ntpd when the server is restarted or shut down. In a cluster environment (NCS and HAE) often these servers are fenced and no normal shutdown happens. Due to this the hardware clock will not be set to the actual time.

In addition, the hardware clock will only be updated when the difference between hardware time  and Kernel is 15 minutes or less. In case of daylight saving time switch the difference is bigger and due to that the hardware clock will not be updated by the kernel itself.

Additional Information

Also in /etc/sysconfig/clock the following option has to be set to "yes" (default):
SYSTOHC="yes"