Expanding a Volume
If you would like to increase the size of a volume on a VM, you can do so by expanding the volume and then resizing the filesystem on the volume.
WARNING: Volumes can only be expanded, not shrunk. Make sure to back up any important data before expanding a volume.
To expand a volume on a VM:
Navigate to "Virtual Machines" in the left-hand menu.
Find the VM you want to expand a volume on and click "Manage".
Click on the "Edit Volumes" button.
Click on the "Edit" button next to the volume you want to expand and input the new size for the volume or use the slider to adjust the size.
Click "Save" to expand the volume.
Your VM will be stopped while the volume is being expanded, and will be started again once the volume has been expanded.
Check the box that ensures that you have read that your VM will be powered off and click "Confirm".
Once the volume is expanded, you will be notified and will be taken back to the VM detail page.
The filesystem on boot volumes is resized automatically. If the boot volume is expanded, no commands need to be run after the VM comes back up.
When a data volume has been expanded, you will need to resize the filesystem on the volume to make use of the additional space:
# List the available volumes
lsblk
# Expand the partition on the volume (replace /dev/vdb with the appropriate device name if different)
sudo growpart /dev/vdb 1
# Resize the filesystem on the volume
sudo resize2fs /dev/vdb1
Updated 7 months ago