使用 gparted 调整扩展分区的大小

r--*_*--k 5 partitioning gparted

我试图在包含扩展分区的硬盘的末尾向下移动一大块未分配的数据。我在一个live usb上做这些操作,下面的截图是在主系统上截取的,这就是为什么要挂载分区

这是我所在的州: 在此处输入图片说明

未分配的块应该下放到 sdb3 分区。

第一步没问题(删除初始分区,将数据块从开始扇区移到 sdb2 之后),但我无法调整 sdb4 分区的大小(因此该块继续其旅程)。

我认为GParted 不会调整扩展分区的大小是我的答案,但不幸的是 live cd 不使用交换分区 - 并且没有安装分区。GParted 失败

GParted 0.12.1 --enable-libparted-dmraid

Libparted 2.3

Move /dev/sdb4 to the left and grow it from 20.00 GiB to 79.96 GiB  00:00:00    ( ERROR )

calibrate /dev/sdb4  00:00:00    ( SUCCESS )

path: /dev/sdb4
start: 398,381,054
end: 440,322,047
size: 41,940,994 (20.00 GiB)
move partition to the left and grow it from 20.00 GiB to 79.96 GiB  00:00:00    ( ERROR )

old start: 398,381,054
old end: 440,322,047
old size: 41,940,994 (20.00 GiB)
requested start: 272,631,808
requested end: 440,319,999
requested size: 167,688,192 (79.96 GiB)
libparted messages    ( INFO )

Unable to satisfy all constraints on the partition.
========================================
Run Code Online (Sandbox Code Playgroud)

r--*_*--k 3

反映了 Nattgew 的评论,设法解决了我的问题。

由于无法通过 gparted 移动扩展分区,因此必须扩展它,然后移动内部分区,然后在另一侧缩小它。

问题是分区被设置为与 MiB 对齐,在占用可用空间后,它在右侧变得不对齐,在另一侧留下了一小块数据。这就是“未满足的约束”,删除与 MiB 对齐的约束解决了这个问题,因为它没有离开块并且可以正确扩展