MongoDB deployments only require that a data and log directory (textual logging for debug and troubleshooting) be created on each system where the instances will run.
Microsoft Windows
For Microsoft Windows environments this can be specified during the installation process as per the below image. Prior to installation a data and log volume should be created on FlashArray, connected to the MongoDB host , formatted with a filesystem and mounted at the required location. The Data and Log directory can be located anywhere as long as the correct user permissions are set on the drive or mount point.
Linux
When installing MongoDB in Linux it will typically create the log and data directory at the following default locations :
- Data - /var/lib/mongo
- Log /var/log/mongodb
These locations are preset in the MongoDB configuration file under the systemLog and storage areas :
# where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# where to write
storage:
dbPath: /var/lib/mongo
journal:
enabled: true
These locations can be changed as required. Prior to starting a MongoDB instance the relevant data and log volumes should be create on FlashArray , connected to the MongoDB hosts , formatted with a filesystem , mounted with the relevant options and be owned by the appropriate MongoDB user (default is mongod).