When your upgrade includes more storage, the VPS gets a larger virtual disk. The host stores that disk as a raw file on local storage, and Linux commonly sees it as /dev/vda. Linux may still need to expand the root partition and its ext4 filesystem to use the extra space.
Required first step: hard restart the VPS from the control panel. After support or your provider confirms the disk resize, open the VPS control panel. Use Stop, wait until the VPS is fully stopped, then select Start. A reboot from inside Linux, such as
sudo reboot, is insufficient for this step. Wait for the VPS to boot and confirm the new disk size withlsblkbefore resizing any partitions or filesystems.
Check the disk and root filesystem
Sign back in to the VPS after the control-panel restart and run these commands.
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
findmnt -no SOURCE,FSTYPE /
df -hT /
Some of our Linux images automatically expand both the root partition and its filesystem at boot. Compare the partition size in lsblk with the filesystem size in df -hT / before running any resize command.
- The partition and filesystem both grew. You’re done. For example, after a 30 GiB to 50 GiB upgrade,
lsblkmight show a 50 GiB disk with a 49 GiB root partition and a separate 1 GiB partition. Ifdf -hT /also shows about 49 GiB underSize, the filesystem already uses the expanded partition. - Only the root partition grew. If
df -hT /still shows the old size and your layout matches the ext4 example below, skipgrowpartand runsudo resize2fs /dev/vda1. - The disk grew and the root partition still shows its old size. Check the layout below, then follow Extend the root partition.
- The disk itself still shows its old size. Contact support before resizing.
For either manual path, confirm that findmnt shows /dev/vda1 mounted directly at / with the ext4 filesystem. If you see /dev/mapper/…, lvm, LVM2_member, or a different layout, contact support for guidance before resizing.
Extend the root partition
Back up your data before changing partitions. Continue only if there is unallocated space immediately after partition 1.
Install growpart if needed
growpart is the utility that extends the partition. A custom or minimal Linux installation may omit it. Check for it inside the VPS before running the resize commands.
command -v growpart
If this prints a path, continue to the partition step. If it prints nothing, install the package for your distribution inside the VPS.
Ubuntu or Debian
sudo apt update
sudo apt install cloud-guest-utils
AlmaLinux or Rocky Linux
sudo dnf install cloud-utils-growpart
Extend partition 1
Preview the change with growpart.
sudo growpart -N /dev/vda 1
If the preview shows the intended growth, apply it and check the new partition size.
sudo growpart /dev/vda 1
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
Grow ext4 and confirm the result
Once /dev/vda1 shows the new size, expand ext4 and confirm that Linux can use the extra space.
sudo resize2fs /dev/vda1
df -hT /
In the example, / can now use the expanded 49 GiB partition. The total shown by df may be slightly smaller because of filesystem overhead. The Avail column shows the space still free for your files.
Storage can only be expanded. Disk and filesystem shrinking and downgrades that require a smaller disk are currently unsupported.