check using volume from list
openstack volume list
set status to available
to a volume
openstack volume set --state available [volume id]
resize the volume
openstack volume set --size 40 [volume id]
check size and status again
Openstack volume show [volume id]
status become in-use
, size become 40. It's attached to /dev/vda.
However, login into the vm, use df -h
check, didn't find /dev/vda
.
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 20G 1.8G 19G 9% /
devtmpfs 1.9G 0 1.9G 0% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm
tmpfs 1.9G 17M 1.9G 1% /run
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
tmpfs 379M 0 379M 0% /run/user/1000
Why it doesn't change?
Openstack just increases the physical disk size. You will need to use the operating system utilities to increase the disk space allocated to / for example.
I had a similar issue, and it was not clear for me how to resize the partition if you use an openstack volume. This did it for me:
Start with unmounting sudo umount /dev/sdb
Then make the system aware of the new size:
After that you can resize the volume
Finally mount the volume and check if the new filesize is set
I had exactly same issue. Than i found the solution, here's mine :
After you finally resize the Volume from Ceph (Like the question above)
Login to your VM
I wrote my prod case in here, https://nicolas.my.id/resize-root-volume-openstack-without-downtime/