Sun Java System Messaging Server 6.3 Administration Guide

ProcedureTo Configure a Two-node HA Asymmetric Messaging Server—Example

In this example we assume two node cluster with physical hostnames daisy.red.siroe.com and lavender.red.siroe.com with a logical hostname called budgie.

For daisy.red.siroe.com, binaries are installed at /opt/SUNWmsgsr and configuration data is installed at /var/opt/SUNWmsgsr.

The logical hostname budgie is assigned logical IP address. For example, the /etc/hosts file could look like this:


192.18.75.157 budgie.red.siroe.com budgie
  1. Install the Messaging Sun Cluster agents (SUNWscims) on both nodes.

  2. Create the file system.

    In this example, the file system /var/opt/SUNWmsgsr is mounted on a shared disk. This file system can either be a Cluster File System or local file systems (Failover File Systems).

  3. Configure the primary node (daisy).

    1. Add the required resource types on the primary node.

      This configures Sun Cluster to know about the resources types that will be used. To register Messaging Server and the HAStoragePlus resource, use the following commands:


      # scrgadm -a -t SUNW.HAStoragePlus
      # scrgadm -a -t SUNW.ims 
    2. Create a resource group for the Messaging Server instance called MS_RG_DAISY.


      # scrgadm -a -g MS_RG_daisy -h daisy,lavender
    3. Create a logical hostname resource called meadow, add it to the resource group and bring it on-line.


      # scrgadm -a -L -g MS_RG_DAISY -l meadow
      # scrgadm -c -j meadow -y R_description="LogicalHostname resource for meadow"
      # scswitch -Z -g MS_RG_DAISY
    4. Create an HAStoragePlus resource called ms-hasp-daisy with the file systems created earlier.


      # scrgadm -a -j ms-hasp-daisy -g MS_RG_DAISY -t SUNW.HAStoragePlus -x 
      FileSystemMountPoints ="/var/opt/SUNWmsgsr" -x 
      AffinityOn=TRUE
    5. Enable the HAStoragePlus resource:


      # scswitch -e -j ms-hasp-daisy
  4. Install and configure the Messaging Server on the primary node (see 1.3 Creating the Initial Messaging Server Runtime Configuration).

    The initial runtime configuration program asks for the Fully Qualified Host Name. Enter the logical hostname meadow.red.siroe.com. The program also asks to specify a configuration directory. Enter /var/opt/SUNWmsgsr.

  5. Run the ha_ip_config script on the primary node and provide the logical IP address.

    This is only run on the primary node and not on the secondary node. The ha_ip_config script is located under the installation directory under the sbin directory. For Example:


    # /opt/SUNWmsgsr/sbin/ha_ip_config
    
    Please specify the IP address assigned to the HA logical host name. 
    Use dotted decimal form, a.b.c.d
    
    Logical IP address: 192.18.75.155 
    # This value is the logical IP address of the logical hostname. Refer 
    # to the /etc/hosts file.
    Please specify the path to the top level directory in which iMS is
    installed.
    
    iMS server root: /opt/SUNWmsgsr
    
    . . . 
    
    Updating the file /opt/SUNWmsgsr/config/dispatcher.cnf
    Updating the file /opt/SUNWmsgsr/config/job_controller.cnf
    Setting the service.listenaddr configutil parameter
    Setting the local.snmp.listenaddr configutil parameter
    Setting the service.http.smtphost configutil parameter
    Setting the local.watcher.enable configutil parameter
    Setting the local.autorestart configutil parameter
    Setting the metermaid.config.bindaddr configutil parameters
    Setting the metermaid.config.serveraddr configutil parameters
    Setting the local.ens.port parameter
    Configuration successfully updated
  6. Modify the imta.cnf file and replace all occurrences of the physical hostname (daisy) with the HA logical host name (meadow).

  7. Fail over the resource group to the secondary node (lavender).

    After failing over, you will then configure the secondary node (lavender).


    # scswitch -z -g MS_RG_LAVENDER -h daisy
  8. On the secondary node (lavender) install Messaging Server and run the useconfig utility. See 3.3.3 Using the useconfig Utility

    You do not have to run the initial runtime configuration program (configure).

    In the following example, /var/opt/SUNWmsgsr is the shared configuration directory.


    # useconfig /var/opt/SUNWmsgsr/setup/configure_20061201124116
    cp /var/opt/SUNWmsgsr/setup/configure_20061201124116/Devsetup.properties
    /opt/SUNWmsgsr/lib/config-templates/Devsetup.properties
    /usr/sbin/groupadd mail
    /usr/sbin/useradd -g mail -d / mailsrv
    /usr/sbin/usermod -G mail mailsrv
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e "s:<msg·RootPath>:/opt/SUNWmsgsr:" 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt.template > 
    /opt/SUNWmsgsr/lib/config-templates/devtypes.txt
    sed -e "s/local.serveruid/mailsrv/" -e "s/local.serveruid/mail/" -e 
    "s:<msg·RootPath>:/opt/SUNWmsgsr:" 
    /opt//SUNWmsgsr/lib/config-templates/config.ins.template > 
    /opt/SUNWmsgsr/lib/config-templates/config.ins
    /opt/SUNWmsgsr/lib/devinstall -l sepadmsvr:pkgcfg:config -v -m -i 
    /opt/SUNWmsgsr/lib/config-templates/config.ins 
    /opt/SUNWmsgsr/lib/config-templates 
    /opt/SUNWmsgsr/lib/jars /opt/SUNWmsgsr/lib
    devinstall returned 0
    crle -c /var/ld/ld.config -s
     /usr/lib/secure:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib:/opt/SUNWmsgsr/lib 
    -s /opt/SUNWmsgsr/lib
    See /opt/SUNWmsgsr/install/useconfiglog_20061211155037 for more details
  9. Create the HA Messaging Server Resource and enable it.


    # scrgadm -a -j ms-rs-daisy -t SUNW.ims -g MS_RG_DAISY -x IMS_serverroot 
    =/opt/SUNWmsgsr -y Resource_dependencies=meadow,ms-hasp-daisy
    # scswitch -e -j mail-rs-daisy

    The above command creates an HAMessaging Server resource named ms-rs-daisy for the Messaging Server, which is installed on /opt/SUNWmsgsr. This HAMessaging Server resource is dependent upon the HA disk resource, that is, the file system created earlier as well as the HA logical host name meadow.

  10. Verify that everything is working.

    Failover the Messaging Server resource back to the primary node.


     # scswitch -z -g MAIL-RG -h daisy