Shrink ext4 partition

We want a 10G partition therefore we need to resize the filesystem to a smaller size to something like 9G.

# e2fsck -f /dev/sda2
# resize2fs /dev/sda2 9G

Delete the partition and create a new one with 10 G size.

# cfdisk /dev/sda

Run resize2fs without size parameter

# resize2fs /dev/sda2



Shrink ext4 partition