You can upgrade your server disk/plan if you need more storage and efficiency for your Cloud Servers via LayerPanel. This guide will help you to extend or resize an ext4 or XFS file system once you upgrade and can be a root partition configured with ext4 or XFS filesystem, but without LVM configuration.
Run the below command to check the current root disk capacity
# lsblk

You can see in the above output that the /
is mounted on /dev/vda3
and its size is 247G
. But the total disk is 300G
in this server.
The first step you need to do to expand the disk space is to install the necessary tools. Run the below command to install cloud utils.
On Ubuntu / Debian system, run the below command:
# apt -y install cloud-guest-utils gdisk
On CentOS system, run the below command:
# yum -y install cloud-utils-growpart gdisk

Now run the below command to extend your partition and it will resize partition 3
on /dev/vda
.
# growpart /dev/vda 3

Again, run the below command to Validate the changes and you can see here that /dev/vda3
is extended to 297G
.
# lsblk

Now run the below command to resize /
partition to fill all space.
For ext4 file system, run the below command:
# resize2fs /dev/vda3
For XFS file system, run the below command:
# xfs_growfs /

You can verify the new size using the below command.
# df -hT | grep /dev/vda
