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 (FAQ)


Question

You follow the example of crtmqm mentioned in the following section of the MQ Information Center:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa70260_.htm
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

Answer

It seems that there is some confusion due to the example provided in the MQ Information Center.

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 Information Center indicates that it is possible to change the DataPath after the queue manager is created:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.amqzag.doc/fa70113_.htm
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 the existence of the appropriate directories and files under the new DataPath.


Product Alias/Synonym

WebSphere MQ WMQ

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere MQ
Install / Migration

Software version:

7.0.1, 7.1, 7.5

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1501788

Modified date:

2013-05-10

Translate my page

Machine Translation

Content navigation