mongodb - Where are mongo replication settings stored? -


after complete reinstall of mongo, has still remembered replica set configuration before; has stored this?

i installed mongo on linux server, using our project's user account, directory owned user. set replication , had working fine. then, test out finer install points, removed whole mongo directory , did reinstall. entering mongo, found replication set before; appear mongo storing information somewhere.

i have checked several areas might have been holding replica set config:

  1. first, in mongo directory, deleted.
  2. in traditional linux structure owned root, project user not have root access , mongo, run same, should not either.
  3. the project user's home directory. have .dbshell file containing command line history, that. did not see other files there related.
  4. some location specified in mongo configuration. have 2 paths mentioned in there, 1 system log (systemlog.path) , other storage (storage.dbpath), , both point mongo directory, deleted.

does know mongo storing configuration information?

the replication data stored in local database in each node (as of mongodb 3.2.9). database contains information replica set, , contains oplog (the oplog.rs collection). replica set information stored in system.replset collection in local database.

the physical files database (and other databases) stored in dbpath directory, can configured using:

  • the --dbpath parameter when starting mongod
  • the storage.dbpath setting in configuration file

the default dbpath value /data/db

your replica set setting not retained if emptied dbpath directory. if find replication settings being retained, possible dbpath setting incorrect.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -