Seperate DBs on different drives on the same server

Hello, I’m relatively new to Mongo.

I have installed and set up a database on MocOS (Silicon) using Homebrew.

I would like to set up a new project which will have a lot of data. I would ideally like to host the database on a seperate drive to the original installation ( above ) - I have a number of external drives attached.

There are probably two ways to achieve this:

  1. Launch a new MongoDB service with a different --dbpath and --port
  2. Edit the primary configuration file and set the location of the new database

Are you able to assist with the best approach and recommendations on the settings I need to make.

Thank you, Parmy

Hi @Parmy_Brar

I generally only use the command line options if I am:
a) Doing something with docker
b) Performing a maintenance operation
c) Doing a one-off quick test

The rest of the time my deployments are using configuration file. Its a good option for a long lived database as the options in the configuration are what are used after any reboot, service stop/starts. without resorting to the last command line that was run.

1 Like