进入终端
# 执行parted
root@iStoreOS:~# parted
...
(parted) print
...
这里记住分区容量最大的那个分区序号3
(parted) resizepart
Partition number? 3
Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?
Yes/No? yes
End? [2551MB]? 120G
(parted) quit
Information: You may need to update /etc/fstab.
输入容量的时候如果你要扩容剩下的全部空间就输入比剩下空间大小大一些的数
# 执行resize2fs对文件系统进行扩容
root@iStoreOS:~# resize2fs -p /dev/sda3
# 执行df -h可以看到分区大小已经更新
root@iStoreOS:~# df -h
本文创建于:2021年02月17日,最后更新于:2024年01月13日,已超过 474 天没更新!内容可能已失效,请自行测试,失效请评论区反馈,谢谢啦~