Setting up journal path in mongod.conf ?

500 views
Skip to first unread message

A. Jalil @AJ

unread,
Sep 23, 2015, 4:21:27 PM9/23/15
to mongodb-user
Hi Team,

I am trying to setup <journal> path in mongod.conf but not sure what parameter name is called or whether mongo has one ?  For instance for data, mongo uses this parameter:
dbpath

and for mongo logs, it uses this parameter:
logpath

I am trying to find the parameter name for journal  ?

The goal is to separate the journal logs from data logs.. is this doable ?

Thanks.
@AJ
 

Stephen Steneker

unread,
Sep 23, 2015, 8:47:41 PM9/23/15
to mongodb-user
Hi AJ,

As at MongoDB 3.0, there is no configuration file for the journal path; MongoDB always looks for a "journal" directory in your configured dbPath.

You can, however, symlink the journal directory to another path on your filesystem or use a unix mount point. This is typically only done for performance reasons, since the journal files have different write characteristics (append-only files that get removed) vs data files (random access).

One important caveat for separating your data and journal directories: if your data and/or journal directories span multiple filesystems you can no longer use the common "snapshot" approach for backing up your MongoDB deployment. For backup strategies see: http://docs.mongodb.org/manual/administration/backup/.

Regards,
Stephen

A. Jalil @AJ

unread,
Sep 23, 2015, 9:16:11 PM9/23/15
to mongodb-user
Hi Stephen,

Yes, one of the reasons I wanted to separate journal logs from data is to improve performance - similar to what we do with Oracle Archive Logs, we always keep them on their own volume separating them from the data files.  I was trying to use the same concept, but to loose the ability to do snapshot is not a good trade off. The new system is being deployed on AWS, and as you know, AWS relies heavily in performing snapshots for databases backups. Our database is only about 100GB, so this is not crucial for now. But, backups/Snapshots are very critical for any production database.  

I appreciate the advice, glad you mentioned that. This is very critical item I am adding to my deployment plan..

Cheers.
@AJ
Reply all
Reply to author
Forward
0 new messages