[SOLVED] Undo Resize Disk Possible?

mpizzolo

Member
Oct 15, 2019
18
0
21
50
Hello,

Is there a good way of rolling back a resize disk if the storage is Ceph rbd, the VM is Windows, and the space has not yet been allocated to the disk from an OS perspective? The intended future full size of disk was specified instead of the amount to grow it by accidentally. Nothing beyond the GUI resize has been performed.

Thanks,
 
By using rbd resize --allow-shrink --size <size> <disk image>

For example, setting the size of vm-100-disk-0 in pool rbd to 10G:
Code:
rbd -p rbd resize --allow-shrink --size 10G vm-100-disk-0

Be careful and if in doubt, leave a little bit more space to avoid cutting of any actual data.
 
  • Like
Reactions: Moayad
By using rbd resize --allow-shrink --size <size> <disk image>

For example, setting the size of vm-100-disk-0 in pool rbd to 10G:
Code:
rbd -p rbd resize --allow-shrink --size 10G vm-100-disk-0

Be careful and if in doubt, leave a little bit more space to avoid cutting of any actual data.
 
Thanks Aaron, I didn't get to update yet but we found the same command from Ceph documentation and it seemed to work for us. Appreciate your response.
 
Good to hear. I went ahead and marked the thread as solved so other people who might search for the same can see that there is an answer :)