Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Change the Node Private Hostname

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

Default private host names are assigned during initial cluster installation. The default private hostname takes the form clusternode< nodeid>-priv, for example: clusternode3-priv . Change a private hostname 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.


The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.

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 B, 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.


    phys-schost# 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 hostname

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

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

  2. If your NTP configuration file refers to the private hostname 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.


      phys-schost# /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.


      phys-schost# svcadm disable ntp
      
  3. Run the clsetup(1CL) utility to change the private hostname of the appropriate node.

    Run the utility from only one of the nodes in the cluster.


    Note –

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


  4. Type the number that corresponds to the option for the private hostname.

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

    Answer the questions when prompted. You are asked the name of the node whose private hostname you are changing (clusternode< nodeid>-priv), and the new private hostname.

  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 hostname.


    phys-schost# nscd -i hosts
    
  7. If you changed a private hostname 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 that 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 hostname 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.


    phys-schost# clresource disable resource[,...]
    

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


Example 9–8 Changing the Private Hostname

The following example changes the private hostname 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.]