Does anyone have any experience using directoryperdb? I can't find very many examples of its usage and would like to run my thought process past some knowledgeable people first :)
I've got a near terabyte database, and want to add another on a separate hard drive. I can't mess it up since reintegrating my data takes hours.
I currently have:
--dbpath as /home/mongo /hd/newhd
My process is as follows:
old and the new one new.mkdir /home/mongo/oldmv /home/mongo/* /home/mongo/old//home/mongo/new to /hd/newhd/newmongodb
vim /etc/mongod.conf ~ and set directoryperdb = true
new
Does this look OK? Will it just automatically recognize the new folders and continue as normal?
Edit1: According to this: https://groups.google.com/forum/?fromgroups=#!topic/mongodb-commits/frAjIDG08Mc the mongod.lock file should be in /home/mongo. What about the journal or _tmp directory?
OK so I took the plunge and it worked fine~! :)
I'm now successfully saving data into the new db symlinked to the second HDD.
The only edit is that don't bother moving the journal folder into the db sub-directories as it will just be recreated in the main --dbpath
Hopefully someone else will find this post useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With