I'm trying to resize the partition in such a way that exactly fits for a 4 MiB Physical Extents. This means that the partition sectors must add up to an exact number to fit this criteria. By doing this, I can convert the partition to a LVM partition.
The partition right now looks like this:
sudo fdisk -l /dev/sda
Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9A97A1D8-0BC8-494B-9B88-1EC4F8AAE7CE
Device Start End Sectors Size Type
/dev/sda1 2048 512000 509953 249M BIOS boot
/dev/sda2 999424 65107967 64108544 30.6G Linux filesystem
/dev/sda3 65107968 67106815 1998848 976M Linux swap
I'm using a spreadsheet I made to see what size the partition needs to be. The partition right now is:
Sectors |
Bytes |
MiB |
PE |
64108544 |
32823574528 |
31303 |
7825.75 |
So I need to round it down to 7825 PE so it becomes:
Sectors |
Bytes |
MiB |
PE |
64102400 |
32820428800 |
31300 |
7825 |
Resizing it in GParted from 31303 MiB to 31300 MiB doesn't work. It becomes 31299 MiB.
Maybe there is some basic knowledge I just don't know of? Atleast I would expect GParted to not give an option to resize between 1-3 MiBs.
Same applies to resize2fs.
What is the reason this is not possible with GParted?
Is there any way to partition the size by 1 or 3 MiBs at all?