Creating a high availability group

You can create a high availability (HA) group by using the crthagrp command on the command line.

Before you begin

Before you can create an HA group, you must configure the appliances that you want to group. For more information, see Configuring the hardware for high availability

About this task

The HA group controls the availability of the queue managers within the group, determining where the queue managers run. You must create the HA group before you can create HA queue managers to run in the group. After you create the HA group, you can view the status of the group. You can also view which queue managers are in the HA group.

To create an HA group and generate unique keys for communication between the appliances in the group, you must enter commands on both appliances in the group.

Note: The messaging users and groups in authentication records in an HA queue manager must be available on all appliances in the HA group. Because the users and groups in the internal user store are not automatically replicated between the appliances, it is recommended that you use an external LDAP repository for HA queue managers.

Procedure

  1. Enter the IBM MQ administration mode on both appliances by entering the following command:

    mqcli

  2. On the first appliance (machine A), enter the following command:
    
    prepareha -s SecretText -a IPAddressOfMachineB [-t timeout]
    
    where:
    -s SecretText
    Specifies a string that is used to generate a short-lived password. The password is used to set up the unique key for the two appliances.
    -a IPAddressOfMachineB
    Specifies the IP address of the HA primary interface on the second appliance in the group. You must specify the IP address using ip v4 dotted decimal notation (for example, 192.0.2.8).
    -t timeout
    Optionally specifies a timeout in seconds. The appliance waits silently for this period for the second appliance to contact it. If you do not specify a timeout, the appliance waits for ten minutes.
  3. On the second appliance (machine B), enter the following command:
    
    crthagrp -s SecretText -a IPAddressOfMachineA
    
    where:
    -s SecretText
    Specifies the same string that was specified in the prepareha command on machine A.
    -a IPAddressOfMachineA
    Specifies the IP address of the HA primary interface on the first appliance in the group. You must specify the IP address using ip v4 dotted decimal notation (for example, 192.0.2.8).

Example

The following example shows the creation of an HA group for appliances appl1 and appl2 where a new, unique key is generated for communication between the appliances. The HA group primary interface of appl2 has the IP address 192.0.2.8; the HA group primary interface of appl1 has the IP address 192.0.2.7.

The following command is run from appl1:


prepareha -s AGEW1823510HH -a 192.0.2.8

The following command is run from appl2:


crthagrp -s AGEW1823510HH -a 192.0.2.7

What to do next

After the HA group is created, you can create HA queue managers that are controlled by the HA group. For more information, see Creating a high availability queue manager.