Resize a volume
This tutorial describes steps to resize a Private Cloud Director block storage volume.
When using Private Cloud Director block storage volumes, it is possible to resize or extend a volume - both in use volume (live resize) as well as volume that is not currently in used can be resized.
What to Know Before Resizing a Volume
Regardless of how you resize the volume, it's important to note that resizing a volume at the block level does not automatically extend the file system inside the virtual machine. After the underlying block storage volume has been successfully resized, you must manually perform a file system resize operation within the virtual machine to utilize the newly allocated disk space.
Resizing a volume does not automatically extend the file system inside the VM. You must manually perform a file system resize within the VM to utilize the newly allocated space.
Resizing a Volume via UI
- Navigate to the Volumes option in the UI
- Select the volume that needs to be resized.
- Select 'extend' from the action bar.
- A popup will appear displaying available options for volume resize.
- Choose the desired volume size and click extend volume.
Resizing a Volume via CLI
It’s possible to increase the size of an attached volume using the following command:
openstack volume set --size <NEW_SIZE_IN_GB> <VOLUME_ID>
Verify that the volume resize operation has been completed successfully by checking the volume status:
openstack volume show <VOLUME_ID>
Live Volume Resize
You can also resize attached (in-use) volumes without detaching them, known as live volume extend.
Before performing a live volume resize, ensure the following steps are completed on all hosts:
Install lsscsi (if not already installed):
sudo apt install -y lsscsi
Restart the pf9-hostagent
service:
systemctl restart pf9-ostackhost
Once the pf9-hostagent
service is restarted you can use the openstack
CLI with the --os-volume-api-version 3.42
(required) to resize the attached volume.
openstack --os-volume-api-version 3.42 volume set --size <NEW_SIZE_IN_GB> <VOLUME_ID>
Replace <new_size_in_GB>
and <volume_id>
with the desired size and the volume ID:
Verify that the volume resize operation has been completed successfully by checking the volume status:
openstack volume show <VOLUME_ID>
Resizing the volume does not automatically extend the file system inside the VM. You must manually perform a file system resize within the VM to utilize the newly allocated space.
Log Files
See Log Files for locations of important log files, including the storage service logs.