<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<style>
    font{
        line-height: 1.6;
    }
    ul,ol{
        padding-left: 20px;
        list-style-position: inside;
    }
</style>
<div style="font-family:微软雅黑,Verdana,"Microsoft Yahei",SimSun,sans-serif; line-height:1.6;">
    <div><div>
    <div>
        <span>
            <br>
        </span>
    </div>
    <div>
        <span>Great, Jon. Thanks for your reply. I am looking forward to your report.</span></div></div><div><span><br></span></div><div><span>Cheers,</span></div><div><span>Boxiang</span></div></div><div class="J-reply" style="background-color:#f2f2f2;color:black;padding-top:6px;padding-bottom:6px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin-top:45px;margin-bottom:20px;font-family:'微软雅黑';"><div style="font-size:12px;line-height:1.5;word-break:break-all;margin-left:10px;margin-right:10px">On <span class="mail-date">10/23/2018 22:01</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:jobernar@redhat.com">Jon Bernard<jobernar@redhat.com></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 14px; font-family: '微软雅黑';">
* melanie witt <melwittt@gmail.com> wrote:<br> <blockquote class="mmbqc1">On Mon, 22 Oct 2018 11:45:55 +0800 (GMT+08:00), Boxiang Zhu wrote:<br> <blockquote class="mmbqc2">I created a new vm and a new volume with type 'ceph'[So that the volume<br> will be created on one of two hosts. I assume that the volume created on<br> host dev@rbd-1#ceph this time]. Next step is to attach the volume to the<br> vm. At last I want to migrate the volume from host dev@rbd-1#ceph to<br> host dev@rbd-2#ceph, but it failed with the exception<br> 'NotImplementedError(_("Swap only supports host devices")'.<br> <br> So that, my real problem is that is there any work to migrate<br> volume(*in-use*)(*ceph rbd*) from one host(pool) to another host(pool)<br> in the same ceph cluster?<br> The difference between the spec[2] with my scope is only one is<br> *available*(the spec) and another is *in-use*(my scope).<br> <br> <br> [1] http://docs.ceph.com/docs/master/rbd/rbd-openstack/<br> [2] https://review.openstack.org/#/c/296150<br> </blockquote><br> Ah, I think I understand now, thank you for providing all of those details.<br> And I think you explained it in your first email, that cinder supports<br> migration of ceph volumes if they are 'available' but not if they are<br> 'in-use'. Apologies that I didn't get your meaning the first time.<br> <br> I see now the code you were referring to is this [3]:<br> <br> if volume.status not in ('available', 'retyping', 'maintenance'):<br>     LOG.debug('Only available volumes can be migrated using backend '<br>               'assisted migration. Falling back to generic migration.')<br>     return refuse_to_migrate<br> <br> So because your volume is not 'available', 'retyping', or 'maintenance',<br> it's falling back to generic migration, which will end up with an error in<br> nova because the source_path is not set in the volume config.<br> <br> Can anyone from the cinder team chime in about whether the ceph volume<br> migration could be expanded to allow migration of 'in-use' volumes? Is there<br> a reason not to allow migration of 'in-use' volumes?<br></blockquote><br>Generally speaking, Nova must facilitate the migration of a live (or<br>in-use) volume.  A volume attached to a running instance requires code<br>in the I/O path to correctly route traffic to the correct location - so<br>Cinder must refuse (or defer) a migrate operation if the volume is<br>attached.  Until somewhat recently Qemu and Libvirt did not support the<br>migration to non-block (RBD) targets which is the reason for lack of<br>support.  I believe we now have all of the pieces to perform this<br>operation successfully, but I suspect it will require a setup with<br>correct versions of all the related software.  I will try to verify this<br>during the current release cycle and report back.<br><br>-- <br>Jon<br><br> <blockquote class="mmbqc1"><br> [3] https://github.com/openstack/cinder/blob/c42fdc470223d27850627fd4fc9d8cb15f2941f8/cinder/volume/drivers/rbd.py#L1618-L1621<br> <br> Cheers,<br> -melanie<br> <br> <br> <br> <br> <br> <br> __________________________________________________________________________<br> OpenStack Development Mailing List (not for usage questions)<br> Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote><br>__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev<br></blockquote><!--😀-->
</div>
</body>
</html>