1. Check disk space
df -h
2. View available volume information
lsblk
3. Initialize the new volume
這個地方需要注意一下, 磁盤的格式, 比如我這裏是 xfs 有的是ext4 ext3。 可自行選擇
sudo mkfs -t xfs /dev/nvme2n1
4. Mount the volume
我這裏測試挂載到db, 可以直接挂載到根目錄下面
sudo mount /dev/nvme2n1 /db
5. Check the disk space
6. Check the UUID of the device
ls -al /dev/disk/by-uuid/
7. Check the disk type
df -T -h
8. Unmount the volume
umount -d /dev/nvme2n1
9. Expand the corresponding partition
sudo growpart /dev/nvme0n1 1
10. Expand the file system
sudo xfs_growfs /