If you want to change the disk size of your VPS instance, you will need to do it from your VPS provider’s settings, not from the RunCloud dashboard.

In most cases, RunCloud will automatically detect the new size of your VPS instance, and continue managing and monitoring it as usual. However, sometimes you may need to manually increase the volume of your disk.

This tutorial will show you how to check the disk space size, resize the partition, and resize the file system on RunCloud.

Warning: Resizing your VPS instance may involve some risks. Make sure you have a backup of your server before you proceed with any disk resizing. Also, some VPS providers may not allow you to downgrade your VPS size after you upgrade it.

Step 1: Check the Disk Space Size

To see how much disk space you have and how much is used, you can use the df -h command. This will show you the file system, size, used space, available space, percentage use, and mount point of each disk.

df -h

The /dev/root disk is the main disk that contains the root directory (/). You can see the size, space used, and available space of this disk, as well as the percentage of usage.

Step 2: Check the Partitions

To see how the disk is partitioned, you can use the lsblk command with sudo privileges. This will show you the name, major and minor number, removable flag, size, read-only flag, type, and mount point of each partition. For example:

sudo lsblk

Note down the name of your disk and partition. In the above example, the xvda disk has one partition (xvda1) that occupies the entire disk and is mounted on the root directory (/).

Step 3: Increase Disk Size

To increase the size of your disk, you will need to do it from your VPS provider’s settings. This will vary depending on which provider you use, but usually there is an option to resize or upgrade your disk in the dashboard or console. You can refer to your provider’s documentation for more details.

Step 4: Resize the Partition

After increasing the disk size from your VPS provider’s settings, you will need to resize the partition on your server to reflect the change. You can use the growpart command with sudo privileges to do this. You will need to specify the disk name (/dev/xvda) and the partition number (1) as arguments. For example:

sudo growpart /dev/xvda 1

After executing the above command, you should get an output similar to the following line.

CHANGED: partition=1 start=227328 old: size=41715679 end=41943007 new: size=62687199 end=62914527

This will extend the /dev/xvda1 partition to occupy the entire /dev/xvda disk.

Step 5: Resize the File System

After resizing the partition, you will need to resize the file system on it to make use of the extra space. You can use the resize2fs command with sudo privileges to do this. You will need to specify the partition name (/dev/xvda1) as an argument. For example:

sudo resize2fs /dev/xvda1

The above command will resize the file system on /dev/xvda1 to match the partition size, and produce an output similar to the following line:

resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
old_desc_blocks = 3, new_desc_blocks = 4
The filesystem on /dev/xvda1 is now 7835899 (4k) blocks long.

Step 6: Verify the File System Changes

To verify that the file system changes have taken effect, you can use the df -h command again to see if the available space has increased.

In the above example, you can see that the /dev/root disk now has a size of 30G instead of 20G. You can also see the updated disk size in the RunCloud dashboard.

Reference: https://medium.com/google-cloud/resize-your-persist-disk-on-google-cloud-on-the-fly-b3491277b718