Re: [mongodb-user] Understanding Mongo logging and paths of the log files

128 views
Skip to first unread message
Message has been deleted

मैं एक भारतीय बेवकूफ हूँ

unread,
Jul 15, 2012, 9:06:17 AM7/15/12
to mongod...@googlegroups.com
Indian idiot!

Praveen wrote:
> Hi All,
>
> Had some queries on journaling and logpath. Could you let me know if
> below understanding on logging and journaling is correct.
>
> When said --logpath this refers to the logfile where logs for the server
> is maintained (the logs we generally see on the console). If this option
> is specified then all the logs get written to the file, if not then all
> these are displayed on the console. Is this right?
>
> Seeing at journaling. How is this different from above mentioned
> logging? If I get it right, these journal files are temporary and will
> be deleted when there is a proper shutdown of the server. This will be
> created under the folder journal under the dbpath specifed. Correct?
> Will I be able to change this journaling path to a different directory
> (other than journal under dbpath)?
>
> Thanks
>
> Praveen
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

Praveen

unread,
Jul 15, 2012, 9:25:03 AM7/15/12
to mongod...@googlegroups.com
Hi All,

Sorry for reposting. Was trying to mark the messages and accidentally happened to delete my post. Here is my query.

1) How is logging in Mongo different from journaling?

2) Will I be able to specify a different path for journal logs, other than the default.

If I get it right, journal files are temporary and will be deleted when the server is shutdown properly, correct?

Thanks

Praveen

Praveen

unread,
Jul 15, 2012, 9:52:19 AM7/15/12
to mongodb-user
If you cannot understand the question, ask for clarification. If you
don't know the answer, do not answer.

Be approachable on forums.

If sentence in the response was your signature then change it, doesn't
go well.

Thanks

Praveen

On Jul 15, 6:06 pm, "मैं एक भारतीय बेवकूफ हूँ"
<iamanindianid...@googlemail.com> wrote:
> Indian idiot!
>
>
>
>
>
>
>

Stephen Steneker

unread,
Jul 15, 2012, 9:57:42 AM7/15/12
to mongod...@googlegroups.com
> Had some queries on journaling and logpath. Could you let me know if below understanding on logging and journaling is correct.

> When said --logpath this refers to the logfile where logs for the server is maintained (the logs we generally see on the console). If this option is specified then all the logs get written to the file, if not then all these are displayed on the console. Is this right?


Hi Praveen,

That is correct .. logging refers to the *informational* output you would normally see on stdout in the console:
 

> Seeing at journaling. How is this different from above mentioned logging?

Journalling is entirely different .. it is an important server feature for keeping track of the *data* changes for crash recovery and data durability:

In the event of a server crash or unclean shutdown, mongod will replay the journal entries on startup to recover to a consistent state.



> If I get it right, these journal files are temporary and will be deleted when there is a proper shutdown of the server. This will be created under the folder journal under the dbpath specifed. Correct?

Yes.

 
> Will I be able to change this journaling path to a different directory (other than journal under dbpath)?
 
There is no config option to change the journal path, and generally you should leave the journal and data files as-is.


It is possible to symlink the journal subdirectory to a different path before starting mongod (for example, if you had a dedicated hard drive for journal writes):

Cheers,
Stephen

Praveen

unread,
Jul 15, 2012, 10:12:38 AM7/15/12
to mongodb-user
Hi Stephen,

Thanks for the reply. It answers what I needed.

Will symlink my journal directory to have Journals written in a
different drive (yes, for performance improvement).

Thanks

Praveen
Reply all
Reply to author
Forward
0 new messages