MQ on linux platform by design uses O_DIRECT feature when writing to the recovery logs. But some linux file systems do not support O_DIRECT flag. In such case O_DIRECT feature has to be disabled manually to start the queue manager or create the queue manager. So we have to check linux file system's support for O_DIRECT else crtmqm will fail with AMQ8101 error code or strmqm will fail with AMQ7047 error code. In either case, under MQ traces we can see the following
Data: 0x00003000 0x00000016
Log write error 22, returned -1
xcsGetEnvironmentString[MQ_RETRY_WRITE] = NULL
-------}! xcsGetEnvironmentString rc=xecE_E_ENV_VAR_NOT_FOUND
0x0000: 16688020 |.h. |
------}! mqloWriteFile rc=hrcE_MQLO_BPSE
The above "Log write error 22", error 22 translates to "EINVAL" which indicates the file system does not support the O_DIRECT feature.
There are 2 ways to disable this feature
1) Set the environment variable "AMQ_INHIBIT_O_DIRECT=1"
2) Set the tuning parameter "NoLogBuffering" in qm.ini file.