Resize a volume
You can resize a volume while it's still attached to a virtual machine.
Before you can resize a volume, it must be attached to a VM. After the volume is resized, you must extend the partition and filesystem on it to utilize the new space. This operation is done from inside the operating system.
Resize the volume in the control panel
Navigate to Storage → Block storage. Click on the volume you want to resize.
Click Actions and select Resize volume. (Also note down the WWN; you'll need it later to expand the partition on the volume. You'll find the WWN under Attachment in the screenshot below.)

A new dialog box opens where you increase the size by dragging the slider. Once you are satisfied with the new size, click Update.

Resize the partition and filesystem
Now that the volume is resized, you also have to expand the partition and filesystem in the operating system to utilize the new space.
In Linux, you first need to grow the partition using growpart, then extend the filesystem using resize2fs.
These tools are pre-installed on most Linux distributions on Glesys. If growpart is not available, it can be installed using sudo apt install cloud-guest-utils in Debian and Ubuntu, or sudo dnf install cloud-utils-growpart in AlmaLinux.
Start by confirming that the volume has been increased, and confirm the WWN and the path.
The first step is to grow the partition with growpart. Here we'll use the WWN to make sure we are working on the correct volume. As we can see in the NAME column above, it's the first—and only—partition on the disk. Note that we specify the partition with a single digit after the path.
Another check with lsblk confirms that the partition has grown to the size of the volume.
However, the filesystem is still just 30GiB.
The last step is to resize the filesystem to match the partition.
Another check with df confirms that the filesystem has now also grown to use the entire volume.
Start a PowerShell terminal and run the following command (search for Terminal or PowerShell in the Start menu).
Execute Get-Disk and look for the WWN shown in the control panel and match it to a disk.
In this example, disk number 2 matches the WWN from the control panel.
Open Computer Management by searching for it in the Start menu.
Once inside Computer Management, select Disk Management under Storage. Right-click on the first partition on the disk from the previous step (in this example, disk 2). Select Extend Volume.

When the wizard starts, click Next.
In the next dialog window, leave the size as-is. This will use the entire space on the volume. Click Next.

On the last step, you'll see a summary. Click Finish to extend the partition if everything looks alright.

This partition is now extended to use the entire volume, as shown in the Disk Management tool. There is no free space after the partition. You can also verify that the drive under This PC is the correct size.

Start a PowerShell terminal and run the following command (search for Terminal or PowerShell in the Start menu).
To make sure Windows sees the new space on the volume, start by refreshing the storage cache.
Execute Get-Disk as below. Look for the WWN shown in the control panel and match it to a disk. Make sure that the disk recognizes the new extended size. In this example, the disk has been resized to 120GiB (disk2, in this example).
List the partitions on the disk matching the WWN (in our example, disk 2).
In this example, partition number 2 with the drive letter F is the one we want to expand (since it's the only "real" partition on the disk).
To expand the partition to utilize all the new space, you first have to get the maximum supported size of the partition and save that value to a variable. Then, you use that variable to expand the partition to its maximum value. Make sure you use the correct drive letter in the commands below.
Confirm that the partition has grown to the size of the volume.
Everything has worked out. The partition has grown to roughly 120GiB.
Last updated
Was this helpful?