Skip to main content
All CollectionsVPSVPS Management
How to Increase VPS Partition Size
How to Increase VPS Partition Size

Maintaining a properly sized VPS

Updated over 10 months ago

Upgrading your VPS plan typically comes with an increase in disk space.

However, if your disk is full at the time of the upgrade, the new space may not be automatically allocated to your partitions. This guide will walk you through the process of manually increasing your VPS partition size, specifically /dev/sda1, using the parted command.

Step 1 — Log In to Your VPS

Connect to your VPS via SSH as the root user. Ensure you have a stable internet connection to prevent disconnection during the process.

Step 2 — Check the Current Disk Usage

Before making any changes, check the current disk usage using this command:

lsblk

This command shows the size and usage of your file systems. Note the usage of /dev/sda1 to confirm the need for expansion.

Step 3 — Resize the Partition

Start parted on your disk:

parted /dev/sda

Once in parted, resize the partition. First, print the current partition table to identify the partition number:

print

Assuming /dev/sda1 is the partition you're expanding and it's the first partition, resize it with this command:

resizepart 1

When prompted, enter the new size you wish to allocate to the partition or enter End to use the maximum available space.

Step 4 — Resize the Filesystem

After resizing the partition, you'll need to resize the filesystem to make use of the additional space. For ext4 filesystems, use:

resize2fs /dev/sda1

For other filesystems, such as xfs, use the appropriate tool (e.g., xfs_growfs for XFS filesystems).

Step 5 — Verify the Changes

Use the lsblk command again to verify that the filesystem has been successfully resized and now reflects the new size.

Manually increasing your VPS's partition size after a plan upgrade ensures that you can utilize the full extent of the resources you're paying for. This process, while technical, can be completed efficiently with the parted command and careful execution of each step. Always remember to back up your data before proceeding with any disk operation to safeguard against data loss.

Did this answer your question?