Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Messaging Server 6 2004Q2 Administration Guide 

Chapter 3
Configuring High Availability

This section provides the information you need to configure the Veritas Cluster Server or Sun Cluster high availability clustering software and prepare it for use with the Messaging Server. It is assumed you have read the chapter on High Availability in the Messaging Server Deployment Planning Guide ( as well as the appropriate Veritas or Sun Cluster Server documentation for detailed planning, installation instructions, required patches, and other information as needed.

Table 3-1 lists the versions of Sun Cluster Server and Veritas Cluster Server that are currently supported with Messaging Server:

Table 3-1  Supported Versions of Sun Cluster Server and Veritas Cluster Server


Supported Versions

Sun Cluster Server

Sun Cluster 3.1

Veritas Cluster Server

Veritas Cluster Server 1.3, Veritas Cluster Server 2.0, and Veritas Cluster Server 3.5

This chapter consists of the following sections:

Cluster Agent Installation

A cluster agent is a Messaging Server program that runs under the cluster framework.

The Sun Cluster Messaging Server agent (SUNWscims) is installed when you select Sun Cluster 3.1 through the Java Enterprise System installer. The Veritas Cluster Messaging Server agent (SUNWmsgvc) can be found in the Messaging Server Product subdirectory on the Java Enterprise System CD, Solaris_sparc/Product/messaging_svr/Packages/SUNWmsgvc. (Note that you must use the pkgadd(1M) command to install the VCS cluster agent.)

Some items of note regarding the Messaging Server and high availability (applies to both Veritas Cluster, and Sun Cluster) installation:

Using the useconfig utility

The useconfig utility allows you to share a single configuration between multiple nodes in an HA environment. This utility is not meant to upgrade or update an existing configuration.

For example, 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.

To enable the utility, run useconfig utility to point to your previous Messaging Server configuration.

msg_svr_base/sbin/useconfig install/configure_YYYYMMDDHHMMSS

where configure_YYYYMMDDHHMMSS is your previous configuration settings file.

On a brand new node, you can find the configure_YYYYMMDDHHMMSS in the msg_svr_base/data/setup directory on the shared disk.

The following sections on Veritas Cluster Server Agent Installation and Sun Cluster Agent Installation describe when you can use the useconfig utility.

Veritas Cluster Server Agent Installation

Messaging Server can be configured with Veritas Cluster Server 1.3, 2.0, and 3.5. The instructions in this section only cover Veritas Cluster 3.5; for Veritas 1.3 and 2.0, review the Messaging Server 5.2 Installation Guide.

Be sure to review the Veritas Cluster Server documentation prior to following these procedures.


  • Veritas Volume Manager (VxVM) has a cluster feature that requires a separate license. This feature provides a global view of the file systems on shared storage, similar to the Sun Cluster 3.0 global file system. See the Veritas Cluster Server documentation for more information.
  • FsckOpt was optional in pre-3.5 Veritas releases. However, it is required for configuring the Mount resource. FsckOpt must include a -y or -n, otherwise the resource will not come online.
  • Veritas Cluster Server 2.0 Explorer cannot be used to manage Veritas Cluster Server 3.5.

After installing Messaging Server through the Java Enterprise System installer and configuring HA, be sure to review Binding IP Addresses on a Server for additional steps associated with configuring HA support.

Veritas Cluster Server Requirements

VCS 3.5 Installation and Configuration Notes

The following instructions describe how to configure Messaging Server as an HA service, by using Veritas Cluster Server 3.5.

The default configuration file sets up a resource group called ClusterService that launches the VCSweb application. This group includes network logical host IP resources like csgnic and webip. In addition, the ntfr resource is created for event notification.

  1. Launch Cluster Explorer from one of the nodes.
  2. Note that these Veritas Cluster Server instructions assume you are using the graphical user interface to configure Messaging Server as an HA service.

    To launch Cluster Explorer, run the following command:

    # /opt/VRTSvcs/bin/hagui

    The VRTScscm package must be installed in order to use the GUI.

  3. Add s1ms_dg disk group resource of type DiskGroup and enable it.
  4. Add s1ms_mt mount resource of type Mount.
    1. Unlike in Veritas Cluster Server 2.0, you must add -y (or -n) to FsckOpt. Null options cause Mount to hang. See the Solaris Man page for more information on fsck_vxfs.
    2. Be sure to click the Link button to enable linking resources, if they are not already enabled.
  5. Create a link between s1ms_mt and s1ms_dg. Enable the resource s1ms_mt.
  6. Figure depicts the dependency tree:

    Figure 3-1  Veritas Cluster Server Dependency Tree
    VCS dependency tree.  Link created between s1ms_mt and s1ms_dg.

  7. Run the Java Enterprise System installer, selecting Administration Server and Messaging Server.
    1. During Administration Server configuration, be sure to specify the logical host name when asked to provide a hostname.
    2. Run the Messaging Server Initial Runtime Configuration from the primary node (for example, Node_A) to install Messaging Server.
    3. Install the Veritas Cluster Server agent package, SUNWmsgvc, (located in the Messaging Server Product subdirectory on the Java Enterprise System CD) by using the pkgadd(1M) command.
    4. Messaging Server and the Veritas agent are now installed on Node_A.

  8. Switch to the backup node (for example, Node_B).
  9. Run the Java Enterprise System installer to install Messaging Server on the backup node (Node_B).
  10. After installing Messaging Server, you can use the useconfig utility to obviate the need for creating an additional initial runtime configuration on the backup node (Node_B). The useconfig utility allows you to share a single configuration between multiple nodes in an HA environment. This utility is not meant to upgrade or update an existing configuration. See Using the useconfig utility.
  11. The Veritas agent is now installed on Node_B.

  12. From the Cluster Explorer, Select Import Types... from the File menu which will display a file selection box.
  13. Import the type from the /etc/VRTSvcs/conf/config directory. Import this type file. Note that you need to be on a cluster node to find this file.
  14. Now create a resource of type MsgSrv (for example, Mail). This resource requires the logical host name property to be set.
  15. The Mail resource depends on s1ms_mt and webip. Create links between the resources as shown in the following dependency tree:
  16. Figure 3-2  Veritas Cluster Dependency Tree
    VCS dependency tree:  Links are created between Mail and webip and s1ms_mt.

    1. Enable all resources and bring Mail online.
    2. All servers should be started.
  17. Switch over to Node_A and check if the High Availability configuration is working.
  18. Change the group attribute OnlineRetryLimit from 3 to 0, otherwise the failed-over service might restart on the same node.

MsgSrv Attributes

This section describes MsgSrv additional attributes that govern the behavior of the mail resource. To configure Messaging Server with Veritas Cluster Server, see Table 3-2.

Table 3-2  Veritas Cluster Server Attributes 




If unset (=0), monitor (probe) time outs are not treated as resource fault. Recommend setting this to 2. If the monitor times out twice, the resource will be restarted or failed over.


Time interval over which faults/restarts are counted. Previous history is erased if the service remains online for this duration. Suggest 600 seconds.


Number of times the monitor should return OFFLINE for declaring the resource FAULTED. Recommend leaving this value at ‘0’ (default).

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:

Documentation for Sun Cluster 3.1 can be found at:

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.

Configuring Messaging Server with Sun Cluster and HA StoragePlus

This section describes how to configure HA support and HA StoragePlus for Sun ONE 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 Sun ONE Messaging Server HA configuration

A Simple Messaging Server HA configuration

  1. Become the superuser and open a console.
  2. 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.

  3. Add required resource types.
  4. 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

  5. Create a resource group for the Messaging Server.
  6. 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.

  7. Create an HA logical host name resource and start resource group.
  8. 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

  9. Create an HAStoragePlus resource.
  10. 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 9 to indicate that additional dependency.

  11. Install and configure the Administration Server (See the Sun Java Enterprise System 2004Q2 Installation Guide).
  12. When specifying the fully qualified domain name, use the HA logical host name created in Step 4.

  13. Install and configure the Messaging Server. See To Create the Initial Messaging Server Runtime Configuration.
    1. In the Initial Runtime Configuration, you are asked to specify a configuration directory in To Create 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

    3. For more information on the watcher process, refer to the Sun Java System Messaging Server Administration Guide.

  14. 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 will ensure that the logical IP address is set for these parameters and files, rather than the physical IP address.
  15. 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).

  16. Create an HA Messaging Server resource.
  17. 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.

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

  20. Enable the Messaging Server resource.
  21. 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.

  22. Verify that things are working.
  23. 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.

  24. Fail the resource group over to another cluster node in order to make sure failover properly works.
  25. 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

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


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


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:

  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 the Messaging Server will be using. The IP address must be specified in dotted decimal form, for example, 123.456.78.90.
    2. 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.

    3. Messaging Server Base (msg_svr_base): Specify the absolute path to the top-level directory in which Messaging Server is installed.
    4. 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.


      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.

Unconfiguring High Availability

This section describes how to unconfigure high availability. To uninstall high availability, follow the instructions in your Veritas or Sun Cluster documentation.

The High Availability unconfiguration instructions differ depending on whether you are removing Veritas Cluster Server or Sun Cluster.

The following topics are covered in this section:

Unconfiguring Veritas Cluster Server

To unconfigure the high availability components for Veritas Cluster Server:

  1. Bring the iMS5 service group offline and disable its resources.
  2. Remove the dependencies between the mail resource, the logical_IP resource, and the mountshared resource.
  3. Bring the iMS5 service group back online so the sharedg resource is available.
  4. Delete all of the Veritas Cluster Server resources created during installation.
  5. Stop the Veritas Cluster Server and remove following files on both nodes:
  6. /etc/VRTSvcs/conf/config/

  7. Remove the Messaging Server entries from the /etc/VRTSvcs/conf/config/ file on both nodes.
  8. Remove the /opt/VRTSvcs/bin/MsgSrv/ directory from both nodes.

Unconfiguring Messaging Server HA Support for Sun Cluster 3.x

This section describes how to undo the HA configuration for Sun Cluster. This section assumes the simple example configuration (described in the Sun Cluster Agent Installation). For other configurations, the specific commands (for example, Step 3) may be different but will otherwise follow the same logical order.

  1. Become the superuser.
  2. All of the following Sun Cluster commands require that you be running as user superuser.

  3. Bring the resource group offline.
  4. To shut down all of the resources in the resource group, issue the command

    # scswitch -F -g MAIL-RG

    This shuts down all resources within the resource group (for example, the Messaging Server and the HA logical host name).

  5. Disable the individual resources.
  6. Next, remove the resources one-by-one from the resource group with the commands:

    # scswitch -n -j mail-rs
    # scswitch -n -j disk-rs
    # scswitch -n -j budgie

  7. Remove the individual resources from the resource group.
  8. Once the resources have been disabled, you may remove them one-by-one from the resource group with the commands:

    # scrgadm -r -j mail-rs
    # scrgadm -r -j disk-rs
    # scrgadm -r -j budgie

  9. Remove the resource group.
  10. Once the all the resources have been removed from the resource group, the resource group itself may be removed with the command:

    # scrgadm -r -g MAIL-RG

  11. Remove the resource types (optional).
  12. Should you need to remove the resource types from the cluster, issue the commands:

    # scrgadm -r -t SUNW.ims
    # scrgadm -r -t SUNW.HAStoragePlus

Previous      Contents      Index      Next     

Copyright 2004 Sun Microsystems, Inc. All rights reserved.