[openstack-dev] Resize behavior with smaller disk across hypervisors

John Garbutt john at johngarbutt.com
Tue Apr 16 14:45:47 UTC 2013


Hi,

Just to expand on the XenAPI case. We actually do a sparse copy of the
disk to a new VHD file, after resizing the filesystem.

For the case where the disk is too big to resize down the filesystem,
I am currently looking at using Instance Actions to start recording
the error and doing some better rollback to restore the users server
into a working state:
https://review.openstack.org/#/c/24666/

Hope that is useful,
John

On 12 April 2013 14:13, Michael J Fork <mjfork at us.ibm.com> wrote:
> While digging into https://bugs.launchpad.net/nova/+bug/1163844 concerning
> the Hyper-V driver, I noticed the behavior when the disk shrinks is
> inconsistent across all the hypervisors.
>
> 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)
>
> The only mention in the API guide -
> http://docs.openstack.org/api/openstack-compute/2/content/Resize_Server-d1e3707.html
> - is "scaling the server up or down."
>
> What is the * expected * behavior here?  For metering reasons, my thought is
> that if the disk cannot be sized down an error should be thrown and that the
> libvirt and powervm should be modified.  One issue with this approach is how
> we expose to the end-user what happened, I don't believe the ERROR state has
> any details.  Additionally, auto-reverting the resize has the same side
> effect.  I would like to explore standardizing the behavior in Havana,
> documenting in the API guide, and sync'ing in the hyperivsors.
>
> Thanks.
>
> Michael
>
> -------------------------------------------------
> Michael Fork
> Architect, OpenStack Development
> IBM Systems & Technology Group
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list