How to Create, Configure and Administrate Multi-Instance Queue Manager ?

Creating and starting the multi-instance Queue Managers
 This show how to Create a Multi-Instance Queue Manager Environment (Its a part of HACMP):

As a First Step Make sure a Common Network file system was created in the same network range of the servers were we will now createMultiinstance of queue manager:

a) Create the queue manager on Host-1:
___________________________________________
$ crtmqm -md /COMMONNETWORKSTORAGE/data -ld /COMMONNETWORKSTORAGE/log QMMI1
WebSphere MQ queue manager created.
Directory ‘/COMMONNETWORKSTORAGE/data/QMMI1’ created.
Creating or replacing default objects for QMMI1.
Default objects statistics : 65 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.
Issue dspmqinf to obtain the command that can be use to execute “addmqinf” in the other host:
$ dspmqinf -o command QMMI1
The output is:
addmqinf -s QueueManager -vName=QMMI1 -vDirectory=QMMI1 -vPrefix=/var/mqm -vDataPath=/COMMONNETWORKSTORAGE/data/QMMI1

b) Define the queue manager on Host-2:
___________________________________________
Copy the above command for addmqinf into the other Host and execute it:
$ addmqinf -s QueueManager -vName=QMMI1 -vDirectory=QMMI1 -vPrefix=/var/mqm -vDataPath=/COMMONNETWORKSTORAGE/data/QMMI1
WebSphere MQ configuration information added.
Note:
The above tasks added to the local /var/mqm/mqs.ini files in both host-1 and host2:
QueueManager:
Name=QMMI1
Prefix=/var/mqm
Directory=QMMI1
DataPath=/COMMONNETWORKSTORAGE/data/QMMI1
In each host, there are 2 local subdirectories:
/var/mqm/qmgrs/QMMI1
@app @ipcc @qmgr @qmpersist Page 13 of 29
var/mqm/sockets/QMMI1
@app @ipcc @qmgr qmgrlocl @qmpersist zsocketapp zsocketEC

The directory structure in the share drive for the queue manager is:

$ cd /COMMONNETWORKSTORAGE
$ ls -al
total 16
drwxr-xr-x 4 mqm mqm 4096 Nov 12 15:36 .
drwxr-xr-x 3 root root 4096 Nov 12 15:10 ..
drwxr-xr-x 3 mqm mqm 4096 Nov 12 15:26 data
drwxr-xr-x 3 mqm mqm 4096 Nov 12 15:26 log
$ ls -al *
data:
total 12
drwxr-xr-x 3 mqm mqm 4096 Nov 12 15:26 .
drwxr-xr-x 4 mqm mqm 4096 Nov 12 15:36 ..
drwxrwsr-x 17 mqm mqm 4096 Nov 12 15:38 QMMI1
log:
total 12
drwxr-xr-x 3 mqm mqm 4096 Nov 12 15:26 .
drwxr-xr-x 4 mqm mqm 4096 Nov 12 15:36 ..
drwxrwsr-x 3 mqm mqm 4096 Nov 12 15:38 QMMI1
$ cd /COMMONNETWORKSTORAGE/data/QMMI1
$ ls -al
total 88
drwxrwsr-x 17 mqm mqm 4096 Nov 12 15:38 .
drwxr-xr-x 3 mqm mqm 4096 Nov 12 15:26 ..
drwxrwsr-x 2 mqm mqm 4096 Nov 12 15:26 @ipcc
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 active
-rw-rw—— 1 mqm mqm 56 Nov 12 15:26 amqalchk.fil
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 authinfo
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 channel
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 clntconn
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 errors
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 listener
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 master
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 namelist
drwxrwsr-x 2 mqm mqm 4096 Nov 12 15:26 plugcomp
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 procdef
-rw-rw-r— 1 mqm mqm 1299 Nov 12 15:26 qm.ini
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 qmanager
-rw-rw-r— 1 mqm mqm 526 Nov 12 15:26 qmstatus.ini
drwxrws—- 44 mqm mqm 4096 Nov 12 15:26 queues
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 services Page 14 of 29
drwxrwsr-x 2 mqm mqm 4096 Nov 12 15:26 ssl
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 standby
drwxrwsr-x 2 mqm mqm 4096 Nov 12 15:26 startprm
drwxrws—- 2 mqm mqm 4096 Nov 12 15:26 topic

The important thing in Multi-Instance is 3 files that used for the locking that allows the switchover between an active to a standby instance (the names are shown in red in the directory listings above and below): active, master, standby
The help with the coordination between the active and the standby instances, to prevent 2 active instances and to allow the standby to become the active when the original active is terminated.
Location: /COMMONNETWORKSTORAGE/data/QMMI1
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 active
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 master
-rw-rw-r— 1 mqm mqm 28 Nov 12 15:26 standby
$ cd /COMMONNETWORKSTORAGE/log/QMMI1
$ ls
drwxrwx—- 2 mqm mqm 144 2009-09-29 11:42 active
-rw-rw—— 1 mqm mqm 6256 2009-09-29 11:42 amqhlctl.lfh
c) Start the active instance of the queue manager on Host-1:
____________________________________________________________
$ strmqm -x QMMI1
WebSphere MQ queue manager ‘QMMI1’ starting.
5 log records accessed on queue manager ‘QMMI1’ during the log replay phase.
Log replay for queue manager ‘QMMI1’ complete.
Transaction manager state recovered for queue manager ‘QMMI1’.
WebSphere MQ queue manager ‘QMMI1’ started.

d) Start the standby instance of the queue manager on Host 2
____________________________________________________________
$ strmqm -x QMMI1
WebSphere MQ queue manager ‘QMMI1’ starting.
A standby instance of queue manager ‘QMMI1’ has been started. The active instance is running elsewhere. Page 15 of 29
These are the only 2 processes running on the standby instance:

Host 2: /home/rivera
$ ps -ef | grep mq
mqm 3723 1 0 15:26 ? 00:00:00 amqzxma0 -m QMMI1 -x
mqm 3728 3723 0 15:26 ? 00:00:00 /opt/mqm/bin/amqzfuma -m QMMI1
These processes are:
amqzxma0 Execution Controller (EC)
amqzfuma OAM process

Comments