This chapter describes the steps for installing and configuring Sun Cluster HA for Domain Name Service (DNS) on your Sun Cluster servers.
This chapter contains the following procedures:
You must configure Sun Cluster HA for DNS as a failover service. For general information on data services, resource groups, resources, and other related topics, see Chapter 1, Planning for Sun Cluster Data Services and the Sun Cluster 3.0 Concepts document.
Table 6-1 lists the sections that describe the installation and configuration tasks.
Table 6-1 Task Map: Installing and Configuring Sun Cluster HA for NFS
Task |
For Instructions, Go To ... |
---|---|
Install DNS | |
Install Sun Cluster HA for DNS packages | |
Configure and start Sun Cluster HA for DNS data service | |
Configure resource extension properties |
This section describes the steps for installing DNS and enabling it to run as the Sun Cluster HA for DNS data service.
The Sun Cluster HA for DNS data service uses the Internet Domain Name Server (in.named) software that is bundled with the Solaris 8 operating environment. For information on setting up DNS, see the in.named(1M) man page. The differences in a Sun Cluster configuration are as follows:
The DNS database is located on the cluster file system, not a local file system.
The DNS server is identified by a logical host name (relocatable IP address), not the name of a physical host.
Become superuser on a node in the cluster.
Decide on the logical host name that will provide DNS service.
This name should be a host name that is set up when you install the Sun Cluster software. For details on setting up host names, see the Sun Cluster 3.0 Installation Guide.
Ensure that the DNS executable (in.named) is in the directory /usr/sbin.
The DNS executable is bundled with the Solaris 8 operating environment and is located in /usr/sbin before you begin the installation.
Create a directory structure on the cluster file system to hold the DNS configuration and database files.
Create a dns directory and a named directory underneath it on a cluster file system, for example, /global/dns/named. For information on setting up cluster file systems, see the Sun Cluster 3.0 Installation Guide.
# mkdir -p /global/dns/named |
Place the configuration file for DNS, named.conf or named.boot, under /global/dns.
If DNS is already installed, you can copy the existing named.conf or named.boot to the /global/dns directory. Otherwise, create a named.conf file in this directory. For information on the types of entries to place in named.conf or named.boot, see the in.named(1M) man page. One of the two files, named.conf or named.boot, must exist. Both files can exist.
Place all the DNS database files (listed in named.conf) under /global/dns/named.
On all the clients of Sun Cluster HA for DNS, create an entry for the logical host name of the DNS service in the /etc/resolv.conf file.
On all the nodes, edit /etc/resolv.conf to contain the logical host name. 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 host name 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 logical host name the first entry after the domain name. DNS attempts to access the server by using the addresses in the order they are listed in resolv.conf.
If the /etc/resolv.conf is already present on the nodes, just add the first entry that shows the logical host name in the previous example. The order of the entries determines the order in which the DNS tries to access the server.
On all the cluster nodes, edit /etc/inet/hosts to create an entry for the logical host name of the DNS service.
In the following example:
Replace the IPaddress variable with your actual IP address, such as 129.146.87.53.
Replace the logicalhostname variable with your actual logical host name.
127.0.0.1 localhost IPaddress logicalhostname |
On all the cluster nodes, edit the /etc/nsswitch.conf file to add the string dns after cluster and files to the hosts entry.
For example:
hosts: cluster files dns |
Test DNS.
Be sure to stop in.named before proceeding. For example:
# cd /global/dns # /usr/sbin/in.named -c /global/dns/named.conf # nslookup phys-schost-1 # pkill -x /usr/sbin/in.named |
If you have already installed the Sun Cluster HA for DNS packages as part of your Sun Cluster installation, go to "Registering and Configuring Sun Cluster HA for DNS". Otherwise, go to "Installing Sun Cluster HA for DNS Packages".
The scinstall(1M) utility installs SUNWscdns, the Sun Cluster HA for DNS data service package, on a cluster. You can install specific data service packages from the Sun Cluster data service CD by using interactive scinstall, or you can install all data service packages on the CD by using the -s option to non-interactive scinstall. The preferred method is to use interactive scinstall, as described in the following procedure.
The data service packages might have been installed as part of your initial Sun Cluster installation. If not, use this procedure to install them now.
You need the Sun Cluster data service CD to complete this procedure. Perform this procedure on all cluster nodes that can run Sun Cluster HA for DNS.
Load the data service CD into the CD-ROM drive.
Run scinstall with no options.
This command starts scinstall in interactive mode.
Select the menu option: "Add support for new data service to this cluster node."
You can then load software for any data services that exist on the CD.
Exit scinstall and unload the CD from the drive.
See "Registering and Configuring Sun Cluster HA for DNS" to register Sun Cluster HA for DNS and configure the cluster for the data service.
To register and configure the Sun Cluster HA for DNS data service, use the Cluster Module of Sun Management Center or the following command-line procedure.
To perform this procedure, you need the following information about your configuration:
The name of the resource type for Sun Cluster HA for DNS. This name is SUNW.dns.
The names of the cluster nodes that master the data service.
The logical host name to be used by clients to access the data service. This IP address is normally set up when the cluster is installed. For details, see the section on setting up logical host names in the Sun Cluster 3.0 Installation Guide.
The path to the DNS configuration files, which you must install on a cluster file system. This path maps to the Config_dir resource property that is configured in this procedure.
Perform this procedure on any cluster member.
Become superuser on a node in the cluster.
Register the resource type for the data service.
# scrgadm -a -t SUNW.dns |
Adds the data service resource type.
Specifies the predefined resource type name for your data service.
Create a resource group to be used by logical host names and DNS resources.
You can optionally select the set of nodes on which the data service can run by using the -h option.
# scrgadm -a -g resource-group-name [-h nodelist] |
Specifies the name of the resource group. This name can be your choice but must be unique for the resource groups within the cluster.
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.
Use -h to specify the order of the node list. If all the nodes in the cluster are potential masters, you need not use the -h option.
Verify that all logical host names that you will be using have been added to your name service database.
This verification should have been done as part of the Sun Cluster installation. For details, see the planning chapter in the Sun Cluster 3.0 Installation Guide.
To avoid any failures because of name service lookup, verify that all logical host names are present in the server's and client's /etc/hosts file. Configure name service mapping in /etc/nsswitch.conf on the servers to first check the local files before trying to access NIS or NIS+.
Add logical host name resources to the resource group.
# scrgadm -a -L -g resource-group-name \ -l logical-hostname[,logical-hostname] [-j resource-name] \ [-n network-interface-id-list] |
Specifies the logical host name resources.
Specifies a comma-separated list of logical host names.
Specifies an optional network resource name. If you do not specify this name, it defaults to the first name specified after the -l option.
Specifies an optional comma-separated list that identifies the NAFO groups on each node. All the nodes in nodelist of the resource group must be represented in network-interface-list. If you do not specify this option, scrgadm attempts to discover a net adapter on the subnet identified by the hostname list for each node in nodelist.
Add a DNS application resource to the resource group.
# scrgadm -a -j [resource-name] -g resource-group-name \ -t SUNW.dns -y Network_resources_used=network-resource, ...\ -y Port_list=port-number/protocol -x DNS_mode=config-file-name \ -x Confdir_list=config-directory |
Specifies the DNS application resource name.
Specifies the name of the resource type to which this resource belongs. This entry is required.
Specifies a comma-separated list of network resources (logical host names) to be used by DNS. If you do not specify this property, it defaults to all the logical host names contained in the resource group.
Specifies a port number and the protocol to be used. If you do not specify this property, it defaults to 53/udp.
Specifies the configuration file to use, either conf(named.conf) or boot(named.boot). If you do not specify this property, it defaults to conf.
Specifies the location of the DNS configuration directory paths, which must be on the cluster file system. This is a required extension property for Sun Cluster HA for DNS.
Enable the resource and fault monitoring, move the resource group into a managed state, and bring it online.
# scswitch -Z -g resource-group-name |
Enables the resource and monitor, moves the resource group to the managed state, and brings it online.
Specifies the name of the resource group.
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 the Sun Cluster HA for DNS data service.
Cluster Information Node names: phys-schost-1, phys-schost-2 Logical hostname: schost-1 Resource group: lh-schost-1 (for all 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 resources.) # scrgadm -a -g lh-schost-1 (Add the logical host name resource to the resource group.) # scrgadm -a -L -g lh-schost-1 -l schost-1 (Add DNS application resources to the resource group.) # scrgadm -a -j dns-1 -g lh-schost-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 lh-schost-1 |
The SUNW.HAStorage resource type synchronizes actions between HA storage and data service. Because Sun Cluster HA for DNS is not disk intensive and not scalable, setting up the SUNW.HAStorage resource type is optional.
For details on the background, see the SUNW.HAStorage(5) man page and "Relationship Between Resource Groups and Disk Device Groups". For the procedure, see "How to Set Up SUNW.HAStorage Resource Type for New Resources".
To verify that Sun Cluster HA for DNS has been installed and configured correctly, run the following command after completing 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 you have configured to service DNS requests, for example, schost-1, as shown in the previous registration example. The output should indicate that the query was answered (served) by the logical host you specified.
The only required extension property for creating a DNS resource is Confdir_list.
See Appendix A, Standard Properties for details on all Sun Cluster properties.
Typically, you configure these properties by using the Cluster Module of Sun Management Center or the command line scrgadm -x parameter=value at the time you create the Sun Cluster HA for DNS server resource. You can also configure them later by using the procedures described in Chapter 9, Administering Data Service Resources.
Table 6-2 describes the Sun Cluster HA for DNS extension properties. Some extension properties can be updated dynamically and others only when the resource is created. The Tunable column indicates when the property can be updated.
Table 6-2 Sun Cluster HA for DNS Extension Properties
Name/Data Type |
Default |
Range |
Tunable |
Description |
---|---|---|---|---|
Confdir_list (string array) |
None |
None |
At creation |
A comma-separated list of path names, each of which points to the directory that contains the conf directory for a DNS instance |
DNS_mode |
conf |
None |
At creation |
The DNS configuration file to use, either conf (named.conf) or boot (named.boot) |
Monitor_retry_count (integer) |
4 |
0 - 2,147,483,641
-1 indicates an infinite number of retry attempts. |
Any time |
The number of times the fault monitor is to be restarted by the process monitor facility during the time window specified by the Monitor_retry_interval property. This property refers to restarts of the fault monitor itself rather than to the resource. Restarts of the resource are controlled by the system-defined properties Retry_interval and Retry_count. |
Monitor_retry_interval (integer) |
2 |
0 - 2,147,483,641
-1 indicates an infinite retry interval. |
Any time |
The time (in minutes) over which failures of the fault monitor are counted. If the number of times the fault monitor fails exceeds the value specified in the extension property Monitor_retry_count within this period, the fault monitor is not restarted by the process monitor facility. |
Probe_timeout (integer) |
30 |
0 - 2,147,483,641 |
Any time |
The time-out value (in seconds) used by the fault monitor to probe a DNS instance |