# _____ ____ ____ ____
# | ___| __ ___ ___| __ ) ___|| _ \
# | |_ | '__/ _ \/ _ \ _ \___ \| | | |
# | _|| | | __/ __/ |_) |__) | |_| |
# |_| |_| \___|\___|____/____/|____/
#
That other BSD.
gpart show ada0
gpart delete -i $PARTITION_NUMBER $DISK
gpart resize -i $PART_NUM -s $NEW_SIZE -a 4k $DISK
gpart add -t $LABEL -a 4k $DISK
growfs /dev/${DEVICE}p${PARTITION_NUMBER}
ex. ‘ada0p3’How to rearrange partitions without corrupting data or wasting mor than 512MB? You have:
Swap is reportedly too small for you to complete building packages, but to enlargen your swap you will need to shrink the last partition (“4”) that is used for mounting the root filesystem.
The only feasible solution is to allow 1G of memory go to waste. Reduce the size of the root parition (“4”), and add a swap partition behind it, consuming the remaining disk space after reduction.