resizepart (Parted User’s Manual)
- Command: resizepart number end
endposition of partition
number. Note that this does not modify any filesystem present in the partition. If you wish to do this, you will need to use external tools, such as
When growing a partition you will want to grow the filesystem afterwards, but when shrinking, you need to shrink the filesystem before the partition.