Quick answer: After a disk upgrade the virtual disk is bigger, but the partition and filesystem inside your OS usually still need growing: growpart /dev/vda 1 then resize2fs /dev/vda1 (ext4) or xfs_growfs / (XFS). Check with df -h before and after.

Overview

A disk has three layers: the virtual disk (grown by the upgrade), the partition table, and the filesystem. Many OS templates grow the last two automatically at boot (cloud-init); when that doesn't happen, two commands finish the job. Take a backup first — partition operations are safe in the normal case but unforgiving of mistakes.

Before you start

  • The disk upgrade is paid and applied, and the VPS rebooted.
  • A fresh backup of important data.
  • Root SSH access; cloud-guest-utils (Ubuntu/Debian) or cloud-utils-growpart (Alma/Rocky) installed for growpart.

Step-by-step guide

  1. See the layout — confirm the disk grew but the partition didn't:
    lsblk
    df -h
    Typical VPS disk is /dev/vda with the root partition /dev/vda1 (sometimes /dev/sda).
  2. Grow the partition (note the space between disk and partition number):
    apt install -y cloud-guest-utils     # Ubuntu / Debian, if growpart is missing
    growpart /dev/vda 1
  3. Grow the filesystem. Find the type with lsblk -f. For ext4:
    resize2fs /dev/vda1
    For XFS (default on AlmaLinux/Rocky) — grow by mount point:
    xfs_growfs /
  4. Verify:
    df -h /

Common issues

  • NOCHANGE: partition ... is size ...? The partition is already grown — go straight to the filesystem step.
  • Using LVM? The chain is longer: growpartpvresize /dev/vda2lvextend -r -l +100%FREE /dev/mapper/your-root (the -r also grows the filesystem).
  • df still shows the old size? You grew the partition but not the filesystem — run step 3.

When to contact support

Not comfortable resizing a live disk, or the layout looks unusual (multiple partitions, custom LVM)? Open a support ticket — we'd rather help than have you lose a filesystem.

Frequently asked questions

Why is the disk bigger but df shows the old size?

The virtual disk grew, but the partition and filesystem must be expanded inside the OS: growpart, then resize2fs (ext4) or xfs_growfs (XFS).

Is growing a filesystem safe on a live server?

Online growth of ext4 and XFS is routine and safe in the normal case, but always take a backup first.

Can I shrink a disk the same way?

No — shrinking is not automatic and XFS cannot shrink at all. Free the space and open a ticket to discuss a downgrade.

Related articles

Need a hand? Contact Cloud2Y support →

Was this answer helpful? 0 Users Found This Useful (0 Votes)