0

I want to check my replicasets are working properly or not while oplog size is over(minimum 990 mb).

  1. How can I convert a standalone remote server to replica set.
  2. How can I fixed the oplogsize of replica set.
  3. How can I check my replicasets are working while oplog size is over.

Need a large collection of mongodb which is larger than 1GB.

I am facing problem to convert remotely hosted mongo standalone server to replica set. Can't set the size of oplog.

2 Answers2

0
  1. How can I convert a standalone remote server to replica set.

    See Convert a Standalone to a Replica Set

  2. How can I fixed the oplogsize of replica set.

    What do you mean by "fixed the oplogsize"?

    From Replica Set Oplog:

    The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases.

    Unlike other capped collections, the oplog can grow past its configured size limit to avoid deleting the majority commit point.

    The oplog maxsize is used to trigger truncate of oplog rather than a hard limitation of disk size.

  3. How can I check my replicasets are working while oplog size is over.

    Not relevant due to answer (2.)

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
  • 2. Actually I want to fixed the oplog size as by default it's value is 5% of the remaining storage of server. –  Mukit Feb 09 '23 at 09:09
  • You cannot fix the size. You can define a minimum size and a size when it is truncated. – Wernfried Domscheit Feb 09 '23 at 09:13
  • Rigth. Actually i want to define the size. –  Mukit Feb 09 '23 at 10:32
  • Then see [replSetResizeOplog](https://www.mongodb.com/docs/manual/reference/command/replSetResizeOplog/#mongodb-dbcommand-dbcmd.replSetResizeOplog) – Wernfried Domscheit Feb 09 '23 at 10:38
  • https://www.mongodb.com/docs/manual/reference/command/replSetResizeOplog/#mongodb-dbcommand-dbcmd.replSetResizeOplog , actually I tried this one. how I can make my aws mongodb database into replica set? or How I can make my romotely hoasted database into replica set and set oplogsize for that database. –  Mukit Mar 15 '23 at 06:07
0

I am facing problem to convert remotely hosted mongo standalone server to replica set. Can't set the size of oplog.

Prior to initializing replication, set replication.oplogSizeMB in the configuration file, and restart mongod.

Joe
  • 25,000
  • 3
  • 22
  • 44