Normally, Tilaa's automation (cloud-init) automatically resizes your partitions when you upgrade your VPS storage. However, on older servers or custom installations, you might need to perform this step manually.
Manipulating partition tables carries a risk of data loss. Please create a Snapshot before proceeding.
Step 1: Diagnose the issue
Check if your Operating System sees the new space, but isn't using it yet.
lsblk
Example Output:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 253:0 0 20G 0 disk └─vda1 253:1 0 10G 0 part /
In this example, the physical disk (vda) is 20G, but the partition (vda1) is only 10G. We need to grow the partition to fill the disk.
Step 2: Install growpart
To resize the partition safely, we use the growpart utility.
Ubuntu / Debian
apt update && apt install cloud-guest-utils -y
AlmaLinux / Rocky / CentOS
dnf install cloud-utils-growpart -y
Step 3: Extend the Partition
Run the following command to extend partition 1 on disk vda:
# Syntax: growpart
growpart /dev/vda 1
If successful, it will say "CHANGED: partition=1...".
Step 4: Resize the Filesystem
Now the partition is larger, but the filesystem inside it doesn't know that yet. The command depends on your filesystem type (ext4 vs xfs).
Check your filesystem type:
df -T /
Option A: If Type is ext4 (Debian/Ubuntu default)
resize2fs /dev/vda1
Option B: If Type is xfs (CentOS/RHEL default)
xfs_growfs /
Step 5: Verify
Check the disk space again. The size of the partition and the mount point should now match the disk size.
df -h /