<div dir="ltr">Theoretically impossible to reduce disk unless you have some really nasty guest additions.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 13, 2014 at 6:02 AM, Day, Phil <span dir="ltr"><<a href="mailto:philip.day@hp.com" target="_blank">philip.day@hp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div>
<p class="MsoNormal">Hi Folks,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I was looking at the resize code in libvirt, and it has checks which raise an exception if the target root or ephemeral disks are smaller than the current ones – which seems fair enough I guess (you can’t drop arbitary disk content on resize),
 except that the  because the check is in the virt driver the effect is to just ignore the request (the instance remains active rather than going to resize-verify).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It made me wonder if there were any hypervisors that actually allow this, and if not wouldn’t it be better to move the check to the API layer so that the request can be failed rather than silently ignored ?
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">As far as I can see:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">baremetal: Doesn’t support resize<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">hyperv: Checks only for root disk (<a href="https://github.com/openstack/nova/blob/master/nova/virt/hyperv/migrationops.py#L99-L108" target="_blank">https://github.com/openstack/nova/blob/master/nova/virt/hyperv/migrationops.py#L99-L108</a>  )<u></u><u></u></p>

<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">libvirt:     fails for a reduction of either root or ephemeral  (<a href="https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4918-L4923" target="_blank">https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L4918-L4923</a>
 )<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">vmware:   doesn’t seem to check at all ?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">xen: Allows resize down for root but not for ephemeral (<a href="https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L1015-L1032" target="_blank">https://github.com/openstack/nova/blob/master/nova/virt/xenapi/vmops.py#L1015-L1032</a>
 )<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It feels kind of clumsy to have such a wide variation of behavior across the drivers, and to have the check performed only in the driver ?<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></p>
<span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Phil<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</font></span></div>
</div>

<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Aryeh M. Friedman, Lead Developer, <a href="http://www.PetiteCloud.org" target="_blank">http://www.PetiteCloud.org</a><br></div>
</div>