Sunday, May 16, 2010

NTP configuration issues with Oracle 11gR2 RAC setup

During the Grid infrastructure setup for Oracle 11gR2 RAC, I ran into a weird error with ntp not working with the Grid
infrastructure installer.

The solution thanks to he Grumpy DBA, better known as Jay Caviness

is to edit ntp configuration on both cluster nodes and restart ntp services.

To do so, logon to each node as root and edit the /etc/sysconfig/ntpd configuration file to make change for options settings as shown below:

[root@vxnode2 ntp]# cat /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/"

# Set to 'yes' to sync hw clock after successful ntpdate

# Additional options for ntpdate
OPTIONS="-x -u ntp:ntp -p /var/run/"

You will need to restart ntp services for this to take affect:

root@vxnode2 ntp]# service ntpd stop
Shutting down ntpd: [ OK ]
[root@vxnode2 ntp]# service ntpd start
ntpd: Synchronizing with time server: [ OK ]
Starting ntpd: [ OK ]
[root@vxnode2 ntp]# ps -ef|grep ntp
root 7363 1 0 03:51 ? 00:00:00 ntpd -x -u ntp:ntp -p /var/run/

Now we can move forward in the 11gR2 RAC Grid Infrastructure setup.

Be aware that since we are using virtualization for 11gR2 RAC with VMware, you may need to restart the ntp services each time that you power on the VMs. Another option around this issue with ntp is to use the Oracle 11gR2 RAC cluster synchronization services (CSS) instead of ntp to let Oracle handle the network synchronization services for the cluster.

Configure Cluster Time Synchronization Service - (CTSS)

If you want to use Cluster Time Synchronization Service to do this, you need to remove your ntp configuration and shutdown the ntp services on both cluster nodes.

To deactivate the NTP service, you need to shutdown and disable the existing ntpd service, and remove the ntp.conf file. To complete these steps on CentOS Linux, run the following commands as the root user on both cluster nodes:

1) /sbin/service ntpd stop
2) chkconfig ntpd off
3) mv /etc/ntp.conf /etc/ntp.conf.original
4) Delete the following file:

rm /var/run/
This file maintains the pid for the NTP daemon.

When the installer finds that the NTP protocol is not active, the Cluster Time Synchronization Service is automatically installed in active mode and synchronizes the time across the nodes. If NTP is found configured, then the Cluster Time Synchronization Service is started in observer mode, and no active time synchronization is performed by Oracle Clusterware within the cluster.

To confirm that ctssd is active after installation, enter the following command as the Grid installation owner (grid):

1) crsctl check ctss
CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset (in msec): 0

Thanks to Jeffrey Hunter for these tips. He has an excellent writeup for 11gR2 RAC with iSCSI:

Next we will take a look at how to resolve issues with iSCSI disks not accessed by the 11gR2 RAC Grid infrastructure setup program.

1 comment:

Wes said...

thanks for reposting Jay's blog post. I had his bookmarked, but it appears his blog no longer exists. Jay has saved me many a times....I guess no longer.

PC Performance Test