Skip to main content
After a disk upgrade, Linux sees the bigger disk but your partition and file system keep their old size. Extend the partition with sudo growpart /dev/vda 1, then grow the file system: sudo resize2fs /dev/vda1 for ext4, or sudo xfs_growfs / for XFS. Both can grow while the server is running. Check the result with df -h /.

Before you start

  • Take a backup first. Changing a partition table on a live disk is safe when done right, but a mistake can make the server unbootable. On a VPS, take a panel backup right before you start; also see back up a Linux server.
  • Connect with SSH. Commands use sudo; root users can leave it out.
  • Have a way in if SSH stops working: on a VPS, the VNC console and rescue mode; on a dedicated server, your KVM/IPMI console or a ticket.
  • If your root file system is on LVM (the TYPE column shows lvm), follow these steps up to the partition, then continue in use LVM on Linux.
Never delete and recreate a partition by hand unless you know the exact start sector. growpart only moves the end of the partition and keeps your data in place. Only grow: shrinking a partition below the size of its file system destroys data.

How to check that the disk is bigger

The disk (vda) is 160G, but the root partition (vda1) is still 79G. If the disk still shows the old size, reboot the server and check again. Your disk may be named differently: /dev/sda on SATA/SAS, /dev/nvme0n1 on NVMe (partition /dev/nvme0n1p1). On a VPS, the Storage page shows the disk size.

How to install growpart

How to grow the partition and file system

1

Preview the change

Note the space between the disk (/dev/vda) and the partition number (1). For NVMe use sudo growpart /dev/nvme0n1 1.
2

Grow the partition

NOCHANGE: partition 1 is size … it cannot be grown means there is no free space directly after the partition.
3

Check the file system type

4

Grow the file system

How to check it worked

The Size column now shows the larger size. No reboot is needed.

What if the root partition is not the last one?

growpart can only extend a partition into free space directly after it. If another partition, such as a swap partition, sits after root, growpart reports NOCHANGE. Options:
  • Leave root as it is and use the new space as a separate partition: create it with parted and mount it as in mount a new disk.
  • Remove the swap partition (turn it off with swapoff and remove it from /etc/fstab first), grow root, then use a swap file instead. Only do this with a fresh backup and console access.

Frequently asked questions

Do I need to reboot or unmount to resize?

No. ext4 and XFS both grow while mounted, including /. A reboot is only needed if the kernel does not see the new disk size yet.

Can I shrink an XFS file system?

No. XFS cannot be shrunk. ext4 can be shrunk, but only while unmounted, for example from rescue mode, and it is risky without a backup.

Why does resize2fs say “Nothing to do!”?

The partition has not been grown yet, or growpart failed. Run lsblk and check the partition size first.

I upgraded my plan but the disk is the same size. What now?

Reboot once and check lsblk again. If the disk is still the old size, check the Storage page or open a ticket.

VPS and dedicated server guides

Every guide in this section.

Use LVM on Linux

Extend a logical volume after growing the disk.

Mount a new disk

Format and mount extra disks.

Check disk space

Confirm the new free space.

VPS storage

See your disk size in the panel.

Checked against the official Red Hat Enterprise Linux 9 guide to increasing an XFS file system and the growpart and resize2fs manual pages on 4 November 2026; growpart, online xfs_growfs and offline resize2fs tested on Ubuntu 24.04 LTS using loop devices. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026