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
TYPEcolumn showslvm), follow these steps up to the partition, then continue in use LVM on Linux.
How to check that the disk is bigger
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
- Ubuntu / Debian
- AlmaLinux / Rocky / Fedora
How to grow the partition and file system
1
Preview the change
/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
- ext4
- XFS
How to check it worked
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
partedand mount it as in mount a new disk. - Remove the swap partition (turn it off with
swapoffand remove it from/etc/fstabfirst), 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, orgrowpart 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 checklsblk again. If the disk is still the old size, check the Storage page or open a ticket.
Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026