mount your external disk to /workspace,
and create an folde for storing DB's data, and set the owner to mongodb
sudo mkdir /workspace/mongo_store
sudo chown -R mongodb:mongodb mongo_store
systemLog: | |
destination: file | |
path: "/var/log/mongodb/mongodb.log" | |
quiet: false | |
logAppend: true | |
net: | |
port: 27017 | |
bindIp: 0.0.0.0 | |
storage: | |
dbPath: "/workspace/mongo_store" | |
engine: wiredTiger |