[UNIX][Linux]

Directory structure on UNIX and Linux systems

The IBM® 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 IBM 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 an IBM MQ system. 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 IBM MQ.

Figure 1 shows the default configuration for IBM MQ 7.R on AIX® where R is the release of the product. For examples of alternative multi-instance configurations, seeExample directory configurations on UNIX and Linux systems.

Figure 1. Example default IBM MQ directory structure for UNIX and Linux systems
IBM MQ directories are shown as children of /var/mqm.
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 MQ , ensure that the mqm user has full directory permissions, for example, file mode 755.
Note: The /var/mqm/errors directory should be a separate filesystem to prevent FFDCs produced by the queue manager from filling the filesystem that contains /var/mqm.

See Creating file systems on UNIX and Linux systems for more information.

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.