Sun Java System Messaging Server 6 2005Q4 Administration Guide

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.