Sun Cluster Data Service for DNS Guide for Solaris OS

Installing and Configuring Sun Cluster HA for DNS

This chapter describes the steps to install and configure the Sun Cluster HA for Domain Name Service (DNS) data service on your Sun Cluster servers.

This chapter contains the following sections.

You must configure Sun Cluster HA for DNS as a failover data service. See Chapter 1, Planning for Sun Cluster Data Services, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS and the Sun Cluster Concepts Guide for Solaris OS document for general information on data services, resource groups, resources, and other related topics.


Note –

You can use SunPlexTM Manager to install and configure this data service. See the SunPlex Manager online help for details.


Overview of the Installation and Configuration Process for Sun Cluster HA for DNS

The following table lists the sections that describe the installation and configuration tasks.

Table 1 Task Map: Installing and Configuring Sun Cluster HA for DNS

Task 

For Instructions, Go To … 

Install DNS 

Installing DNS

Install Sun Cluster HA for DNS packages 

Installing Sun Cluster HA for DNS Packages

Configure and start Sun Cluster HA for DNS 

Registering and Configuring Sun Cluster HA for DNS

Verify the data service installation and configuration 

Verifying Data Service Installation and Configuration

Tune the Sun Cluster HA for DNS fault monitor 

Tuning the Sun Cluster HA for DNS Fault Monitor

Installing DNS

This section describes the steps to install DNS and to enable DNS to run as Sun Cluster HA for DNS.

Sun Cluster HA for DNS uses the Internet Domain Name Server (in.named) software that is bundled with the Solaris 8 and Solaris 9 operating environments. See the in.named(1M) man page for information on how to set up DNS. The Sun Cluster configuration involves the following differences.

ProcedureHow to Install DNS

This section describes how to install the DNS.

Steps
  1. Become superuser on a cluster member.

  2. Decide on the network resource that will provide the DNS service.

    This name should be an IP address (logical hostname or shared address) that you set up when you install the Sun Cluster software. See the Sun Cluster Concepts Guide for Solaris OS document for details on network resources.

  3. Ensure that the DNS executable (in.named) is in the directory /usr/sbin.

    The DNS executable is bundled with the Solaris 8 and Solaris 9 operating environments. Ensure that this executable is located in the /usr/sbin directory before you begin the installation.

  4. Create directory structure /global/dns/named on the cluster file system to hold the DNS configuration files (at level /global/dns) and database files (at level /global/dns/named).

    See the Sun Cluster Software Installation Guide for Solaris OS for information on how to set up cluster file systems.


    # mkdir -p /global/dns/named
    
  5. Place the configuration file for DNS, named.conf or named.boot, under the /global/dns directory.

    If you have already installed DNS, you can copy the existing named.conf or named.boot file to the /global/dns directory. Otherwise, create a named.conf file in this directory. See the in.named(1M) man page for information on the types of entries to place in named.conf or named.boot. Either the named.conf file or the named.boot file must exist. Both files can exist.

  6. Place all of the DNS database files (listed in the named.conf file) under the /global/dns/named directory.

  7. On all of the clients of Sun Cluster HA for DNS, create an entry for the network resource of the DNS service in the /etc/resolv.conf file.

    On all of the nodes, edit the /etc/resolv.conf file to contain the network resource. The following example shows the entries for a four-node configuration (phys-schost-1, phys-schost-2, phys-schost-3, and phys-schost-4) with the logical hostname schost-1.eng.sun.com.


    domain eng.sun.com
     
    ; schost-1.eng.sun.com
    
    (Only entry to be added if the file is already present.)
     
    nameserver 192.29.72.90
     
    ; phys-schost-2.eng
    nameserver 129.146.1.151
     
    ; phys-schost-3.eng
    nameserver 129.146.1.152
     
    ; phys-schost-4.eng
    nameserver 129.144.134.19
     
    ; phys-schost-1.eng
    nameserver 129.144.1.57

    Make the network resource the first entry after the domain name. DNS attempts to use the addresses in the order that they are listed in the resolv.conf file to access the server.


    Note –

    If the /etc/resolv.conf is already present on the nodes, just add the first entry that shows the logical hostname in the preceding example. The order of the entries determines the order in which DNS tries to access the server.


  8. On all of the cluster nodes, edit the /etc/inet/hosts file to create an entry for the network resource of the DNS service.

    In the following example, perform these steps.

    • Replace the IPaddress variable with your actual IP address, such as 129.146.87.53.

    • Replace the logical-hostname variable with your actual network resource (logical hostname or shared address).


    127.0.0.1						localhost
    IPaddress						logical-hostname
    
  9. On all of the cluster nodes, edit the /etc/nsswitch.conf file to add the string dns after cluster and files to the hosts entry.

    Example:


    hosts:		 	cluster files dns
  10. On all of the cluster nodes, test DNS.

    The following example shows how to test DNS.


    # /usr/sbin/in.named -c /global/dns/named.conf
    # nslookup phys-schost-1
    
  11. On all of the cluster nodes, stop DNS.

    Be sure to stop the in.named executable before you proceed.


    # pkill -x in.named
    
Next Steps

If you installed the Sun Cluster HA for DNS packages during your Sun Cluster installation, go to Registering and Configuring Sun Cluster HA for DNS. Otherwise, go to Installing Sun Cluster HA for DNS Packages.

Installing Sun Cluster HA for DNS Packages

If you did not install the Sun Cluster HA for DNS packages during your initial Sun Cluster installation, perform this procedure to install the packages. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for DNS packages. To complete this procedure, you need the Sun Cluster Agents CD.

If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.

Install the Sun Cluster HA for DNS packages by using one of the following installation tools:


Note –

If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Web Start program.


ProcedureHow to Install Sun Cluster HA for DNS Packages Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for DNS packages, become superuser.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Insert the Sun Cluster Agents CD into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/cdrom0 directory.

  4. Change to the Sun Cluster HA for DNS component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for DNS data service resides in this directory.


    # cd /cdrom/cdrom0/components/SunCluster_HA_DNS_3.1
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow the instructions on the screen to install the Sun Cluster HA for DNS packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Remove the Sun Cluster Agents CD from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      
Next Steps

Go to Registering and Configuring Sun Cluster HA for DNS.

ProcedureHow to Install Sun Cluster HA for DNS Packages Using the scinstall Utility

Perform this procedure on all of the cluster members that can master Sun Cluster HA for DNS.

Before You Begin

Ensure that you have the Sun Cluster Agents CD.

Steps
  1. Load the Sun Cluster Agents CD into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Select the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

Next Steps

Go to Registering and Configuring Sun Cluster HA for DNS.

Registering and Configuring Sun Cluster HA for DNS

This procedure describes how to use the scrgadm(1M) command to register and configure Sun Cluster HA for DNS.


Note –

Other options also enable you to register and configure the data service. See Tools for Data Service Resource Administration in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details about these options.


Setting Sun Cluster HA for DNS Extension Properties

The sections that follow contain instructions for registering and configuring Sun Cluster HA for DNS resources. For information about the extension properties, see Appendix A, Sun Cluster HA for DNS Extension Properties. The Tunable entry indicates when you can update a property.

See Appendix A, Standard Properties, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for details on all of the Sun Cluster properties.

To set an extension property of a resource, include the following option in the scrgadm(1M) command that creates or modifies the resource:


-x property=value 
-x property

Identifies the extension property that you are setting

value

Specifies the value to which you are setting the extension property

You can also use the procedures in Chapter 2, Administering Data Service Resources, in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure resources after the resources are created.

ProcedureHow to Register and Configure Sun Cluster HA for DNS

This section describes how to register and configure Sun Cluster HA for DNS.

To perform this procedure, you need the following information about your configuration.


Note –

Perform this procedure on any cluster member.


Steps
  1. Become superuser on a cluster member.

  2. Disable the SMF service /network/nfs/server:default.

    Perform this step before starting any Sun Cluster HA for DNS resource.

    In the event of any failure in the initial primary node, failover is possible only if the Service Management Facility (SMF) service /network/nfs/server:default is disabled. On all potential primary nodes, disable this service by running the following command.


    # svcadm disable /network/nfs/server:default
    
  3. Register the resource type for the data service.


    # scrgadm -a -t SUNW.dns
    
    -a

    Adds the data service resource type.

    -t SUNW.dns

    Specifies the predefined resource type name for your data service.

  4. Create a resource group for network and DNS resources to use.

    You can use the -h option to optionally select the set of nodes on which the data service can run.


    # scrgadm -a -g resource-group [-h nodelist]
    -g resource-group

    Specifies the name of the resource group. This name can be your choice but must be unique for the resource groups within the cluster.

    [-h nodelist]

    Specifies an optional comma-separated list of physical node names or IDs that identify potential masters. The order here determines the order in which the nodes are considered as primary during failover.


    Note –

    Use the -h option to specify the order of the node list. If all of the cluster nodes are potential masters, you do not need to use the -h option.


  5. Verify that all of the network resources that you will use have been added to your name service database.

    You should have performed this verification during the Sun Cluster installation. See the planning chapter in the Sun Cluster Software Installation Guide for Solaris OS for details.


    Note –

    To avoid any failures because of name service lookup, verify that all of the network resources are present in the server's and client's /etc/inet/hosts file. Configure name service mapping in the /etc/nsswitch.conf file on the servers to first check the local files before trying to access NIS or NIS+.


  6. Add network resources to the resource group.

    For example, run the following command to add a logical hostname to a resource group.


    # scrgadm -a -L -g resource-group -l logical-hostname [logical-hostname] \
    [-n netiflist]
    -l logical-hostname

    Specifies a comma-separated list of network resources (logical hostname or shared address).

    -n netiflist

    Specifies an optional, comma-separated list that identifies the IP Networking Multipathing groups that are on each node. Each element in netiflist must be in the form of netif@node. netif can be given as an IP Networking Multipathing group name, such as sc_ipmp0. The node can be identified by the node name or node ID, such as sc_ipmp0@1 or sc_ipmp@phys-schost-1.


    Note –

    Sun Cluster does not currently support using the adapter name for netif.


  7. Add a DNS application resource to the resource group.


    # scrgadm -a -j [resource] -g resource-group \
    -t SUNW.dns -y Network_resources_used=network-resource, …\
    -y Port_list=port-number/protocol -x DNS_mode=config-file \ 
    -x Confdir_list=config-directory
    
    -j resource

    Specifies the DNS application resource name.

    -t SUNW.dns

    Specifies the name of the resource type to which this resource belongs. This entry is required.

    -y Network_resources_used=network-resource, …

    Specifies a comma-separated list of network resources (logical hostnames or shared addresses) that DNS will use. If you do not specify this property, the value defaults to all of the network resources that are contained in the resource group.

    -y Port_list=port-number/protocol

    Specifies a port number and the protocol to be used. If you do not specify this property, the value defaults to 53/udp.

    -x DNS_mode=config-file

    Specifies the configuration file to use, either conf (which specifies the file named.conf) or boot (which specifies the file named.boot). If you do not specify this property, the value defaults to conf.

    -x Confdir_list=config-directory

    Specifies the DNS configuration directory, which must be on the cluster file system. Sun Cluster HA for DNS requires this extension property.

  8. Run the scswitch(1M) command to complete the following tasks.

    • Enable the resource and fault monitoring.

    • Move the resource group into a managed state.

    • Bring the resource group online.


    # scswitch -Z -g resource-group
    
    -Z

    Enables the resource and monitor, moves the resource group to the managed state, and brings the resource group online.

    -g resource-group

    Specifies the name of the resource group.


Example 1 Registering Failover Sun Cluster HA for DNS

The following example shows how to register Sun Cluster HA for DNS on a two-node cluster. Note that at the end, the scswitch command starts Sun Cluster HA for DNS.


Cluster Information
Node names: phys-schost-1, phys-schost-2
Logical hostname: schost-1
Resource group: resource-group-1 (for all of the resources)
Resources: schost-1 (logical hostname), dns-1 (DNS application resource)

(Disable the SMF service /network/nfs/server:default.) 
# svcadm disable /network/nfs/server:default

(Register the DNS resource type.)
# scrgadm -a -t SUNW.dns
 
(Add the resource group to contain all of the resources.)
# scrgadm -a -g resource-group-1
 
(Add the logical hostname resource to the resource group.)
# scrgadm -a -L -g resource-group-1 -l schost-1 
 
(Add DNS application resources to the resource group.)
# scrgadm -a -j dns-1 -g resource-group-1 -t SUNW.dns \
-y Network_resources_used=schost-1 -y Port_list=53/udp \
-x DNS_mode=conf -x Confdir_list=/global/dns

(Bring the failover resource group online.)
# scswitch -Z -g resource-group-1

How to Configure SUNW.HAStoragePlus Resource Type

The SUNW.HAStoragePlus resource type was introduced in Sun Cluster 3.0 5/02. This new resource type performs the same functions as SUNW.HAStorage, and it has an additional feature to make a local file system highly available. Sun Cluster HA for DNS is not disk-intensive and is not scalable, and therefore, setting up the SUNW.HAStoragePlus resource type is optional.

See the SUNW.HAStoragePlus(5) man page and Relationship Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for background information. See Synchronizing the Startups Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for the procedure. (If you are using a Sun Cluster 3.0 version prior to 5/02, you must set up SUNW.HAStorage instead of SUNW.HAStoragePlus. See Synchronizing the Startups Between Resource Groups and Disk Device Groups in Sun Cluster Data Services Planning and Administration Guide for Solaris OS for the procedure.)

Verifying Data Service Installation and Configuration

To verify that you have correctly installed and configured Sun Cluster HA for DNS, run the following command after you complete the procedure How to Register and Configure Sun Cluster HA for DNS.


# nslookup logical-hostname logical-hostname

In this example, logical-hostname is the name of the network resource that you have configured to service DNS requests—for example, schost-1—as shown in the previous registration example. The output should indicate that the network resource that you specified answered (served) the query.

Tuning the Sun Cluster HA for DNS Fault Monitor

The Sun Cluster HA for DNS fault monitor is contained in the resource that represents DNS. You create this resource when you register and configure Sun Cluster HA for DNS. For more information, see Registering and Configuring Sun Cluster HA for DNS.

System properties and extension properties of this resource control the behavior of the fault monitor. The default values of these properties determine the preset behavior of the fault monitor. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the Sun Cluster HA for DNS fault monitor only if you need to modify this preset behavior.

For more information, see the following sections.

Operations by the Fault Monitor During a Probe

The fault monitor probe uses the nslookup command to query the health of DNS. Before the probe actually queries the DNS server, a check is made to confirm that network resources are configured in the same resource group as the DNS data service. If no network resources are configured, an error message is logged, and the probe exits with failure.

The result of the nslookup command can be either failure or success. If DNS successfully replied to the nslookup query, the probe returns to its infinite loop, waiting for the next probe time.

If the nslookup fails, the probe considers this scenario a failure of the DNS data service and records the failure in its history. The DNS probe considers every failure a complete failure.

Based on the success/failure history, a failure can cause a local restart or a data service failover. Tuning Fault Monitors for Sun Cluster Data Services in Sun Cluster Data Services Planning and Administration Guide for Solaris OS further describes this action.