I don't know whether this is a bug or if I am missing something.
I wrote a wizard (web based) to setup a linux based system. Part of this is to partition the hard drive. I use parted for this.
Partitions created by parted are too big sometimes (filling up the remaining space of the device I am creating them on).
An Example:
root@xovoxbuilder:~# parted /dev/vda unit GiB print
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 5.00GiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 0.00GiB 0.50GiB 0.50GiB primary ext2 boot, raid
root@xovoxbuilder:~# parted /dev/vda unit GiB mkpart primary 0.5 4.0
Information: You may need to update /etc/fstab.
root@xovoxbuilder:~# parted /dev/vda unit GiB print
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 5.00GiB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 0.00GiB 0.50GiB 0.50GiB primary ext2 boot, raid
2 0.50GiB 5.00GiB 4.50GiB primary
As you can see the partition created is not from 0.5 to 4.0 as I wanted but from 0.5 to 5.0 what makes it exactly 1GiB to big.
Is this a bug?
Using parted 2.3.