<div dir="ltr"><div id="">Online-extend volume feature aims to extend a cinder volume which is in-use, and make the corresponding disk in instance extend without stop the instance.</div><div id=""><br></div><div id=""><br>
</div><div id="">The background is that, John Griffith has proposed a BP ([1]) aimed to provide an cinder extension to enable extend of in-use/attached volumes. After discussing with Paul Marshall, the assignee of this BP, he only focus on OpenVZ driver currently, so I want to take the work of libvirt/qemu based on his current work.</div>
<div id=""><br></div><div id="">A volume can be extended or not is determined by Cinder. However, if we want the capacity of corresponding disk in instance extends, Nova must be involved.</div><div id=""><br></div><div id="">
Libvirt provides "block_resize" interface for this situation. For QEMU, the internal workflow for block_resize as follows:</div><div id=""><br></div><div id="">1) Drain all IO of this disk from instance </div><div id="">
2) If the backend of disk is a normal file, such as raw, qcow2, etc, qemu will do the *extend* work</div><div id="">3) If the backend of disk is block device, qemu will first judge if there is enough free space on the device, if only so, it will do the *extend* work.</div>
<div id=""><br></div><div id="">So I think the "online-extend" volume will need QEMU Assisted, which is simlar to BP [2]. </div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown"><br></div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown">
Do you think we should introduce this feature? </div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown"><br></div><div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown">[1] <a href="https://blueprints.launchpad.net/cinder/+spec/inuse-extend-volume-extension">https://blueprints.launchpad.net/cinder/+spec/inuse-extend-volume-extension</a></div>
<div id="aeaoofnhgocdbnbeljkmbjdmhbcokfdb-mousedown">[2] <a href="https://blueprints.launchpad.net/nova/+spec/qemu-assisted-snapshots">https://blueprints.launchpad.net/nova/+spec/qemu-assisted-snapshots</a></div></div>