IBM Support What's New?

Expecting the file qm.ini under a "qmgrs" directory when using the -md DataPath parameter for crtmqm when creating a multi-instance queue manager

Technote (troubleshooting)


You follow the example of crtmqm mentioned in the following section of the MQ online documentation:
WebSphere MQ 7.0.1 > WebSphere MQ > System Administration Guide > Configuring and managing WebSphere MQ > Availability, recovery and restart > Using WebSphere MQ with high availability configurations > Using WebSphere MQ with a high availability cluster on UNIX >
Creating a queue manager for use in a high availability (HA) cluster

This is the actual text:
crtmqm –md /MQHA/qmgrname/data –ld /MQHA/qmgrname/log qmgrname

You customized it and provide the name of the queue manager, such as QM1
crtmqm –md /MQHA/QM1/data –ld /MQHA/QM1/log QM1

You noticed that the resulting qm.ini for QM1 is created under the following directory structure:

However, you have scripts that navigate the directory structure and look for the subdirectory "qmgrs", such as in the following default structure:

Resolving the problem

It seems that there is some confusion due to the example provided in the MQ online documentation.
The usage of the directory "data" in the section below was only for illustration purposes to provide a concrete example, and it is not a requirement that a directory called "data" must be in the directory structure.

The value for the DataPath parameter (flag: -md) is any suitable directory structure with the proper ownership and permission for the usage of the userid "mqm" and groupid "mqm". There are no restrictions regarding the name or depth of the directories. You do not need to include a subdirectory called "data" in the structure.

The general format for the full path of the qm.ini when using the -md flag in crtmqm is:

Usage                  Actual location of the qm.ini file
-md DIRECTORY          DIRECTORY/QMgrName/qm.ini

If you want the file QMgrName/qm.ini be located under the subdirectory "qmgrs", then you will need to specify a directory structure that contains "qmgrs".
Some examples are shown below.
Notice that the last example is the closest to the structure of "/var/mqm/qmgrs/QM1/qm.ini". It has the proper levels and parent subdirectory "qmgrs" for the actual queue manager.
Usage                  Actual location of the qm.ini file
-md /MQHA              /MQHA/QM1/qm.ini
-md /MQHA/QM1          /MQHA/QM1/QM1/qm.ini
-md /MQHA/QM1/data     /MQHA/QM1/data/QM1/qm.ini
-md /MQHA/qmgrs        /MQHA/qmgrs/QM1/qm.ini
-md /MQHA/mqm/qmgrs    /MQHA/mqm/qmgrs/QM1/qm.ini

Notice that when using the DataPath parameter, there will still be some files in the corresponding directory for the queue manager under /var/mqm/qmgrs/QM1, (and this is normal, do not delete them), such as:

++ Notes regarding changing the DataPath after queue manager is created:

The MQ online documentation indicates that it is possible to change the DataPath after the queue manager is created:

WebSphere MQ 7.0.1 > WebSphere MQ > System Administration Guide > Configuring and managing WebSphere MQ > File system support> Directory structure on UNIX and Linux systems

"You can modify the location of a queue manager log and data directories of an existing queue manager by editing the DataPath and LogPath attributes in the qm.ini file when the queue manager is stopped."

However, it is critical that directory structure of the old DataPath must be copied into the new DataPath. Otherwise, the new DataPath will not have the required directories and files. But if you are not thorough with the copying task and ensure proper file permissions and ownership, you may encounter problems.

Another approach is to delete the queue manager using dltmqm (which will delete the appropriate directories) and recreate the queue manager with the desired DataPath. This will ensure that the existence of the appropriate directories and files under the new DataPath.

Product Alias/Synonym

WebSphere MQ WMQ

Document information

More support for: WebSphere MQ
Install / Migration

Software version: 7.0.1, 7.1, 7.5, 8.0

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Reference #: 1501788

Modified date: 2015-04-08