Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

448
Visualizações
what is /data/configdb path used for in mongodb?

I am running a docker of mongodb, and notice a volume created and mounted to /data/configdb. this is in addition to another volume mapped to /data/db which I know is where my actual data is stored.

I am trying to find out what is stored in /data/configdb, and searched google for it. surprisingly enough I didn't find anything explaining what is stored there.

what is stored there (/data/configdb), and can it be discarded everytime I restart my mongodb container?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

To summarize from the docs, config servers store the metadata for a sharded cluster, and /data/configdb is the default path where a config server stores its data files. So if you're not dealing with sharded clusters, removing any references to it should be ok.

From the docs:

--configsvr

Declares that this mongod instance serves as the config server of a sharded cluster. When running with this option, clients (i.e. other cluster components) will not be able to write data to any database other than config and admin. The default port for a mongod with this option is 27019 and the default --dbpathdirectory is /data/configdb, unless specified.

References:

https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/

https://docs.mongodb.com/v3.4/reference/program/mongod/#cmdoption-configsvr

Hope this helps!

over 4 years ago · Santiago Trujillo Relatório

0

I have deployed docker image of mongodb https://hub.docker.com/_/mongo on OpenShift it generated out of the box the deployment.yaml file which contains part with two volumeMounts:

 - mountPath: /data/configdb
   name: mongo-5-0-1
 - mountPath: /data/db
   name: mongo-5-0-2

When I want to use single not sharded database server and store my data into volume, this is how this part of deployment.yaml should look like

  volumes:
    - name: mongo-5-0-1
      emptyDir: {}
    - name: mongo-5-0-2
      persistentVolumeClaim:
        claimName: myVolumeName 
        

In image documentation it's mentioned that:

This image also defines a volume for /data/configdb for use with --configsvr (see docs.mongodb.com for more details).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda