[Linux]

DR/HA RDQM worked example

This example show how to create and delete DR/HA RDQM.

Creating a DR/HA RDQM

The example configuration has two sites, named 'main' and 'dr'. Each site has three nodes, named 'alice', 'bob', and 'charlie'. The nodes have full name consisting of their site name and name, so 'main-alice', 'dr-alice', and so on.

The following steps create a DR/HA RDQM named QM1 that runs on main-alice. The main-alice node is the HA and DR primary.
Shows the example configuration
If the local and remote DR IP addresses are specified in the rdqm.ini file, then there is not need to specify any IP addresses on the command line and a DR/HA RDQM named QM1 can be created by running the following command on main-alice:
crtmqm -sx -rr p -rn DR1 -rp 7001 QM1
If the local DR IP addresses are specified in the rdqm.ini file, then the remote DR IP addresses can be specified on the command line:
crtmqm -sx -rr p -ri 192.168.2.1,192.168.2.2,192.168.2.3 -rp 7001 QM1
If no DR IP addresses are specified in the rdqm.ini file, then both remote and local DR IP addresses can be specified on the command line:
crtmqm -sx -rr p -rl 192.168.1.1,192.168.1.2,192.168.1.3 -ri 192.168.2.1,192.168.2.2,192.168.2.3 -rp 7001 QM1
The output in response to creating QM1 is as shown in the following example:
Creating replicated data queue manager configuration.
Secondary queue manager created on 'main-bob'.
Secondary queue manager created on 'main-charlie'.
IBM MQ queue manager created.
Directory '/var/mqm/vols/qm1/qmgr/qm1' created.
The queue manager is associated with installation 'Installation1'.
Creating or replacing default objects for queue manager 'QM1'.
Default objects statistics : 83 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
Enabling replicated data queue manager.
Replicated data queue manager enabled.
Issue the following command on the remote HA group to create the DR/HA secondary queue manager:
crtmqm -sx -rr s -rl 192.168.2.1,192.168.2.2,192.168.2.3 -ri 192.168.1.1,192.168.1.2,192.168.1.3 -rp 7001 -fs 3072M QM1
Copy the command from the message to create the DR secondary instance of QM1 on dr-alice:

crtmqm -sx -rr s -rl 192.168.2.1,192.168.2.2,192.168.2.3 -ri 192.168.1.1,192.168.1.2,192.168.1.3 -rp 7001 -fs 3072M QM1
The following message is output on dr-alice:

Creating replicated data queue manager configuration.
Secondary queue manager created on 'dr-bob'.
Secondary queue manager created on 'dr-charlie'.
IBM MQ secondary queue manager created.
Enabling replicated data queue manager.

Test the DR Secondary

To test the disaster recovery features of QM1, run the following command on main-alice to make QM1 the DR secondary instance:
rdqmdr -m QM1 -s
Queue manager 'QM1' has been made the DR secondary on this node.
Run the following command on dr-alice to make QM1 the DR primary instance on that node:
rdqmdr -m QM1 -p
Queue manager 'QM1' has been made the DR primary on this node.

Deleting a DR/HA RDQM

To delete the DR/HA RDQM named QM1, first end the queue manager on main-alice:
endmqm -w QM1
Replicated data queue manager disabled.
Waiting for queue manager 'QM1' to end.
IBM MQ queue manager 'QM1' ended.
Then run the following command on main-alice to delete QM1:
dltmqm QM1
Removing replicated data queue manager configuration.
Secondary queue manager deleted on 'main-bob'.
Secondary queue manager deleted on 'main-charlie'.
IBM MQ queue manager 'QM1' deleted.
Finally, you must delete QM1 on dr-alice:
dltmqm QM1
Removing replicated data queue manager configuration.
Secondary queue manager deleted on 'dr-bob'.
Secondary queue manager deleted on 'dr-charlie'.
IBM MQ queue manager 'QM1' deleted.