我要评分
获取效率
正确性
完整性
易理解

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:

    1
    df -h /root
    

    or

    1
    lsblk
    
  • In this document, the /root directory is used for compilation and data mounting by default.