0%

Linux 磁盘扩容

Linux 磁盘扩容

1. parted

  1. 进入parted交互命令行
1
sudo parted
  1. 检查磁盘信息
1
(parted)print /dev/nvme0n1

3.扩容

1
2
3
4
(parted)resizepart 4
Warning: Partition /dev/nvme0n1p10 is being used. Are you sure you want to continue?
Yes/No? yes
End? [346GB]? 356GB
  1. 退出
1
2
(parted) quit
Information: You may need to update /etc/fstab.

2. 扩展文件系统

1
sudo resize2fs /dev/nvme0n1p10

3. check

1
df -h