Sun Cluster 3.1 Software Installation Guide

How to Configure Network Time Protocol (NTP)

Perform this task to create or modify the NTP configuration file after you install Sun Cluster software. You must also modify the NTP configuration file when you add a node to an existing cluster and when you change the private hostname of a node in the cluster.


Note –

The primary requirement when you configure NTP, or any time synchronization facility within the cluster, is that all cluster nodes must be synchronized to the same time. Consider accuracy of time on individual nodes to be of secondary importance to the synchronization of time among nodes. You are free to configure NTP as best meets your individual needs, as long as this basic requirement for synchronization is met.

See the Sun Cluster 3.1 Concepts Guide for further information about cluster time. See the /etc/inet/ntp.cluster template file for additional guidelines on how to configure NTP for a Sun Cluster configuration.


  1. Did you install your own /etc/inet/ntp.conf file before you installed Sun Cluster software?

    • If yes, you do not need to modify your ntp.conf file. Skip to Step 8.

    • If no, go to Step 2.

  2. Become superuser on a cluster node.

  3. Do you have your own /etc/inet/ntp.conf file to install on the cluster nodes?

    • If yes, copy your /etc/inet/ntp.conf file to each node of the cluster, then skip to Step 6.


      Note –

      All cluster nodes must be synchronized to the same time.


    • If no, go to Step 4 to edit the /etc/inet/ntp.conf.cluster file. Sun Cluster software creates this file as the NTP configuration file if an /etc/inet/ntp.conf file is not found during Sun Cluster installation. Do not rename the ntp.conf.cluster file as ntp.conf.

  4. On one node of the cluster, edit the private hostnames in the /etc/inet/ntp.conf.cluster file.

    If /etc/inet/ntp.conf.cluster does not exist on the node, you might have an /etc/inet/ntp.conf file from an earlier installation of Sun Cluster software. If so, perform the following edits on that ntp.conf file.

    1. Ensure that an entry exists for the private hostname of each cluster node.

    2. Remove any unused private hostnames.

      If the ntp.conf.cluster file contains nonexistent private hostnames, when a node is rebooted the system will generate error messages when the node attempts to contact those nonexistent private hostnames.

    3. If you changed a node's private hostname, ensure that the NTP configuration file contains the new private hostname.

    4. If necessary, make other modifications to meet your NTP requirements.

  5. Copy the NTP configuration file to all nodes in the cluster.

    The contents of the ntp.conf.cluster file must be identical on all cluster nodes.

  6. Stop the NTP daemon on each node.

    Wait for the stop command to complete successfully on each node before you proceed to Step 7.


    # /etc/init.d/xntpd stop
    

  7. Restart the NTP daemon on each node.

    • For ntp.conf.cluster, run the following command.


      # /etc/init.d/xntpd.cluster start
      

      The xntpd.cluster startup script first looks for the /etc/inet/ntp.conf file. If that file exists, the script exits immediately without starting the NTP daemon. If ntp.conf does not exist but ntp.conf.cluster does exist, the NTP daemon is started using ntp.conf.cluster as the NTP configuration file.

    • For ntp.conf, run the following command.


      # /etc/init.d/xntpd start
      
  8. Do you intend to use Sun Management Center to monitor the cluster?