Skip to content
4.6

Increasing the disk space of your VPS

When you choose a bigger VPS plan, your VPS's virtual disk grows. Whether the extra space is usable right away depends on how your VPS was installed.

VPS installed from the VPS screen (the default)

The System tab with the disk usage

After the plan change your VPS restarts automatically. During boot the system (cloud-init) grows the partition and file system automatically. You do not need to do anything. Check with:

df -h /

Not seeing the new size yet? Restart your VPS once more from the VPS screen, or do it manually as below.

Growing manually

First take a snapshot so you can go back if something goes wrong. Then log in as root.

  1. Look at the layout with lsblk. Your disk is usually called sda; find the partition holding /, for example sda1.
  2. Grow that partition with growpart /dev/sda 1 (the digit is the partition number). No growpart? Install it with apt install -y cloud-guest-utils or dnf install -y cloud-utils-growpart.
  3. Grow the file system. Check the type with df -T /:
    • ext4: resize2fs /dev/sda1
    • xfs: xfs_growfs /
  4. Check with df -h /.

Installed manually with LVM (for example an older AlmaLinux VPS)

If lsblk shows a line of type lvm below the partition, after step 2 run:

  1. pvresize /dev/sda2 (the partition holding LVM)
  2. lvextend -r -l +100%FREE /dev/mapper/almalinux-root (see the name in df -h /; -r grows the file system as well)

Stuck? Open a ticket and include the output of lsblk and df -h, and we will take a look.

Was this article helpful?

← Back to VPS hosting

One moment…

Set up your domains

For each domain, arrange the nameservers, the link to your hosting and who becomes the owner.

Loading your domains…