I am editing the configuration of running mongodb in an 'amazon ubuntu instance' (with more than 30 GB data), and I attached some volumes for data, log, and journal
I followed mongodb-ec2:
- formatted the volumes
- mounted /data , /log and /journal
- stop mongodb
- edit /etc/mongodb.conf
- copy all files from old dir to new mount volumes.
start mongodb For testing I run a python script,
from pymongo import MongoClient db = MongoClient().my_testdb
I got the error message,
ymongo.errors.ConnectionFailure: could not connect to localhost:27017: [Errno 111] Connection refused.
So remove the lock from the /data/mongod.lock.
sudo mongod --repair
The following error I got. ..........
ERROR: dbpath (/data/db/) does not exist
My question is, even though I configured dbpath=/data, why does it try to look for the path /data/db? How can I resolve it?