Forum Discussion
alexander_chekushev
Apr 03, 2025Copper Contributor
Issue with Mounting Persistent Volume in MongoDB Container on Azure Container Apps
Hi, I'm running a MongoDB container (mongo:latest) on Azure Container Apps, but I'm facing an issue when mounting a persistent volume for MongoDB data. The container works fine before mounting the v...
Kidd_Ip
Apr 09, 2025MVP
The issues you're encountering with mounting a persistent volume in a MongoDB container on Azure Container Apps are likely related to file permissions, storage compatibility, and MongoDB's WiredTiger storage engine behavior, you may locate the root cause by:
Based on the errors:
- File Exists Errors: MongoDB expects a clean /data/db directory for initialization. If files like WiredTiger.wt already exist, MongoDB may fail to start.
- Operation Not Permitted: This indicates insufficient permissions for the mounted volume.
- Renaming Unexpected Files: MongoDB attempts to rename files when it encounters issues, which suggests compatibility or corruption problems.
- WiredTiger Startup Failure: This could be due to incompatible storage or improper initialization of the database files.
Some suggestions:
- Verify Azure File Storage Configuration
- Clean the Mounted Directory
- Adjust Permissions under /data/db
- Use an Alternative Mount Path such as /data/mongodb
- Test with Local Storage