Yes, you can extend the disk space of an instance that is already running.
The safest and most flexible way to do this requires multiple Volumes and a bit of planning.
Follow the steps below. You can find step-by-step guides to various sections here, in our documentation.
- Step 1: Create an instance.
- Step 2: Create an extra Volume and attach it to your new instance.
- Step 3: Create an LVM Volume group on the new disk:
vgcreate /dev/MyVG01 /dev/vdb
- Step 4: Create a Logical Volume on the new Volume group:
lvcreate -L +9G --name test MyVG01
- Step 5: Create an extra partition in the new Logical Volume:
mkfs -t ext4 /dev/MyVG01/test
mkdir /mnt/test; mount -rw /dev/MyVG01/test /mnt/test
- Step 7: Make a new Volume and attach it to the instance. Then, extend the Volume group:
vgextend /dev/MyVG01 /dev/vdc
- Step 8: Extend the Logical Volume:
lvextend -L +11G /dev/MyVG01/test
- Step 9: Resize the partition to its maximum size:
resize2fs /dev/MyVG01/test
Alternatively, you can use a quicker and riskier approach. It is possible to apply something akin to:
OS_VOLUME_API_VERSION=3.42 cinder extend <volume_id><SIZE_IN GB>see: https://docs.leaf.cloud/en/latest/volumes/Extending-a-bootable-volume.html
However, this solution runs the risk of causing data loss and is not recommended.