IBM Data Management Community Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems. Join / Log in
When I attempt to create the Db2 community container using podman, the RUN command fails. The first error in the output is:
(*) Creating users ...useradd: cannot create directory /database/config/db2inst1useradd: cannot create directory /database/config/db2fenc1
Important details: MacOS Ventura 13.6Container Runtime: Podman 4.6.2
Here is the command I'm running:podman run -h db2server115 --name db2server115 --detach --privileged=true -p 50000:50000 --env-file .env_list -v /Users/db2dean/x/db2fs:/db2fs -v /Users/db2dean/x:/x -v /Users/db2dean/x/db2fs/database:/database icr.io/db2_community/db2
Contents of .env_listLICENSE=acceptDB2INSTANCE=db2inst1DB2INST1_PASSWORD=ibmdb2aaDBNAME=BLU=falseENABLE_ORACLE_COMPATIBILITY=falseUPDATEAVAIL=NOTO_CREATE_SAMPLEDB=falseREPODB=falseIS_OSXFS=truePERSISTENT_HOME=trueHADR_ENABLED=falseETCD_ENDPOINT=ETCD_USERNAME=ETCD_PASSWORD=
Earlier I had the container running fine, but recently had to uninstall/reinstall podman. So I have the latest version Podman. I have had some macos upgrades since I last created the Db2 container.
Hello @Dean Compher,
I have a few questions for you to help debug the issue:- Can you check what permissions the /Users/db2dean/x/db2fs/database directory has? It may be that the container doesn't have the correct permissions to write/modify files in that path
- Does your Mac contain the Apple silicon? E.g. the M1/M2/MX chips. Or is it using an intel chip?
Thank you Mohamed,
My Mac uses an Intel chip. When I checked the permissions on the /Users/db2dean/x/db2fs/database directory I noticed that group and user didn't have write permissions, so I did a chmod 777 on it to change it as follows:
$ ls -l | grep databasedrwxrwxrwx@ 2 db2dean staff 64 Nov 24 09:09 database
This had an interesting effect. Before I made the change issuing the podman-run command would create a config directory under database. Now it doesn't and I see this error in the output.
Error: statfs /Users/db2dean/x/db2fs/database: no such file or directory
I tried adding that directory to $PATH but that had no effect. I've attached all of the output displayed in the terminal window in the file called Screen output.txt I also attached the script that I run called pmrun115mac That script is located in /Users/db2dean/x/db2fs and I execute it from the command line as ./pmrun115mac.sh.
Hi @Dean Compher,
My Mac uses the apple silicon which doesn't support running the container directly. For the intel architecture, it should be supported as normal. Give me some time to get ahold of a similar environment to yours in order to duplicate the issue and debug. In the meantime, can you also try with the previous image? Since we just GA'd v1159, there's a chance that that is the reason it stopped working all of a sudden. To rule that out, can you try your command as you did the previous times it worked, but use the image tagged with :184.108.40.206, rather than the latest. You can also use 220.127.116.11 if you'd like. I'll post a follow up soon once I've gotten a laptop and reproduced your issue
Hi @Mohamed Bengezi
I tried byth 11.5.8 and 11.5.7. They do NOT get the "Error: statfs /Users/db2dean/x/db2fs/database: no such file or directory" message and they both do create a config directory under database. I zipped the config directories for both and attached them here.
I've spoken with Dean offline, and we've found a workaround by excluding the
database volume mount from the command. Mounting other directories works without issue, but it seems that it has trouble when the database volume is mounted due to some permission issue from macOS