I have a use case that requires all of the mongodb data directory to be on read-only media.
Is it possible to run mongo server from such a configuration? (Any chance just disabling journalling and logging would be enough?)
Hi @Nick_L1 & welcome!
To answer the question, as I understand, it should be possible to run MongoDB on a read-only media. You will need to set the correct directories for read and separately for write. Expectedly, features that require write access such as journaling would return errors in a read-only media.
In checking with Google Gemini and MongoDB AI Chatbot, there’s a warning on data integrity & read performance degradation.
I’m wondering what’s the use case, if you can share.
This use case will have no write requests–the client will only ever read from the data.
Can you be more specific about what configuration changes may be required to make sure the server doesn’t error and stop working?
Hi @Nick_L1
While the WiredTiger engine can be configured for read only mongod
relies on functionality that is not provided in when running in this configuration.
An alternative may be using an union/overlay filesystem(overlay or aufs) in combination with the read only media. A quick test in my environment results in a working database.
The device will be read-only–union/overlay fs is not an option. What other side effects does mongod attempt that needs a place to be writeable? I need to be able to disable this.
This is not a matter of configuration changes, this would be a very large rewrite of MongoDB code base.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
Failed to start MongoDB Database Server [CentOS7] | 2 | 904 | May 2024 |
How to migrate MongoDB server from RHEL7 to RHEL8 | 2 | 596 | Sep 2024 |
How to upgrade MongoDB community edition on Windows Server | 1 | 247 | Aug 2024 |
Does MongoDB 7.0 really drop Windows 10 support? | 0 | 121 | Sep 2024 |
configuration details. E: Failed to fetch https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/8.0/InRelease 403 Forbidden | 0 | 63 | Nov 2024 |