Slewing the 11gR2 dragon


One of the first new pieces of 11gR2 I like is the installer, for the grid and RAC install particularly. The feature I like best is the fact that it runs cluster verify and will give the DBA the chance to fix most problems with the fixup scripts. One problem it cannot fix however is a requirement which will pop up on most systems to use the “slewing” option for ntp. The installer simply says to enable slewing with the “-x” option, but that is it. It What is slewing, and how do you set it?

Slewing is an option for the ntp daemon (ie. ntpd -x, xntp -x) to prevent time from moving backwards in large amounts. This slewing will help reduce time changes into multiple small changes, such that they will not impact Oracle Clusterware. While it has been a requirement for a long time with Oracle Clusterware, it is more strongly enforced with 11gR2 as the clusterware is more sensitive now to time changes. (This fact is also shown in the need for Oracle to create CTS (Cluster Time System) which can be created and used on the nodes of a cluster to keep them in sync with each other if NTP is not available or accessible, but that is another post).

Implementing slewing is simple. On Linux, as root, edit the /etc/sysconfig/ntpd file. Generally, it looks something like this:

# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"
 
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
 
# Additional options for ntpdate
NTPDATE_OPTIONS=""

Modify the file to add the “-x” option to ntp

OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"

Restart the daemon:

# service ntpd stop
Shutting down ntpd: [  OK  ]
# service ntpd start
ntpd: Synchronizing with time server: [  OK  ]
Starting ntpd: [  OK  ]
# ps -ef |grep ntp
ntp      32051     1  0 10:48 ?        00:00:00 ntpd -x -u ntp:ntp -p /var/run/ntpd.pid

That is it, you can copy this file to all the nodes in your new cluster and restart the daemon. Once done, the installer will cease to bug you with the ntp reminder and you can go on building your new 11gR2 cluster.

  1. #1 by Rob on November 6th, 2009

    Thanks for this info! I kept trying to put it in /etc/ntp.conf which the installer didn’t like.

  2. #2 by jason arneil on December 16th, 2009

    Hi Jay,

    Thanks for blogging this, just ran into and you have provided me with the solution in an easily digestible article!

    cheers,

    jason.

  3. #3 by Matt on January 11th, 2010

    Great INFO!!!

  4. #4 by Balaji R on March 5th, 2010

    Really helped. Thanks.

(will not be published)

  1. No trackbacks yet.