Directory structure on UNIX and Linux systems

The WebSphere MQ directory structure on UNIX and Linux® systems can be mapped to different file systems for easier management, better performance, and better reliability.

Use the flexible directory structure of WebSphere MQ to take advantage of shared file systems for running multi-instance queue managers.

Use the command crtmqm QM1 to create the directory structure shown in Figure 1 where R is the release of the product. It is a typical directory structure for a queue manager created on a WebSphere MQ system from v7.0.1 onwards. Some directories, files and .ini attribute settings are omitted for clarity, and another queue manager name might be altered by mangling. The names of the file systems vary on different systems.

In a typical installation, every queue manager that you create points to common log and qmgrs directories on the local file system. In a multi-instance configuration, the log and qmgrs directories are on a network file system shared with another installation of WebSphere MQ.

Figure 1 shows the default configuration for WebSphere MQ v7.R on AIX where R is the release of the product. For examples of alternative multi-instance configurations, see Example directory configurations on UNIX and Linux systems.

Figure 1. Example default WebSphere MQ v7.R directory structure for UNIX and Linux systems
WebSphere MQ directories are shown as children of /var/mqm. The children are qmgrs, log and a catchall to represent other directories that are children of /var/mqm, such as errors and trace. Qmgrs and log and both have a qmgrs child for every queue manager that is created. Each of these qmgrs children, and the errors directory, have more children that are not shown in detail on the diagram.
The product is installed into /usr/mqm on AIX and /opt/mqm on the other systems, by default. The working directories are installed into the /var/mqm directory.
Note: If you created the /var/mqm file system prior to installing IBM® WebSphere® MQ, ensure that the mqm user has full directory permissions, for example, file mode 755.

The log and qmgrs directories are shown in their default locations as defined by the default values of the LogDefaultPath and DefaultPrefix attributes in the mqs.ini file. When a queue manager is created, by default the queue manager data directory is created in DefaultPrefix/qmgrs , and the log file directory in LogDefaultPath /log. LogDefaultPath and DefaultPrefix only effects where queue managers and log files are created by default. The actual location of a queue manager directory is saved in the mqs.ini file, and the location of the log file directory is saved in the qm.ini file.

The log file directory for a queue manager is defined in the qm.ini file in the LogPath attribute. Use the -ld option on the crtmqm command to set the LogPath attribute for a queue manager; for example, crtmqm -ld LogPath QM1. If you omit the ld parameter the value of LogDefaultPath is used instead.

The queue manager data directory is defined in the DataPath attribute in the QueueManager stanza in the mqs.ini file. Use the -md option on the crtmqm command to set the DataPath for a queue manager; for example, crtmqm - md DataPath QM1 . If you omit the md parameter the value of the DefaultPrefix or Prefix attribute is used instead. Prefix takes precedence over DefaultPrefix .

Typically, create QM1 specifying both the log and data directories in a single command.
crtmqm
 -md DataPath -ld
 LogPath QM1

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.

The path to the errors directory, like the paths to all the other directories in /var/mqm , is not modifiable. However the directories can be mounted on different file systems, or symbolically linked to different directories.