<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 19, 2015 at 7:48 PM,  <span dir="ltr"><<a href="mailto:Taylor.Bertie@solnet.co.nz" target="_blank">Taylor.Bertie@solnet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
Apologises for the duplicate send, looks like my mail client doesn't create very clean HTML messages. Here is the message in plain-text. I'll make sure to send to the list in plain-text from now on.<br>
<div><div class="h5"><br>
In my current pre-production deployment we were looking for a method to live extend attached volumes to an instance. This was one of the requirements for deployment. I've worked with libvirt hypervisors before so it didn't take long to find a workable solution. However I'm not sure how transferable this will be across deployment models. Our deployment model is using libvirt for nova and ceph for backend storage. This means obviously libvirt is using rdb to connect to volumes.<br>
<br>
Currently the method I use is:<br>
<br>
- Force cinder to run an extend operation.<br>
- Tell Libvirt that the attached disk has been extended.<br>
<br>
It would be worth discussing if this can be ported to upstream such that the API can handle the leg work, rather than this current manual method.<br>
<br>
Detailed instructions.<br>
You will need: volume-id of volume you want to resize, hypervisor_hostname and instance_name from instance volume is attached to.<br>
<br>
Example: extending volume f9fa66ab-b29a-40f6-b4f4-e9c64a155738 attached to instance-00000012 on node-6 to 100GB<br>
<br>
$ cinder reset-state --state available f9fa66ab-b29a-40f6-b4f4-e9c64a155738<br>
$ cinder extend f9fa66ab-b29a-40f6-b4f4-e9c64a155738 100<br>
$ cinder reset-state --state in-use f9fa66ab-b29a-40f6-b4f4-e9c64a155738<br>
<br>
$ssh node-6<br>
node-6$ virsh qemu-monitor-command instance-00000012 --hmp "info block" | grep f9fa66ab-b29a-40f6-b4f4-e9c64a155738<br>
drive-virtio-disk1: removable=0 io-status=ok file=rbd:volumes-slow/volume-f9fa66ab-b29a-40f6-b4f4-e9c64a155738:id=cinder:key=<keyhere>==:auth_supported=cephx\\;none:mon_host=10.1.226.64\\:6789\\;10.1.226.65\\:6789\\;10.1.226.66\\:6789 ro=0 drv=raw encrypted=0 bps=0 bps_rd=0 bps_wr=0 iops=0 iops_rd=0 iops_wr=0<br>
<br>
This will get you the disk-id, which in this case is drive-virtio-disk1.<br>
<br>
node-6$ virsh qemu-monitor-command instance-00000012 --hmp "block_resize drive-virtio-disk1 100G"<br>
<br>
Finally, you need to perform a drive rescan on the actual instance and resize and extend the file-system. This will be OS specific.<br>
<br>
I've tested this a few times and it seems very reliable.<br>
<br>
Taylor Bertie<br>
Enterprise Support Infrastructure Engineer<br>
<br>
Mobile +64 27 952 3949<br>
Phone +64 4 462 5030<br>
Email <a href="mailto:taylor.bertie@solnet.co.nz">taylor.bertie@solnet.co.nz</a><br>
<br>
Solnet Solutions Limited<br>
Level 12, Solnet House<br>
70 The Terrace, Wellington 6011<br>
PO Box 397, Wellington 6140<br>
<br>
<a href="http://www.solnet.co.nz" rel="noreferrer" target="_blank">www.solnet.co.nz</a> <br>
<br>
Attention:<br>
This email may contain information intended for the sole use of<br>
the original recipient. Please respect this when sharing or<br>
disclosing this email's contents with any third party. If you<br>
believe you have received this email in error, please delete it<br>
and notify the sender or <a href="mailto:postmaster@solnetsolutions.co.nz">postmaster@solnetsolutions.co.nz</a> as<br>
soon as possible. The content of this email does not necessarily<br>
reflect the views of Solnet Solutions Ltd.<br>
<br>
<br>
</div></div>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div><br></div><div class="gmail_extra"><div class="gmail_default" style="font-family:monospace,monospace">​Hey Taylor,</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">This is something that has come up a number of times but I personally didn't have a good solution for it on the iSCSI side.  I'm not sure if your method would work with iSCSI attached devices because typically you need to detach/reattach for size changes to take effect, in other words I'm uncertain if libvirt would be able to see the changes.  That being said I also didn't know about this option in libvirt so it may work out.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">I'll let the Nova folks reply regarding interest from their side in the M release, but I know from the Cinder side and the Trove side this would in fact be a desireable feature.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Appreciate the detailed write up, and again WELCOME!!</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Thanks,</div><div class="gmail_default" style="font-family:monospace,monospace">John​</div><br></div></div>