Creating a high availability queue manager by using the command line

You can create a high availability (HA) queue manager by using the crtmqm command on the command line. After the queue manager is created, it is automatically started under the control of the HA group.

Before you begin

Before you can create an HA queue manager on an appliance, you must add the appliance to an HA group. For more information, see Creating a high availability group by using the command line.

The auto-config and auto-cluster files for a queue manager that is part of a uniform cluster must be copied to the mqbackup: directory for appliances in the high availability group. Any changes that you subsequently make to these files must be replicated manually to appliances in the group (see Configuring uniform clusters - appliance-specific considerations).

About this task

You create a queue manager and specify that it is part of an HA group. Each HA queue manager that you create uses a unique port on the HA replication interface. The first HA queue manager created uses port 7789, the second 7790, and so on.

Procedure

  1. Enter the IBM® MQ administration mode by entering the following command:

    mqcli

  2. Create the HA queue manager by using one of the following commands:
    • Create the HA queue manager with the default file system size of 64 GB by entering the following command:

      crtmqm -sx QMgrName

      Where:
      QMgrName
      Specifies the name of the HA queue manager that you want to create.
    • Create the HA queue manager with a specific file system size by entering the following command:

      crtmqm -sx -fs FileSystemSize QMgrName

      Where:
      FileSystemSize
      Specifies the file system size that the queue manager is created with.
      This value is a numeric value, which is specified in GB.
      QMgrName
      Specifies the name of the HA queue manager that you want to create.
    • Create the HA queue manager with an encrypted file system by entering the following command:

      crtmqm -sx -fe [-fp Passphrase] QMgrName

      Where:
      - fp Passphrase
      Optionally specifies the encryption passphrase. If you do not specify the passphrase in the command, you are prompted for it when you run the command. You should store a copy of the passphrase somewhere safe.
    Note:
    • The HA queue manager is created on the appliance on which the crtmqm command is run. The queue manager automatically starts on that appliance after it is created, you do not need to use the strmqm command to start it.
    • When you create an HA queue manager with an encrypted file system, the passphrase is automatically shared with the HA secondary appliance, which must be available when you create an HA queue manager.
    • You can use other crtmqm parameters in the command. For more information about the available parameters, see crtmqm (create queue manager).
  3. Optional: Exit the IBM MQ administration mode by entering the following command:

    exit

Example

The following example shows the creation of an HA queue manager HAQM1:
crtmqm -sx HAQM1
The following example shows the creation of HA queue manager HAQM2with a filesystem size of 3 GB:
crtmqm -sx -fs 3 HAQM1
The following example shows the creation of HA queue manager HAQM3 with an encrypted file system that used the passphrase Ad5hf9F3fkdWW7g:
crtmqm -sx -fe -fp Ad5hf9F3fkdWW7g HAQM3