Prerequisites
- A VPS with OnetSolutions
- Increased disk size (via upgrade)
- Root or sudo access
Extension Steps
1
Identify disk and partition
List available disks and partitions:Note the device name (e.g.,
/dev/vda) and partition number (e.g., 1 for /dev/vda1).2
Extend the partition
Use Replace
growpart to extend the partition:/dev/vda and 1 with your actual device and partition number.3
Verify partition extension
Run
lsblk again to confirm the partition shows the increased size.4
Resize the filesystem
Extend the filesystem to use the new space:Replace
/dev/vda1 with your actual partition.5
Verify the changes
Check disk space usage:Your partition should now show the increased size.
Installing Required Tools
The
growpart tool extends the partition, while resize2fs or xfs_growfs extends the filesystem to use the new space.growpart is not installed:
- Debian/Ubuntu
- CentOS/Rocky/Alma
Filesystem Commands
ext4 filesystem
ext4 filesystem
Most common Linux filesystem. Use
resize2fs:XFS filesystem
XFS filesystem
Default on CentOS/Rocky/Alma. Use
xfs_growfs:
