0

i'm beginner on mongodb and i have a question when you install mongodb you have to create a folder /data/db because the data is stored on /data/db. And on the replicaset you cerate many folder when you have primary replica arbiter etc... My question is /data/db the is always a primary server or we use it just to install mongod. when you create a replicaset where the data is srpred? i'm confused i can't understand the goal of data/db and if is necessary or not.

Amal Kostali Targhi
  • 907
  • 3
  • 11
  • 22

1 Answers1

2

dbpath: /data/db is the value to designate a directory for the mongod instance to store its data, you can specify another location either by the cmd line or conf file. So each repset member will run it's own mongod process and have it's own dbpath