What this is
This guide explains the typical steps to expand a Linux VPS disk after your provider increases the disk size.
What it is for
- Fix “disk full” situations
- Add storage for websites, databases, or backups
Prerequisites (important)
- Your VPS provider has already increased the disk size (control panel action)
- Snapshot/backup recommended (disk operations are risky)
- SSH access + sudo
Step-by-step (generic, common case)
Step 1) Check current disk and partitions
lsblk
sudo fdisk -l
What it does: Shows disks, partitions, sizes.
Step 2) Confirm the OS sees the new disk size
lsblk
Expected result: The main disk (example: /dev/sda or /dev/vda) shows the new larger size.
Step 3) Extend the partition (cloud-utils growpart)
Install growpart:
Ubuntu/Debian:
sudo apt update
sudo apt install -y cloud-guest-utils
RHEL-based:
sudo dnf install -y cloud-utils-growpart
Extend partition example (disk /dev/sda, partition 1):
sudo growpart /dev/sda 1
Expected output: It reports the partition was grown.
Step 4) Resize the filesystem
First, identify filesystem type:
df -T /
If ext4
sudo resize2fs /dev/sda1
If xfs
sudo xfs_growfs /
Step 5) Verify new free space
df -h
Expected result: The / filesystem shows more available space.
Warnings & notes
- Disk/partition names can differ (
/dev/vda,/dev/nvme0n1). - If you use LVM, steps are different (needs PV/LV resize). Do not guess.
Final verification
lsblk
df -h
Conclusion
You expanded your VPS disk safely in the common scenario. If your layout uses LVM or multiple disks, follow an LVM-specific guide.