To perform this procedure, you need the following information about your configuration.
The name of the resource type for the Sun Cluster HA for DNS data service. This name is SUNW.dns.
The names of the cluster nodes that master the data service.
The logical hostname that clients use to access the data service. This IP address is normally set up when the cluster is installed. See the section on how to set up logical hostnames in the Sun Cluster 3.0 U1 Installation Guide for details.
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 logical hostnames 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 the nodes in the cluster are potential masters, you do not need to use the -h option.
Verify that all logical hostnames 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 3.0 U1 Installation Guide for details.
To avoid any failures because of name-service lookup, verify that all logical hostnames are present in the server's and client's /etc/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 logical-hostname resources to the resource group.
# scrgadm -a -L -g resource-group \ -l logical-hostname[,logical-hostname] [-j resource] \ [-n netiflist] |
Specifies the logical-hostname resources.
Specifies a comma-separated list of logical hostnames.
Specifies an optional network resource name. If you do not specify this name, the value 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 netiflist. If you do not specify this option, the scrgadm command attempts to discover a net adapter on the subnet that the hostname list identifies for each node in nodelist.
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) that DNS will use. If you do not specify this property, the value defaults to all the logical hostnames 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(named.conf) or boot(named.boot). If you do not specify this property, the value defaults to conf.
Specifies the location of the DNS configuration directory paths, which must be on the cluster file system. The Sun Cluster HA for DNS data service 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 the Sun Cluster HA for DNS data service 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: resource-group-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 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 |