Sun Cluster 3.1 Software Installation Guide

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 lookup order of the following entries.

      • For the hosts and netmasks database entries, place files after cluster.

        For Sun Cluster HA for NFS, insert [SUCCESS=return] after files and before name services. This ensures that, if the node succeeds in resolving a name locally, it does not contact the listed name service(s) but instead returns success immediately.


        hosts:      cluster files [SUCCESS=return] nis

      • For all other database entries, place files first in 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 it in, in which case it is ignored.

    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.