I was able to get a solution for this problem on the mongoDB google group. Explicitly setting the oplogSize parameter in my config file solved the problem. By default, mongod tries to allocate 5% of the free space on the storage partition. I have my data on a very large shared disk and this seemed to be taking a long time. I manually set this value and the replica set came up quickly.
First, assuming you are actually specifying where to read the file from, make sure that you have permission read that file with the current user (cat /usr/local/Cellar/mongodb/2.4.6/mongod.conf
- or use less/vi/editor of choice). Assuming that works (and if it does not, adjust your permissions), then the next thing you need to do is make sure you are actually pointing at the correct file.
However, if you are not specifying where to read the file from, by default, if you just run mongod
using the brew installation it will attempt to read from:
/usr/local/etc/mongod.conf
I verified this by installing 2.4.6 with brew and then checking the logs when it starts up:
Tue Oct 22 17:17:30.695 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb", logappend: "true", logpath: "/usr/local/var/log/mongodb/mongo.log" }
You can either modify that file (/usr/local/etc/mongod.conf
) to look the way you want in your example, and make sure you have permissions to get to it, or you can run this instead to specify the original file:
mongod -f /usr/local/Cellar/mongodb/2.4.6/mongod.conf
Best Answer
You have to create a symbolic link that points to the new mountpoint:
Updated link about: Journal files