Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to run MongoDB on an Amazon EC2 off the local drive and default folder and move all data files, log files, on mounted raid5 ebs drive. I have already tried both methods:

1- edit the /etc/mongodb.conf file to my new location 2- symlink the data folder

in both way mongodb still save their file in default path and nothing happen!!! What exactly should I do?!!! I install mongodb through couple of script as follow (with root account):

1-Install Directory:

ln -s /var/lib/mongodb $1/data
ln -s /var/log/mongodb $1/log

2- Setup Config file:

echo "dbpath=/var/lib/mongodb" >> /etc/mongodb.conf
echo "logpath=/var/log/mongodb/mongod.log" >> /etc/mongodb.conf
echo "logappend=true" >> /etc/mongodb.conf
echo "replSet=myrepl" >> /etc/mongodb.conf
echo "smallfiles=$SMALLFILES" >> /etc/mongodb.conf

3- Install Mongo:

apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' >> /etc/apt/sources.list.d/10gen.list
apt-get update
apt-get install mongodb-10gen=2.4.3
echo "mongodb-10gen hold" | dpkg --set-selections
share|improve this question
    
See if anything in here helps docs.mongodb.org/ecosystem/tutorial/… –  Timothy Makobu Jul 27 '13 at 22:07
add comment

1 Answer

Firstly, a note: do not use RAID 5, it's generally going to perform poorly (use RAID 10). It's also recommended in the AWS whitepaper.

Generally, you should post what your filesystem actually looks like now, what the contents of the config file are after the install, not the path you take to create them. What if your sym links are failing? What if the files already exist? etc.

You also don't mention how you copied the files from the ephemeral disk to EBS. Did that succeed? If so, then that is what should be entered into the mongod.conf file for dbpath

Basically, it's unclear what your problem is because you have not actually described it very well. If you clean up the question I will be happy to give more specific and explicit advice.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.