Ask Your Question

resize disk down

asked 2014-06-25 13:34:15 -0500

granadol gravatar image

Can Openstack rezise instances down?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-25 15:20:20 -0500

mpetason gravatar image

Here's a blueprint discussing this:

The most relevant part:

Resize to a smaller disk can never work if the user already has more data than the new flavor allows - so for consistency any resize to a smaller flavour should be treated as an error.

The question is... will it let you do it via the API -- Maybe, but it should give you an error if it fails. This also may depend on the Hypervisor type and specific configuration options in nova.conf.

More helpful information:

edit flag offensive delete link more


I have just tried the resize. The hypervisor is KVM. There are errors but nothing that points to a failure. What options should exist in nova.conf to make it happen. No way I have more space because I just resized it up then tried to downsize it.

granadol gravatar imagegranadol ( 2014-06-25 15:25:49 -0500 )edit

So it resizes it down based on the flavor, but then the disk just stays the same. Is this the outcome you are seeing?

libvirt: logs it cannot resize to smaller and just keeps the larger disk
xen: tries to copy contents to a smaller disk, fails if too large
hyperv: always errors out if new disk size is smaller
powervm: silently keeps the larger disk
vmware: (couldn't find where migration code handled resize)

mpetason gravatar imagempetason ( 2014-06-25 15:27:37 -0500 )edit

It does nothing but error with instance not resizing, skipping migration. This happens very quickly and does not register in dashboard.

granadol gravatar imagegranadol ( 2014-06-25 15:32:35 -0500 )edit

Makes sense. You need to edit a few settings in your .conf to allow same host migrations, otherwise it's trying to migrate to other hosts. If you aren't using distributed storage then this fails due to an SSH session opening. Check your error logs for nova on the compute node the instance is on.

mpetason gravatar imagempetason ( 2014-06-25 15:35:58 -0500 )edit

allow_resize_to_same_host = False

Set to True. Restart service. It's trying to migrate the system to another host when you do a resize.

mpetason gravatar imagempetason ( 2014-06-25 15:36:54 -0500 )edit

No go. Same error. I cannot understand why.

granadol gravatar imagegranadol ( 2014-06-25 16:23:19 -0500 )edit

What errors do you see in /var/log/nova/compute.log on the compute node where the instance lives?

mpetason gravatar imagempetason ( 2014-06-25 16:35:30 -0500 )edit

Not too telling.

    2014-06-25 17:20:28.067 27632 WARNING nova.compute.resource_tracker [-] [instance: e4798c6e-bf95-4b73-b013-0f351ecb3c36] Instance not resizing, skipping mig$
2014-06-25 17:20:57.158 27632 ERROR oslo.messaging.rpc.dispatcher [-] Exception during message handling: Resize error: Unable to resize disk down.
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/", line 133, in _$
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/", line 176, in _$
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
2014-06-25 17:20:57.158 27632 TRACE oslo.messaging ...
granadol gravatar imagegranadol ( 2014-06-25 16:57:23 -0500 )edit

Your setup will not let you resize down then. Is there a reason you are wanting to resize down? Even with KVM if it went through successfully the disk size stays the same. If you want to actually change the hardware requirements you could look at making flavors that match the disk size but have different vcpu/memory.

Returning exception Resize error: Unable to resize disk down

mpetason gravatar imagempetason ( 2014-06-25 17:01:06 -0500 )edit

I want to reduce the ram and vcpu's. Can I create a flavor to do that? I am not certain why my KVM setup will not allow. Nothing special about the setup.

granadol gravatar imagegranadol ( 2014-06-25 17:06:07 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-25 13:34:15 -0500

Seen: 2,368 times

Last updated: Jun 25 '14