Sun Cluster Data Service for Domain Name Service (DNS) Guide for Solaris OS

Installing and Configuring Sun Cluster HA for Domain Name Service (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 procedures.

You must configure Sun Cluster HA for DNS as a failover data service. See “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 SunPlex Manager to install and configure this data service. See the SunPlex Manager online help for details.


Installing and Configuring Sun Cluster HA for DNS

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

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

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

Configure resource extension properties 

Configuring Sun Cluster HA for DNS Extension Properties

View fault monitor information 

Operation of 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.

How to Install DNS

This section describes how to install the DNS.

  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
    

Where to Go From Here

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 Domain Name Service (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 Domain Name Service (DNS) packages. To complete this procedure, you need the Sun Java Enterprise System Accessory CD Volume 3.

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 Domain Name Service (DNS) packages by using one of the following installation tools:


Note –

The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.


How 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.

  1. On the cluster node where you are installing the Sun Cluster HA for Domain Name Service (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. Load the Sun Java Enterprise System Accessory CD Volume 3 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 Domain Name Service (DNS) component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for Domain Name Service (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 instructions on the screen to install the Sun Cluster HA for Domain Name Service (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. Unload the Sun Java Enterprise System Accessory CD Volume 3 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
      

Where to Go From Here

See Registering and Configuring Sun Cluster HA for DNS to register Sun Cluster HA for DNS and to configure the cluster for the data service.

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

This section describes how to install Sun Cluster HA for DNS packages by using the scinstall utility.

  1. Load the Sun Java Enterprise System Accessory CD Volume 3 into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Choose 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 Java Enterprise System Accessory CD Volume 3.

    The utility refers to 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.

Where to Go From Here

See Registering and Configuring Sun Cluster HA for DNS to register Sun Cluster HA for DNS and to configure the cluster for the data service.

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.


How 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.


  1. Become superuser on a cluster member.

  2. 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.

  3. 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.


  4. 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+.


  5. 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.


  6. 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.

  7. 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 – 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)

(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 synchronizes actions between HA storage and Sun Cluster HA for NFS. SUNW.HAStoragePlus also 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.

Configuring Sun Cluster HA for DNS Extension Properties

The only required extension property for creating a DNS resource is the Confdir_list property. Typically, you use the command line scrgadm -x parameter=value to configure extension properties when you create the DNS resource. You can also use the procedures in “Administering Data Service Resources” in Sun Cluster Data Services Planning and Administration Guide for Solaris OS to configure them later.

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

Table 1–2 describes the Sun Cluster HA for DNS extension properties. You can update some extension properties dynamically. You can update others, however, only when you create the resource. The Tunable entries indicate when you can update the property.

Table 1–2 Sun Cluster HA for DNS Extension Properties

Name/Data Type 

Description 

Confdir_list (string array)

The DNS configuration directory, which contains the configuration file for a DNS instance. 

Default: None

Range: None

Tunable: At creation

DNS_mode

The DNS configuration file to use, either conf (which specifies the file named.conf) or boot (which specifies the file named.boot).

Default: conf

Range: None

Tunable: At creation

Monitor_retry_count (integer)

The number of times that the process monitor facility (PMF) restarts the fault monitor during the time window that the Monitor_retry_interval property specifies. This property refers to restarts of the fault monitor itself rather than to the resource. The system-defined properties Retry_interval and Retry_count control restarts of the resource.

Default: 4

Range:02,147,483,641

–1 indicates an infinite number of retry attempts.

Tunable: Any time

Monitor_retry_interval (integer)

The time (in minutes) over which failures of the fault monitor are counted. If the number of times that the fault monitor fails exceeds the value that is specified in the extension property Monitor_retry_count within this period, the PMF does not restart the fault monitor.

Default: 2

Range: 02,147,483,641

–1 indicates an infinite retry interval.

Tunable: Any time

Probe_timeout (integer)

The time-out value (in seconds) that the fault monitor uses to probe a DNS instance. 

Default: 120

Range: 02,147,483,641

Tunable: Any time

Operation of Sun Cluster HA for DNS Fault Monitor

The 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 probe executes the following steps.

  1. Run the nslookup command using the time-out value that the resource property Probe_timeout specifies.

    The result of this 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.

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