I was trying to create new partition from existing unallocated space on /dev/sda, but whenever I set the 'start and end', I get location outside of device error
. Below is the full output:
root@server01:/# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 2199GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 17.4kB 1049kB 1031kB bios_grub
1 1049kB 25.8GB 25.8GB zfs
25.8GB 25.8GB 3584B Free Space
3 25.8GB 36.5GB 10.7GB zfs
4 36.5GB 47.2GB 10.7GB zfs
5 47.2GB 1100GB 1052GB zfs
9 1100GB 1100GB 8392kB
1100GB 2199GB 1100GB Free Space
(parted) mkpart
Partition name? []? 10
File system type? [ext2]? zfs
Start? 1100GiB
End? 2199GiB
Error: The location 2199GiB is outside of the device /dev/sda.
(parted) mkpart
Partition name? []?
File system type? [ext2]? zfs
Start? 1100GiB
End? 2198GiB
Error: The location 2198GiB is outside of the device /dev/sda.
If I set the End?
as 100%, I'm able to create new partition. This leads to question on how to create multiple partitions if there is requirement to create 3 partitions with 100G, 500G and 500G.
Best Answer
Your disk has an end point of 2199GB. You are using GiB to set the size. GiB are larger than GB so 2199GiB is bigger than 2199GB and therefore beyond the end of the partition.
Use GB instead of GiB to set the size.