Setting up MongoDB to work with two data directories

Aviad S.

I have a mongoDb machine with 1 TB drive (on AWS that is the limit). however I need to store more than 1 TB of data on this mongoDB setup, but it's not heavy on reads / write.

Is there a way to split the data directory to two mounts - two different directories? (instead of using LVM)

Stennie

You can use the directoryperdb configuration option so that each database's files are stored in a separate subdirectory, and then use different mount points depending on the volume you want to use.

This option can be helpful in provisioning additional storage or different storage configurations depending on the database usage (i.e. SSD or PIOPS for a database which is more I/O intensive, while using normal EBS storage for archival data).

Important caveats:

  • There is a highlighted note in the documentation for directoryperdb which shows how to migrate the files for an existing deployment.

  • If you separate your data files onto multiple volumes, this may change your Backup Strategy. In particular, if you are using filesystem/EC2 snapshots to get a consistent backup of a running mongod you can no longer do so if the data and/or journal files are on different volumes.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Setting up Git to work with two different computers

setting up fake data in mongodb for testing

Setting up solrcloud with data on two machines

Setting up MongoDB + Django

Setting up the correct work of the backgroundworker

Not able to find a file residing two directories up

path.join go up two directories

How to navigate two directories up ruby

Move files two directories up & delete directories afterwards, using wildcards

Setting up a script on an AMI box to create directories - vsftpd, pam, mysql

Spring Boot setting up MongoDB repository

Setting up proper MongoDB implementation in React app

Setting up MongoDB environment requirements for Parse Server

Is there any way for setting up mongodb as a server with vagrantfile?

Setting up min and max in chartjs did not work

Setting up golang to work with Python in GitHub

Setting up selenium to work with internet explorer

Setting up a Two Tiered User System in Django

Setting up two routers in home networking

Setting up Promise for two API calls in UseEffect

Setting Up Analytics eCommerce with two GTM properties

how do I find two parent directories up in perl?

How to link css files more than two directories up

Mock interface with setting up list of data

Core Data Setting Up Multiple managedObjectContexts

Setting up data structure for querying in Firebase

Kotlin Error When Setting Up Data Binding

What is the Minimum Setup Needed for Setting-up XDG Directories ($XDG_RUNTIME_DIR etc.)?

Trouble setting-up directories to compile from in Django-Assets / Webassets