[SERVER-12039] I want to enable oplog on standalone mongod server ,not for single node replica set. Created: 11/Dec/13  Updated: 12/Jul/18  Resolved: 11/Dec/13

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Rajnish Kumar Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12


Participants:

 Description   

Hi Team,
I want to enable oplog for a standalone mongod server not for creating a single node replica set and enable oplog .

like other RDBMS oracle,mysql ,we can enable binary log to a single node as well .
Please help me is there is any way to enable oplog for mongod server .



 Comments   
Comment by Ramon Fernandez Marina [ 12/Jul/18 ]

chiruuzumaki, please see Dan's last comment: you can configure a one-node replica set; see the documentation. You can also use mtools.

Regards,
Ramón.

Comment by chiranjeevi medicharla [ 11/Jul/18 ]

there is no use of adding true for me 

 

Comment by Daniel Pasette (Inactive) [ 10/May/16 ]

Hi mallikarjuna.siraguppi@hpe.com,
There is no way to set the --master flag using the yaml configuration files. You can use the legacy configuration file format if you need to set this option. For example, in your config file add the following line:

master=true

However, if you want to enable the oplog, you should be able to configure a single node replset as well, which would be the better approach.

Comment by Mallikarjuna Siraguppi [ 10/May/16 ]

I am using a YAML file as configuration file, and an error is thrown at the database start. MongoDB version 2.6
"Unrecognised option master: true"

Comment by Sasitha Sonnadara [ 07/Jan/16 ]

adding master: true in mongod.conf in mongodb 3.x doesn't work!!
can anybody help me with this?

Comment by Daniel Pasette (Inactive) [ 27/Sep/15 ]

you can just include the following in your config file:
master=true

Comment by Ashu Vashishat [ 27/Sep/15 ]

Hi Eliot

How can I get the same result using config file ?
I uncommitted following parameters :

replSet=rs0
oplogSize=1024

which is giving error in log file :
allocator: tcmalloc
2015-09-27T19:40:42.124+0530 I CONTROL [initandlisten] options: { config: "mongo_dbs/configs/oplogDemo_mongod.conf", replication:

{ oplogSizeMB: 1024, replSet: "rs0" }

, storage:

{ dbPath: "/home/lxg/mongo_dbs/oplog_demo" }

, systemLog:

{ destination: "file", logAppend: true, path: "/home/lxg/mongo_dbs/logs/mongod.log" }

}
2015-09-27T19:40:42.132+0530 I REPL [initandlisten] Did not find local replica set configuration document at startup; NoMatchingDocument Did not find replica set configuration document in local.system.replset
2015-09-27T19:40:42.132+0530 I CONTROL [initandlisten] now exiting
2015-09-27T19:40:42.132+0530 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2015-09-27T19:40:42.132+0530 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2015-09-27T19:40:42.132+0530 I NETWORK [initandlisten] shutdown: going to close sockets...
2015-09-27T19:40:42.132+0530 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2015-09-27T19:40:42.132+0530 I STORAGE [initandlisten] shutdown: final commit...

Comment by Rajnish Kumar [ 11/Dec/13 ]

Hi Eliot,
Its Working ,thanks

Comment by Rajnish Kumar [ 11/Dec/13 ]

Thanks For your Quick Response .

Comment by Eliot Horowitz (Inactive) [ 11/Dec/13 ]

You can use "--master" to get an oplog on a standalone server.

Generated at Thu Feb 08 03:27:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.