Creating a Data Drive
Create a data directory to store MongoDB data files.
Run the following command to create a data directory:
1 2 |
mkdir /data mkdir -p /data/mongo |

- When compiling the database and mounting /data, ensure that the directory partition is equal to or greater than 50 GB.
Run the following command to check the size of the /root partition:
df -h /root
or
lsblk
- In this document, the /root directory is used for compilation and data mounting by default.
Parent topic: Configuring the Installation Environment