Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

resize instance to smaller flavor

Hello,

I'm thinking about resizing instance flavor to smaller so i made these steps:

  • Created instance 'test' with 20GB disk
  • Created snapshot of this instance
  • Downloaded snapshot to local disk
  • Mounted it as loop device
  • shrinked filesystem
  • shrinked partition
  • used qemu-img resize to shrink disk
  • uploaded file as image(now everything looks ok, disk size&partition size are smaller than original)
  • rebuilt instance using new image

and now there is a problem, when i rebuild actual instance with new, smaller image it have 20GB disk again(but partition is smaller). So I still can't change flavor to smaller because I'll see error saying that image size is bigger than new flavor.

Maybe someone know any workaround for shrinking instance size? I would be very grateful for any help.