Go to main content

Oracle® Solaris Cluster 4.3 System Administration Guide

Exit Print View

Updated: June 2017
 
 

How 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 clusternodenodeid-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 Oracle Solaris Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical.

  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 Oracle Solaris Cluster 4.3 Data Services Planning and Administration Guide.

  2. If your NTP configuration file refers to the private hostname that you are changing, bring down the NTP daemon on each node of the cluster.

    Use the svcadm command to shut down the NTP daemon. See the svcadm(1M) man page for more information about the NTP daemon.

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

    Run the utility from only one of the nodes in the cluster. for more information, see the clsetup(1CL) man page.


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

    You can also run the clnode command instead of the clsetup utility to change the private hostname. In the example below, the cluster node name is phys-schost-1. After you run the clnode command below, go to Step 6.

    phys-schost# clnode set -p privatehostname=New-private-nodename phys-schost-1
  4. In the clsetup utility, type the number for the option for the private hostname.
  5. In the clsetup utility, type the number for 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 (clusternodenodeid-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 or include file, update the NTP file on each node.

    If you changed a private hostname in your NTP configuration file (/etc/inet/ntp.conf) and you have peer host entries or a pointer to the include file for the peer hosts in your NTP configuration file (/etc/inet/ntp.conf.include), update the file on each node. If you changed a private hostname in your NTP include file, update the /etc/inet/ntp.conf.sc file 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. Typically, the ntp.conf.sc 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.

      Use the svcadm command to restart the NTP daemon.

      # svcadm enable svc:network/ntp:default
  8. Enable all data service resources and other applications that were disabled in Step 1.
    phys-schost# clresource enable resource[,…]

    For information about using the clresourcecommand, see the clresource(1CL) man page and the Oracle Solaris Cluster 4.3 Data Services Planning and Administration Guide.

Example 81  Changing the Private Hostname

The following example changes the private hostname from clusternode2-priv to clusternode4-priv, on node phys-schost-2. Perform this action on each node.

Disable all applications and data services as necessary
phys-schost-1# svcadm disable ntp
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# pfedit /etc/inet/ntp.conf.sc
...
peer clusternode1-priv
peer clusternode4-priv
peer clusternode3-priv
phys-schost-1# ping clusternode4-priv
phys-schost-1# svcadm enable ntp
Enable all applications and data services disabled at the beginning of the procedure