Parted 没有可用的“调整大小”命令

16 linux hard-drive arch-linux ext4

我正在尝试使用 parted 调整分区大小,但它没有可用的“调整大小”命令

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
Run Code Online (Sandbox Code Playgroud)

我使用的是 Archlinux x86_64,这正常吗?

谢谢 !

zer*_*2cx 10

是的,这是正常的。

GNU 站点

Note that after version 2.4, the following commands were removed: check, cp,
mkfs, mkpartfs, move, resize.
Run Code Online (Sandbox Code Playgroud)

  • 绝对喜欢 gparted,但 gui 应用程序并不总是一种选择。 (7认同)
  • @azzid 我不知道这件事的原因,但移动分区 [block-by-block](http://superuser.com/questions/541067/how-to-move-a-partition-in-gnu -linux) 会工作。在我看来,这似乎是现在的首选方法。此外,我注意到可能有很多要求重新实施 [parted 的 `resizepart`](https://bugzilla.redhat.com/show_bug.cgi?id=807101#c16)。我已经检查过,在 3.2 版中可以使用 `resizepart`,所以就是这样。 (5认同)
  • 为什么?你应该如何移动一个分区? (4认同)
  • 当然可以,但我还是很好奇。为什么删除了功能? (3认同)
  • 这令人气愤。 (3认同)
  • @azzid 我会推荐图形实用程序 **GParted** 来完成移动现有分区的任务。有关开发人员的更多信息,请参阅 [此处的链接](http://gparted.org/livecd.php)。 (2认同)

小智 8

大多数现代操作系统现在都包含 parted 3.2 的 CHUI 版本,它resizepart改为:

(parted) resizepart 2 100%

你应该在你的包管理器中找到它。