This procedure describes how to use the scrgadm(1M) command to register and configure Sun Cluster HA for DNS.
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.
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 network resource that clients use to access the data service. You normally set up this IP address when you install the cluster. See the Sun Cluster Concepts Guide for Solaris OS document for details on network resources.
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 cluster member.
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 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]
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 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.
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.
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+.
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]
Specifies a comma-separated list of network resources (logical hostname or shared address).
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.
Sun Cluster does not currently support using the adapter name for netif.
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
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 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.
Specifies a port number and the protocol to be used. If you do not specify this property, the value defaults to 53/udp.
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.
Specifies the DNS configuration directory, which must be on the cluster file system. Sun Cluster HA for DNS requires this extension property.
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
Enables the resource and monitor, moves the resource group to the managed state, and brings the resource group 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 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
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.)