Author |
Message
|
kordi |
Posted: Wed Dec 15, 2021 10:35 am Post subject: Moving Queue Manager to a different path |
|
|
Centurion
Joined: 28 May 2012 Posts: 146 Location: PL
|
Hi guys,
I was wondering if my approach is according to IBM's best practises. I need to move a queue manager to a different SAN storage mounted to the same server.
What I did on my home lab:
1. Stop q manager
2. mv /var/mqm/log/TEST01 to a new location
3. mv /var/mqm/qmgrs/TEST01 to a new location
4. ln -s /new/location/log/TEST01 /var/mqm/log/TEST01
5. ln -s /new/location/var/TEST01 /var/mqm/var/qmgrs/TEST01
6. strmqm
and voila, it started without issues, messages are in the queue.
What I was told that this will work but according to the best practises I should use mqs.ini to manipulate log and data location.
What are your thought on this? |
|
Back to top |
|
 |
gbaddeley |
Posted: Wed Dec 15, 2021 2:38 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
What you have done will work, but its preferred to specify the qmgr path in mqs.ini, and the log path in each qm.ini, rather than create symlinks in /var/mqm/qmgrs & /var/mqm/logs. The ini file parameters are provided for that purpose, so you should use them. _________________ Glenn |
|
Back to top |
|
 |
kordi |
Posted: Thu Dec 16, 2021 5:38 am Post subject: |
|
|
Centurion
Joined: 28 May 2012 Posts: 146 Location: PL
|
Thanks for your comment. I think changes to mqs.ini and qm.ini is more in line with best practises indeed. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Dec 16, 2021 4:55 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
exerk |
Posted: Fri Dec 17, 2021 1:07 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
PeterPotkay wrote: |
https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-migmqlog-migrate-mq-logs
Quote: |
The migmqlog command migrates logs |
|
Peter, whilst that link does include information on how to specify a new location for the logs, it is in the context of migrating a queue manager's logs from CIRCULAR to LINEAR, or vice versa.
The OP's question is in regard to 'migrating' the queue manager in its entirety, and apart from moving a queue manager to MSCS storage (Windows) I can't think of any one-stop-shop commands to do so. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
kordi |
Posted: Fri Dec 17, 2021 12:16 pm Post subject: |
|
|
Centurion
Joined: 28 May 2012 Posts: 146 Location: PL
|
PeterPotkay Thanks for the link however I am to move both data and logs directory on RHEL so migmqlog is not applicable here.
I agree with gbaddeley that mqs.ini and qm.ini would be the best option to store information about new location instead of making symlinks. Tested that in my lab environment and there were no issues whatsoever.
Thanks guys for sharing your thoughts! |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Dec 17, 2021 1:22 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
What did you change in mqs.ini? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
kordi |
Posted: Fri Dec 17, 2021 1:31 pm Post subject: |
|
|
Centurion
Joined: 28 May 2012 Posts: 146 Location: PL
|
I just set DataPath to a new location in mqs.ini and LogPath in qm.ini |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Dec 17, 2021 7:33 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
kordi wrote: |
I just set DataPath to a new location in mqs.ini and LogPath in qm.ini |
mqs.ini is used as a template for creating new qmgrs, the result is a unique qm.ini file for each new qmgr. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Dec 18, 2021 12:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
bruce2359 wrote: |
kordi wrote: |
I just set DataPath to a new location in mqs.ini and LogPath in qm.ini |
mqs.ini is used as a template for creating new qmgrs, the result is a unique qm.ini file for each new qmgr. |
It still is, but it also serves as a repository for the information on existing queue managers pointing to the location of their qm.ini file.
If need be, you can manipulate it with addmqinf and rmvmqinf... You will still have to update the qm.ini though.
Hope it helps  _________________ MQ & Broker admin |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Dec 18, 2021 6:20 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
I was hoping that, for the benefit of others, Kordi would post examples of what he changed in both mqs.ini and qm.ini files, rather than merely saying he changed them. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
kordi |
Posted: Sat Dec 18, 2021 10:38 am Post subject: |
|
|
Centurion
Joined: 28 May 2012 Posts: 146 Location: PL
|
Bruce, instead of hoping, you simply could have asked Unfortunately, I do not have the power to read your thoughts.
Now, when I know you are curious what I did I can share it with you.
1. I stopped q manager
2. I moved /var/mqm/qmgrs/TEST01 to new location
3. I moved /var/mqm/log/TEST01 to new location
4. I edited DataPath manually in /var/mqm/mqs.ini to point to a new location
QueueManager:
Name=TEST01
Prefix=/var/mqm
Directory=TEST01
DataPath=/home/mqm/data/TEST01
InstallationName=Installation1
5. I edited manually LogPath in /home/mqm/data/TEST01/qm.ini in new location:
Log:
LogPrimaryFiles=3
LogSecondaryFiles=2
LogFilePages=4096
LogType=CIRCULAR
LogBufferPages=0
LogPath=/home/mqm/log/TEST01/
LogWriteIntegrity=TripleWrite
6. I started q manager without any issues
If you have any more questions I will be happy to answer you. |
|
Back to top |
|
 |
|