Sun Java System Messaging Server 6 2005Q4 Administration Guide

Sun Cluster Agent Installation

This section describes how to install and configure the Messaging Server as a Sun Cluster Highly Available (HA) Data Service. These installation instructions apply to Sun Cluster 3.1. The following topics are covered in this section:

See also Sun Cluster 3.1 Documentation

Note that Veritas File System (VxFS) is supported with Sun Cluster 3.1.

Sun Cluster Requirements

This section presumes the following:

About HAStoragePlus

It is highly recommended that you use the HAStoragePlus resource type to make locally mounted file systems highly available within a Sun Cluster environment. Any file system resident on a Sun Cluster global device group can be used with HAStoragePlus. Unlike a globally mounted file system like HAStorage, HAStoragePlus is available only on one cluster node at any given point of time. These locally mounted file systems can only be used in failover mode and in failover resource groups. HAStoragePlus offers FFS (failover file system), in contrast to HAStorage’s GFS (global file system).

HAStoragePlus has a number of benefits:

For more information on HAStoragePlus, read the Sun Cluster 3.1 Data Service Planning and Administration Guide at http://docs.sun.com.

Configuring Messaging Server with Sun Cluster and HA StoragePlus

This section describes how to configure HA support and HA StoragePlus for the current version of Messaging Server for Sun Cluster 3.1 through a simple example.

After configuring HA, be sure to review Binding IP Addresses on a Server for additional steps associated with HA support.

The following example assumes that the messaging server has been configured with a HA logical host name and IP address. The physical host names is assumed to be mail-1 and mail-2, with an HA logical host name of budgie. Figure 3–3 depicts the nested dependencies of the different HA resources you will create in configuring Messaging Server HA support.

Figure 3–3 A Simple Messaging Server HA configuration

This image depicts a simple Messaging Server HA configuration.

ProcedureTo Configure HA support and HA StoragePlus

Steps
  1. Become the superuser and open a console.

    All of the following Sun Cluster commands require that you have logged in as superuser. You will also want to have a console or window for viewing messages output to /dev/console.

  2. Add required resource types.

    Configure Sun Cluster to know about the resources types we will be using. This is done with the scrgadm -a -t command:


    # scrgadm -a -t SUNW.HAStoragePlus
    # scrgadm -a -t SUNW.ims
  3. Create a resource group for the Messaging Server.

    If you have not done so already, create a resource group and make it visible on the cluster nodes which will run the Messaging Server. The following command creates a resource group named MAIL-RG, making it visible on the cluster nodes mail-1 and mail-2:

    # scrgadm -a -g MAIL-RG -h mail-1,mail-2

    You may, of course, use whatever name you wish for the resource group.

  4. Create an HA logical host name resource and start resource group.

    If you have not done so already, create and enable a resource for the HA logical host name, placing it in the resource group. The following command does so using the logical host name budgie. Since the -j switch is omitted, the name of the resource created will also be budgie.


    # scrgadm -a -L -g MAIL-RG -l budgie
    # scswitch -Z -g MAIL-RG
  5. Create an HAStoragePlus resource.

    Next, you need to create an HAStoragePlus resource type for the file systems on which Messaging Server is dependent. The following command creates an HAStoragePlus resource named disk-rs and the file system disk_sys_mount_point is placed under its control:


    # scrgadm -a -j disk-rs -g MAIL-RG \
    -t SUNW.HAStoragePlus \
    -x ServicePaths=disk_sys_mount_point-1, disk_sys_mount_point-2
    

    The comma-separated list of ServicePaths are the mount points of the cluster file systems on which Messaging Server is dependent. In the above example, only two mount points, disk_sys_mount_point-1 and disk_sys_mount_point-2, are specified. If one of the servers has additional file systems on which it is dependent, then you can create an additional HA storage resource and in Step 10 to indicate that additional dependency.

  6. Install and configure the Administration Server.

    See the Sun Java Enterprise System 2005Q4 Installation Guide for instructions.

    When specifying the fully qualified domain name, use the HA logical host name created in Step 4.

  7. Install and configure the Messaging Server. See Creating the Initial Messaging Server Runtime Configuration

    1. In the Initial Runtime Configuration, you are asked to specify a configuration directory in Creating the Initial Messaging Server Runtime Configuration. Be sure to use the shared disk directory path of your HAStoragePlus resource.

    2. Run the following command to enable the watcher process under Sun Cluster:


      configutil -o local.autorestart -v 1

      For more information on the watcher process, refer to the Automatic Restart of Failed or Unresponsive Services

  8. Run the ha_ip_config script to set service.listenaddr and service.http.smtphost and to configure the dispatcher.cnf and job_controller.cnf files for high availability. The script ensures that the logical IP address is set for these parameters and files, rather than the physical IP address. It also enables the watcher process (sets local.watcher.enable to 1), and auto restart process (local.auto.restart to 1).

    For instructions on running the script, see Binding IP Addresses on a Server.

    The ha_ip_config script should only be run once on the machine with the shared disk (for configuration and data).

  9. Modify the imta.cnf file and replace all occurrences of the physical hostname with the logical name of the cluster.

  10. Create an HA Messaging Server resource.

    It’s now time to create the HA Messaging Server resource and add it to the resource group. This resource is dependent upon the HA logical host name and HA disk resource.

    In creating the HA Messaging Server resource, we need to indicate the path to the Messaging Server top-level directory—the msg_svr_base path. These are done with the IMS_serverroot extension properties as shown in the following command.


    # scrgadm -a -j mail-rs -t SUNW.ims -g MAIL-RG \
          -x IMS_serverroot=msg_svr_base \
          -y Resource_dependencies=disk-rs,budgie

    The above command, creates an HA Messaging Server resource named mail-rs for the Messaging Server which is installed on IMS_serverroot in the msg_svr_base directory. The HA Messaging Server resource is dependent upon the HA disk resource disk-rs as well as the HA logical host name budgie.

    If the Messaging Server has additional file system dependencies, then you can create an additional HA storage resource for those file systems. Be sure to include that additional HA storage resource name in the Resource_dependencies option of the above command.

  11. Remove the term global from the /etc/vfstab file. At bootup, /etc/vbstab must be set to ”no..’ For more information, refer to your Sun Cluster 3.1 documentation.

    Before the vfstab file is enabled with HAStoragePlus, you might first umount the file systems that are currently global file systems. You can then enable the vfstab file with HAStoragePlus and remount the file systems.

  12. Enable the Messaging Server resource.

    It’s now time to activate the HA Messaging Server resource, thereby bringing the messaging server online. To do this, use the command

    # scswitch -e -j mail-rs

    The above command enables the mail-rs resource of the MAIL-RG resource group. Since the MAIL-RG resource was previously brought online, the above command also brings mail-rs online.

  13. Verify that things are working.

    Use the scstat command to see if the MAIL-RG resource group is online. You may want to look at the output directed to the console device for any diagnostic information. Also look in the syslog file, /var/adm/messages.

  14. Fail the resource group over to another cluster node in order to make sure failover properly works.

    Manually fail the resource group over to another cluster node. (Be sure you have superuser privileges on the node to which you failover.)

    Use the scstat command to see what node the resource group is currently running on (“online” on). For instance, if it is online on mail-1, then fail it over to mail-2 with the command:

    # scswitch -z -g MAIL-RG -h mail-2

    If you are upgrading your first node, you will install through the Java Enterprise System installer and then configure Messaging Server. You will then failover to the second node where you will install the Messaging Server package through the Java Enterprise System installer, but you will not have to run the Initial Runtime Configuration Program (configure) again. Instead, you can use the useconfig utility.

Binding IP Addresses on a Server

If you are using the Symmetric or N + 1 high availability models, there are some additional things you should be aware of during configuration in order to prepare the Sun Cluster Server for Messaging Server.

Messaging Server running on a server requires that the correct IP address binds it. This is required for proper configuration of Messaging in an HA environment.

Part of configuring Messaging Server for HA involves configuring the interface address on which the Messaging Servers bind and listen for connections. By default, the servers bind to all available interface addresses. However, in an HA environment, you want the servers to bind specifically to the interface address associated with an HA logical host name.

A script is therefore provided to configure the interface address used by the servers belonging to a given Messaging Server instance. Note that the script identifies the interface address by means of the IP address which you have or will be associating with the HA logical host name used by the servers.

The script effects the configuration changes by modifying or creating the following configuration files. For the file

msg_svr_base/config/dispatcher.cnf

it adds or changes INTERFACE_ADDRESS option for the SMTP and SMTP Submit servers. For the file

msg_svr_base/config/job_controller.cnf

it adds or changes the INTERFACE_ADDRESS option for the Job Controller.

Finally it sets the configutil service.listenaddr and service.http.smtphost parameters used by the POP, IMAP, and Messenger Express HTTP servers.

Note that the original configuration files, if any, are renamed to *.pre-ha.

Run the script as follows:

ProcedureTo Bind IP Addresses on a Server

Steps
  1. Become superuser.

  2. Execute msg_svr_base/sbin/ha_ip_config

  3. The script presents the questions described below. The script may be aborted by typing control-d in response to any of the questions. Default answers to the questions will appear within square brackets, [ ]. To accept the default answer, simply press the RETURN key.

    1. Logical IP address: Specify the IP address assigned to the logical host name which Messaging Server will be using. The IP address must be specified in dotted decimal form, for example, 123.456.78.90.

      The logical IP address is automatically set in the configutil parameter service.http.smtphost which allows you to see which machine is running your messaging system in a cluster. For example, if you are using Messenger Express, your server will be able to determine from which mail host to send outgoing mail.

    2. Messaging Server Base ( msg_svr_base): Specify the absolute path to the top-level directory in which Messaging Server is installed.

    3. Do you wish to change any of the above choices: answer “no” to accept your answers and effect the configuration change. Answer “yes” if you wish to alter your answers.


      Note –

      In addition, the ha_ip_config script automatically enables two new processes watcher and msprobe with the following parameters: local.autorestart and local.watcher.enable. These new parameters help to monitor the health of the messaging server. Process failures and unresponsive services result in log messages indicating specific failures. The cluster agents now monitor the watcher process and failover whenever it exits. Note that the parameters must be enabled in order for Sun Cluster to function properly.

      For more information on the watcher and msprobe processes, see Automatic Restart of Failed or Unresponsive Services