I am running Mongo on Windows 10. Data access is made trugh Pymongo (Python). All my data is stored in an old large HDD, but I would like to have some smaller collection stored on a much faster SSD? When I create a new collection either trough Compass or Pymongo there is no option to specify the path on disk.
Is it possible to learn such power?
If you want to have databases in different disks under the same dbPath , this is the option:
Add the option --directoryperdb in the mongod config file or at startup.
db.createDatabase("newDatabase")
You will see inside the dbPath folder for the new database like: \dbPath\newDatabase
Stop the mongodb process.
Copy the content from \dbPath\neWDatabase to your SSD let say: ssd:\newData
make link to the folder with:
or follow this tutotial
Note: As suggested by @Wermfried in the comment it is safe to have the option --directoryperdb set initially in the member before to get populated ...