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

Creating a Data Drive

To meet data storage requirements, a data drive needs to be created for larger data storage capacity.

  1. Create a file system. XFS is used as an example. In the following command, /dev/nvme0n1 varies according to the actual drive name.
    1
    mkfs.xfs /dev/nvme0n1
    

    If a file system has been created for the drive, an error will be reported when you run the command. The -f parameter can be used to forcibly create a file system.

    1
    mkfs.xfs -f /dev/nvme0n1
    
  2. Create a data directory.
    1
    mkdir /data
    
  3. Mount the drive.
    1
    mount /dev/nvme0n1 /data
    
  4. Open the /etc/fstab file.
    vi /etc/fstab
  5. Press i to enter the insert mode and add the following content to the end of the file:
    /dev/nvme0n1            /data                      xfs     defaults        1 2

    The following page is displayed after the modification:

  6. Press Esc, type :wq!, and press Enter to save the file and exit.