Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Change the Private Hostname

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

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


Caution – Caution –

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


Steps
  1. Disable, on all nodes in the cluster, any Data Service resources or other applications that might cache private hostnames.


    # scswitch -n -j resource1, resource2
    

    Include the following in the applications you disable.

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

    • Any application which has been custom configured to use the private hostname.

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

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

  2. Bring down the Network Time Protocol (NTP) daemon on each node of the cluster.

    • If you are using Solaris 8 or Solaris 9, use the xntpd command to bring 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, use the svcadm command to bring 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 scsetup(1M) utility to change the private hostname of the appropriate node.

    It is only necessary to do this from one of the nodes in the cluster.


    Note –

    When selecting a new private hostname, be sure the name is unique to the cluster node.


  4. Select 5, Private Hostnames, from the Main Menu.

  5. Select 1, Change a Private Hostname, from the Private Hostnames Menu.

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

  6. Flush the name service cache.

    Do this on each node in the cluster. This prevents the cluster applications and data services from trying to access the old private hostname.


    # nscd -i hosts
    
  7. Edit the ntp.conf.cluster file on each node to change the private hostname to the new one.

    Use whatever editing tool you prefer.

    If this is done at install time, also remember to remove names for nodes which are configured; the default template comes pre-configured with sixteen nodes. Typically, the ntp.conf.cluster file will be identical on each cluster node.

  8. Verify that you can successfully ping the new private hostname from all cluster nodes.

  9. Restart the NTP daemon.

    Do this on each node of the cluster.

    • If you are using Solaris 8 or Solaris 9, use the xntpd command to restart the NTP daemon.


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


      # svcadm enable ntp
      
  10. Enable all Data Service resources and other applications that were disabled in Step 1.


    # scswitch -e -j resource1, resource2
    

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


Example 7–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# scconf -p | grep node
 ...
 Cluster nodes:                  phys-schost-1 phys-schost-2 phys-
 schost-3
 Cluster node name:                                 phys-schost-1
  Node private hostname:                           clusternode1-priv
 Cluster node name:                                 phys-schost-2
  Node private hostname:                           clusternode2-priv
 Cluster node name:                                 phys-schost-3
  Node private hostname:                           clusternode3-priv
 ...
phys-schost-1# scsetup
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.
]