Package: fdisk
Version: 2.38.1-5+deb12u1
X-Debbugs-Cc: [email protected]

When I create a new partition with +sectors, fdisk creates one
that is one sector too large:


Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-7814037134, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-7814037134, default 
7814035455): +2097152

Created a new partition 1 of type 'Linux filesystem' and of size 1 GiB.

Command (m for help): p
Disk /dev/sdb: 3.64 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000NM0245-1Z2
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: DDA88AFF-1E6A-7448-AB5A-85470938DBC7

Device       Start        End    Sectors  Size Type
/dev/sdb1     2048    2099200    2097153    1G Linux filesystem


I’ve only tested that with GPT at the moment.

Reply via email to