Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Change the Node Private Host Name

Use this procedure to change the private host name of a cluster node after installation has been completed.

Default private host names are assigned during initial cluster installation. The default private host name takes the form clusternode< nodeid>-priv, for example: clusternode3-priv . Change a private host name only if the name is already in use in the domain.


Caution – Caution –

Do not attempt to assign IP addresses to new private host names. The clustering software assigns them.


This procedure provides the long forms of the Sun Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix A, Sun Cluster Object-Oriented Commands.

  1. Disable, on all nodes in the cluster, any data service resources or other applications that might cache private host names.


    # clresource disable resource[,...]
    

    Include the following in the applications you disable.

    • HA-DNS and HA-NFS services, if configured

    • Any application that has been custom configured to use the private host name

    • Any application that is being used by clients over the private interconnect

    See the clresource(1CL) man page and the Sun Cluster Data Services Planning and Administration Guide for Solaris OS for information about using the clresource command.

  2. If your NTP configuration file refers to the private host name that you are changing, bring down the Network Time Protocol (NTP) daemon on each node of the cluster.

    • SPARC: If you are using Solaris 9 OS, use the xntpd command to shut down the Network Time Protocol (NTP) daemon. See the xntpd(1M) man page for more information about the NTP daemon.


      # /etc/init.d/xntpd.cluster stop
      
    • If you are using Solaris 10 OS, use the svcadm command to shut down the Network Time Protocol (NTP) daemon. See the svcadm(1M) man page for more information about the NTP daemon.


      # svcadm disable ntp
      
  3. Run the clsetup(1CL) utility to change the private host name of the appropriate node.

    To need to run the utility only from one of the nodes in the cluster.


    Note –

    When selecting a new private host name, ensure that the name is unique to the cluster node.


  4. Type the number that corresponds to the option for private host name.

  5. Type the number that corresponds to the option for changing a private host name.

    Answer the questions when prompted. You are asked the name of the node whose private host name is being changed (clusternode< nodeid>-priv), and the new private host name.

  6. Flush the name service cache.

    Perform this step on each node in the cluster. Flushing prevents the cluster applications and data services from trying to access the old private host name.


    # nscd -i hosts
    
  7. If you changed a private host name in your NTP configuration file, update your NTP configuration file (ntp.conf or ntp.conf.cluster) on each node.

    1. Use the editing tool of your choice.

      If you perform this step at installation, also remember to remove names for nodes which are configured. The default template is preconfigured with 16 nodes. Typically, the ntp.conf.cluster file is identical on each cluster node.

    2. Verify that you can successfully ping the new private host name from all cluster nodes.

    3. Restart the NTP daemon.

      Perform this step on each node of the cluster.

      • SPARC: If you are using Solaris 9 OS, use the xntpd command to restart the NTP daemon.

        If you are using the ntp.conf.cluster file, type the following:


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

        If you are using the ntp.conf file, type the following:


        # /etc/init.d/xntpd start
        
      • If you are using Solaris 10 OS, use the svcadm command to restart the NTP daemon.


        # svcadm enable ntp
        
  8. Enable all data service resources and other applications that were disabled in Step 1.


    # clresource disable resource[,...]
    

    See the clresource(1CL) man page and the Sun Cluster Data Services Planning and Administration Guide for Solaris OS for information about using the scswitch command.


Example 8–8 Changing the Private Host Name

The following example changes the private host name from clusternode2-priv to clusternode4-priv, on node phys-schost-2 .


[Disable all applications and data services as necessary.]
phys-schost-1# /etc/init.d/xntpd stop
phys-schost-1# clnode show | grep node
 ...
 private hostname:                           clusternode1-priv
 private hostname:                           clusternode2-priv
 private hostname:                           clusternode3-priv
 ...
phys-schost-1# clsetup
phys-schost-1# nscd -i hosts
phys-schost-1# vi /etc/inet/ntp.conf
 ...
 peer clusternode1-priv
 peer clusternode4-priv
 peer clusternode3-priv
phys-schost-1# ping clusternode4-priv
phys-schost-1# /etc/init.d/xntpd start
[Enable all applications and data services disabled at the beginning of the procedure.]