简体   繁体   中英

relation between data/db and replicaset on mongodb

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM