[Linux]

Creating a disaster recovery RDQM

You use the crtmqm command to create a replicated data queue manager (RDQM) to act as a primary or a secondary in a disaster recovery configuration.

About this task

You can create a replicated data queue manager (RDQM) as a user in the mqm group if the user can use sudo. Otherwise you must create the RDQM as root.

You must create a primary RDQM DR queue manager on one node. Then you must create a secondary instance of the same queue manager on another node. The primary and secondary instances must have the same name and be allocated the same amount of storage.

The following points give some guidance about sizing the queue manager file system:
  1. When creating an RDQM queue manager, a file system is allocated to store queue manager data and logs. It is important to size this file system appropriately so that the queue manager can record ongoing activity in its logs, and store application messages on queues. When sizing the file system, consider peak messaging requirements, future workload growth, and application outages that might cause messages to build up on queues. For guidance on calculating the size of the queue manager recovery log, see How large should I make my log filesystem?. When calculating the storage requirements for application messages, the size and number of messages needs to be considered, plus their MQMD header and any message properties they have.
  2. RDQM queue manager file systems cannot be dynamically resized. You must back up then restore an RDQM queue manager with a larger file system if this is required, see Resizing the filesystem for an HA RDQM queue manager.
  3. You can limit the size of individual queues on disk by using local queue attributes, such as MAXDEPTH and MAXFSIZE. See Modifying IBM MQ queue files.
  4. You should monitor your ongoing disk usage and respond appropriately if disk usage increases before file system usage becomes critical. File system usage can be monitored by using either platform/operating system capabilities, or by subscribing to metrics published to IBM® MQ system topics that are described at Metrics published on the system topics.

Procedure

  • To create a primary DR RDQM:
    1. Enter the following command:
      crtmqm -rr p [-rt (a | s)] -rl Local_IP -ri Recovery_IP -rn Recovery_Name -rp Port [other_crtmqm_options] [-fs size] QMname
      where:
      -rr p
      Specifies that you are creating the primary instance of the queue manager.
      -rt a | s
      -rt s specifies that the DR configuration uses synchronous replication, -rt a specifies that the DR configuration uses asynchronous replication. Asynchronous replication is the default.
      -rl Local_IP
      Specifies the local IP address to be used for DR replication of this queue manager.
      -ri Recovery_IP
      Specifies the IP address of the interface used for replication on the server hosting the secondary instance of the queue manager.
      -rn Recovery_Name
      Specifies the name of the system that is hosting the secondary instance of the queue manager. The name is that value that is returned if you run uname -n on that server. You must explicitly create a secondary queue manager on that server.
      -rp Port
      Specifies the port to use for DR replication.
      other_crtmqm_options
      You can optionally specify one or more of these general crtmqm options:
      • -z
      • -q
      • -c Text
      • -d DefaultTransmissionQueue
      • -h MaxHandles
      • -g ApplicationGroup
      • -oa user|group
      • -t TrigInt
      • -u DeadQ
      • -x MaxUMsgs
      • -lp LogPri
      • -ls LogSec
      • -lc | -l
      • -lla | -lln
      • -lf LogFileSize
      • -p Port
      -fs size
      Optionally specifies the size of the filesystem to create for the queue manager, that is, the size of the logical volume which is created in the drbdpool volume group. Another logical volume of that size is also created, to support the reverting to snapshot operation, so the total storage for the DR RDQM is just over twice that specified here.
      Size is a numeric value, which is specified in GB. You can specify a value in MB by entering the value followed by the character M. For example, to specify a filesystem size of 3 GB, enter 3. To specify a filesystem size of 1024 MB, enter 1024M. (You can also add a G suffix to explicitly state GB.)
      QMname
      Specifies the name of the replicated data queue manager. The name is case sensitive.
      After the command completes, it outputs the command that you need to input on the secondary node to create the secondary instance of the queue manager. You can also use the rdqmdr command on your primary node to retrieve the crtmqm command that you need to run on the secondary node to create the secondary queue manager, see Managing primary and secondary characteristics of DR RDQMs.
  • To create a secondary DR RDQM:
    1. Enter the following command on the node that is to host secondary instances of the RDQM:
      crtmqm  -rr s [-rt (a | s)] -rl Local_IP -ri Primary_IP -rn Primary_Name  -rp Port [other_crtmqm_options] [-fs size] QMname
      Where:
      -rr s
      Specifies that you are creating the secondary instance of the queue manager.
      -rt a | s
      -rt s specifies that the DR configuration uses synchronous replication, -rt a specifies that the DR configuration uses asynchronous replication.
      -rl Local_IP
      Specifies the local IP address to be used for DR replication of this queue manager.
      -ri Primary_IP
      Specifies the IP address of the interface used for replication on the server hosting the primary instance of the queue manager.
      -rn Primary_Name
      Specifies the name of the system that is hosting the primary instance of the queue manager. The name is that value that is returned if you run uname -n on that server.
      -rp Port
      Specifies the port to use for DR replication.
      other_crtmqm_options
      You can optionally specify one or more of these general crtmqm options:
      • -z
      -fs size
      Specifies the size of the filesystem to create for the queue manager, that is, the size of the logical volume which is created in the drbdpool volume group. If you have specified a non-default size when creating the primary queue manager, you must specify the same value here.
      Size is a numeric value, which is specified in GB. You can specify a value in MB by entering the value followed by the character M. For example, to specify a filesystem size of 3 GB, enter 3. To specify a filesystem size of 1024 MB, enter 1024M. (You can also add a G suffix to explicitly state GB.)
      QMname
      Specifies the name of the replicated data queue manager. This must be the same as the name you specified for the primary instance of the queue manager. Note that the name is case sensitive.

What to do next

After you have created your primary and secondary instances of your queue manager, you must check the status on both nodes to check both are correct. Use the rdqmstatus command on both nodes. The nodes should be displaying normal status as described in Viewing DR RDQM status. If they are not displaying this status, delete the secondary instance and recreate it, taking care to use the correct arguments.