MQ

 View Only
  • 1.  Moving QM data path

    Posted Mon March 25, 2024 10:46 AM

    This has to be an incredibly simple thing to do but I can't find any supporting documentation so I apologize in advance if this seems obvious to everyone but me. 

    I have a non-production yet important Linux-based MQ environment where someone configured the Queue Manager data to live under /opt/mqm (see mqs.ini below). This is not ideal as the MQ version is currently 9.1 and I want to upgrade to 9.3 which is a removal of 9.1 and install of 9.3. Part of the removal process deletes the /opt/mqm directory. This happened on another environment and, by luck, the uninstall was unable to delete the queue manager directories. I don't want to take that chance again and I want the queue manager data to live in a better spot than /opt/mqm. I know there is a migmqlog command that can do this but, according to the documentation, is windows-only. The logs are also circular logs and defined under /opt/mqm. To move to a different file system, is it as simple as stopping MQ, copying the queue manager data and logs, and redefining everything in mqs.ini and mq.ini? I'm really surprised there is no documentation out there for such a move on the system system. 

    mqs.ini:

       DefaultPrefix=/var/mqm

    LogDefaults:
       LogDefaultPath=/var/mqm/log
    QueueManager:
    QueueManager:
       Name=CERN.CERNRDCMQTSWAS.DEVCERT
       Prefix=/var/mqm
       Directory=CERN!CERNRDCMQTSWAS!DEVCERT
       DataPath=/opt/mqm/qmgrs/CERN!CERNRDCMQTSWAS!DEVCERT
       InstallationName=Installation1
    DefaultQueueManager:
       Name=CERN.CERNRDCMQTSWAS.DEVCERT



    ------------------------------
    Peter Githens
    ------------------------------


  • 2.  RE: Moving QM data path

    IBM Champion
    Posted Tue March 26, 2024 05:13 AM
    Edited by Francois Brandelik Tue March 26, 2024 05:25 AM

    Hi Peter,

    Your instinct is good. So you would update mqs.ini with the correct DataPath value, however if the Prefix is /var/mqm and the DataPath is /var/mqm/qmgrs/$Directory, you can simply delete the DataPath row.

    Additionally you should absolutely verify the entry in the qm.ini as to the location of the qmgr's logs. If the prefix there is also /opt/mqm/log you will have to move the logs and give the new prefix of /var/mqm/log (see default for $LogDefaultPath that gets normally written to the qm.ini at creation.

    I would suggest you stop the qmgr, copy the Data and Log files, make a backup of mqs.ini then change it and finally update the /var/mqm/qmgrs/$Directory/qm.ini.

    Then start the qmgr and verify with dspmqinf where it is running. Also look at file date and time.

    If that was all successfull you can delete the /opt/mqm Data and Log paths for the qmgr.

    Needless to say all the file ownership should be preserved when moving the files / directories

    By the way I expect the windows only command to be hamvmqm which would move the qmgr Data Files and Logs

    migmqlog should be available in Unix/Linux but only affect the logs and not change their location.

    According to documentation you could use migmqlog to move the log location (see migmqlog -ld absolute path)

    Hope it helps.



    ------------------------------
    Francois Brandelik
    ------------------------------



  • 3.  RE: Moving QM data path

    Posted Wed March 27, 2024 07:33 AM
    Edited by Peter Githens Wed March 27, 2024 07:41 AM

    Thanks Francois! I did find the entries for the logs in MQ.ini and planned to change accordingly. Also, my preference is just to delete the data path entry and move everything back under /var/mqm. I've noticed there are some existing fils under /var/mqm that are are also in the current queue manager path. Presumably I would only move what doesn't already exist. 

    Specifically under /var/mqm/qmgrs/CERN!CERNRDCMQTSWAS!DEVCERT I see . . 

    @app

    @ipcc

    @qmgr

    @qmpersist

    Under each directory is a shmem folder with a node-specific directory containing a bunch of shmem files. 

    The only file that conflicts from /opt/mqm/qmgrs is @ipcc. It contains to text files. I'm thinking just copy those two files to the /var/mqm path and I should be good. 



    ------------------------------
    Peter Githens
    ------------------------------