crtdrprimary

Augments an existing queue manager to become the primary queue manager in a disaster recovery configuration.

Purpose

You use the crtdrprimary command as part of configuring a disaster recovery solution. You specify that an existing queue manager on the live IBM® MQ Appliance is the primary queue manager. On successful completion, the command outputs the crtdrsecondary command that you must run on the recovery appliance to configure the queue manager on there.

Syntax

Read syntax diagramSkip visual syntax diagram crtdrprimary -mQMName -rRecoveryName, RecoveryName -iRecoveryIP, RecoveryIP -pport -fFloatingIP -tReplicationType

Parameters

-m QMName
Specifies the queue manager that you are preparing for participation in a disaster recovery configuration. The queue manager must be stopped when you run the command, unless it is a high availability queue manager (in which case you must leave it to the underlying HA system to handle the stopping of the queue manager).
Note: If you do issue crtdrprimary against an ended high availability queue manager, the crtdrprimary command might hang. In this case, contact IBM Support.
-r RecoveryName
Specifies the name of the IBM MQ Appliance that is the recovery appliance.

You specify a second RecoveryName if you are configuring a disaster recovery solution between two high availability (HA) configurations. A crtdrsecondary command is generated that can be applied to one of the two appliances in the HA group at the recovery site. The command configures both appliances for disaster recovery. In this configuration, the crtdrsecondary command has extra parameters, specifying that the DR secondary instance will be created as an HA pair and that the IP addresses should be verified. Specify the recovery names as comma-separated values. You must specify the recovery names in the same order as the recovery IP addresses.

-i RecoveryIP
Specifies the IP address of the recovery appliance.

You specify a second RecoveryIP if you are configuring a disaster recovery solution between two high availability (HA) configurations. You must specify the IP address of both appliances in the HA pair at the recovery site. Specify the IP addresses as comma-separated values. You must specify the recovery IP addresses in the same order as the recovery names.

-p port
Specifies the port that the data replication listener on each appliance uses. The port number must be between 1025 and 9999, and must be the same on each appliance (do not use port 2222, it is reserved by the appliance). Each listener is active only on the replication interface (eth20), but you must ensure that the listener does not conflict with any services configured to listen on all appliance interfaces (for example, MQ listeners, or SSH and WebUI services, where these have not been restricted to particular local IP addresses). The data replication listener must also not be blocked by any routing or firewalls between the appliances on the replication network.
-f floatingIP
If you are configuring disaster recovery for a high availability pair on the live site, you can optionally specify a floating IP address. The queue manager specified by -m QMName must already belong to an HA pair if you use the -f option. The floating IP address is an IPv4 address that is used to replicate queue manager data from whichever HA appliance the queue manager is currently running on to the queue manager on the recovery appliance. The floating IP address must be in the same subnet group as the static IP address assigned to the replication port (eth20) on both appliances.

You do not have to physically configure an Ethernet port with this address. Select a free IP address in the same subnet as the replication ports on the two appliances.

Used with this option, the crtdrprimary command configures the queue manager on both appliances in the HA pair, and reserves storage for the data snapshot on both appliances.

Note: You cannot specify a floating IP address if you are configuring disaster recovery between two HA groups (one on the live site and one on the recovery site).
-t ReplicationType
Specifies whether asynchronous or synchronous replication is used. Permitted values are a for asynchronous and s for synchronous. Asynchronous is the default value. Only asynchronous replication is available for HA configurations with DR.

Usage Notes

  • The queue manager must be stopped before you run crtdrprimary unless it is a high availability queue manager (in which case you must leave it to the underlying HA system to handle the stopping of the queue manager). You can use the endmqm command to stop the queue manager.
  • On successful completion, the command outputs the crtdrsecondary command that you must run on the recovery appliance to configure the queue manager on there.
  • There must be sufficient memory for both the queue manager data and the snapshot of the data that is required for disaster recovery. For example, if there is 100 GB free and you create a queue manager with the default size of 64 GB,and then run the crtdrprimary command for that queue manager without freeing some additional space, crtdrprimary fails because there is not another 64 GB of free space.
  • If you are configuring disaster recovery between two HA groups, the recovery site appliances must first be configured together in an HA group, using the prepareha and crthagrp commands, see Configuring the high availability group.
  • After the command completes, you can restart the queue manager on the live appliance. This can continue to run while messages are replicated to the recovery appliance.

Examples

The following example shows the existing queue manager QM1 being prepared for running on a disaster recovery configuration, with the appliance that you run the command on as the live system, and the appliance named mydrapp1 as the recovery. Replication is synchronous.

crtdrprimary -m QM1 -r mydrappl -i 198.51.100.0 -p 2015
-t s
Upon successful completion, the command returns the following information:

Queue manager QM1 is prepared for Disaster Recovery replication.
Now execute the following command on appliance mydrappl:
crtdrsecondary -m QM1 -s 65536 -l myliveappl -i 198.51.100.24 -p 2015 -t s
The following example shows the high availability queue manager QM3 being prepared for running on a disaster recovery configuration, with the appliance that you run the command on as the live system, and the appliance named mydrapp3 as the recovery. In this example the eth20 port on the HA appliance currently running QM3 has the static IP address 198.51.100.20 (which is not used in the command) and the floating IP address 198.51.100.10. The DR appliance has the IP address 198.51.100.124.
crtdrprimary -m QM3 -r mydrapp3 -i 198.51.100.124 -p 2015 -f 198.51.100.10
Upon successful completion, the command returns the following information:

Queue manager QM3 is prepared for Disaster Recovery replication.
Now execute the following command on appliance mydrappl:
crtdrsecondary -m QM3 -s 65536 -l myliveapp3 -i 198.51.100.10 -p 2015 -t a 
The following example shows the high availability queue manager, QM4, being prepared to fail over to another HA group at the recovery site (which has already been configured using the prepareha and crthagrp commands). The appliance that you run the command on is named LIVHA1 and is part of the live HA group. The recovery HA group has the two appliances DISHA1 and DISHA2.
crtdrprimary -m QM4 -r DISHA1,DISHA2 -i 10.2.20.1,10.2.20.2 -p 2015 
Upon successful completion, the command returns the following information:
Queue manager QM4 is prepared for Disaster Recovery replication.
Now execute the following command on appliance DISHA1 or DISHA2:
crtdrsecondary -m QM4 -sx -s 1024 -l DISHA1,DISHA2 -i 10.1.20.1,10.1.20.2 -p 2015 -t a -v 10.2.20.1,10.2.20.2