IBM Support

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

Troubleshooting


Problem

You follow the example of crtmqm mentioned in the following section of the MQ online documentation: http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.0.1/com.ibm.mq.amqz… 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: /MQHA/QM1/data/QM1/qm.ini However, you have scripts that navigate the directory structure and look for the subdirectory "qmgrs", such as in the following default structure: /var/mqm/qmgrs/QM1/qm.ini

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:
@app
@ipcc
@qmgr
@qmpersist

++ 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":{"code":"SSFKSJ","label":"WebSphere MQ"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Install \/ Migration","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.0;7.5;7.1;7.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WebSphere MQ WMQ

Document Information

Modified date:
15 June 2018

UID

swg21501788