Sun Cluster 3.0 Data Services Installation and Configuration Guide

Registering and Configuring Sun Cluster HA for DNS

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.

How to Register and Configure Sun Cluster HA for DNS

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

Perform this procedure on any cluster member.

  1. Become superuser on a node in the cluster.

  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 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]
    -g resource-group-name

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


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


    Note -

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


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

    Specifies the logical host name resources.

    -l logical-hostname

    Specifies a comma-separated list of logical host names.

    -j resource-name

    Specifies an optional network resource name. If you do not specify this name, it defaults to the first name specified after the -l option.

    -n network-interface-id-list

    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.

  6. 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
    
    -j resource-name

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

    -y Port_list=port-number/protocol

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

    -x DNS_mode=config-file-name

    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.

    -x Confdir_list=config-directory

    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.

  7. Enable the resource and fault monitoring, move the resource group into a managed state, and bring it online.


    # scswitch -Z -g resource-group-name
    
    -Z

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

    -g resource-group-name

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

How to Configure SUNW.HAStorage Resource Type

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