Sun Cluster Software Installation Guide for Solaris OS

How to Configure the Name-Service Switch

Perform this task on each node in the cluster.

  1. Become superuser on the cluster node.

  2. Edit the /etc/nsswitch.conf file.

    1. Verify that cluster is the first source look-up for the hosts and netmasks database entries.

      This order is necessary for Sun Cluster software to function properly. The scinstall(1M) command adds cluster to these entries during installation.

    2. (Optional) To increase availability to data services if the naming service becomes unavailable, change the look-up order of the following entries:

      • For the hosts and netmasks database entries, follow cluster with files.

      • For Sun Cluster HA for NFS, also insert [SUCCESS=return] after cluster files and before name services.

        hosts:      cluster files [SUCCESS=return] nis

        This look-up order ensures that, if the node resolves a name locally, the node does not contact the listed name service(s). Instead, the node returns success immediately.

      • For all other database entries, place files first in the look-up order.

      • If the [NOTFOUND=return] criterion becomes the last item of an entry after you modify the lookup order, the criterion is no longer necessary. You can either delete the [NOTFOUND=return] criterion from the entry or leave the criterion in the entry. A [NOTFOUND=return] criterion at the end of an entry is ignored.

    3. Make any other changes that are required by specific data services.

      See each manual for the data services that you installed.

    The following example shows partial contents of an /etc/nsswitch.conf file. The look-up order for the hosts and netmasks database entries is first cluster, then files. The look-up order for other entries begins with files. The [NOTFOUND=return] criterion is removed from the entries.

    # vi /etc/nsswitch.conf
    passwd:     files nis
    group:      files nis
    hosts:      cluster files nis
    netmasks:   cluster files nis

    See the nsswitch.conf(4) man page for more information about nsswitch.conf file entries.

  3. Set up your root user's environment.

    Go to How to Set Up the Root Environment.