我正在尝试使用 parted 调整分区大小,但没有可用的“resize”命令
gchain@archbogchain@archbook:~$ sudo parted /dev/sdb
GNU Parted 3.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) help
align-check TYPE N check partition N for TYPE(min|opt) alignment
help [COMMAND] print general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkpart PART-TYPE [FS-TYPE] START END make a partition
name NUMBER NAME name partition NUMBER as NAME
print [devices|free|list,all|NUMBER] display the partition table, available devices, free space, all found partitions, or a
particular partition
quit exit program
rescue START END rescue a lost partition near START and END
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
disk_set FLAG STATE change the FLAG on selected device
disk_toggle [FLAG] toggle the state of FLAG on selected device
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version display the version number and copyright information of GNU Parted
我正在使用 Archlinux x86_64,这是正常的吗?
谢谢 !
答案1
是的,这是正常的。
来自GNU 站点:
Note that after version 2.4, the following commands were removed: check, cp,
mkfs, mkpartfs, move, resize.
答案2
现在大多数现代操作系统都包含 parted 3.2 的 CHUI 版本,其具有resizepart
:
(parted) resizepart 2 100%
您应该在您的包管理器中找到它。
答案3
在尝试寻找类似问题的解决方案时遇到了您的问题。我设法调整了分区(和文件系统)的大小,虽然我不确定它是否仍然适合您,但我已将我的解决方案记录在要旨这可能会有所帮助。
归根结底,没有安装您想要调整大小的分区,通过删除分区然后重新创建它来调整分区大小以占用磁盘上的连续可用空间,然后运行resize2fs
以调整文件系统的大小。