On AWS-EC2 I got running FreeBSD 12.1-RELEASE-p10. Just recently, I wanted to add a real swap partition to the virtual drive, and therefore I increased the volume size from 20 to 21 GB. This worked out well, and I executed
Up to this point, everything looks quite right, doesn’t it?
Only when I want to add the swap partition:
No matter what -b and -s options I use on the command line, I see always the same result. There is even no space left on the device for a partition of 1M, and neither for a properly sized freebsd-ufs one. This is a complete surprise. I used gpart(8) quite a lot in the past and I never had a problem like this.
How can I resolve this?
gpart recover
, in order the partition scheme reflects the new size of the virtual drive:
Code:
# gpart show
=> 3 44040181 ada0 GPT (21G)
3 125 1 freebsd-boot (63K)
128 41942904 2 freebsd-ufs (20G)
41943032 2097152 - free - (1.0G)
Up to this point, everything looks quite right, doesn’t it?
Only when I want to add the swap partition:
Code:
# gpart add -t freebsd-swap ada0
gpart: index '3': No space left on device
How can I resolve this?