<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>
<div>
<span>
<br>
</span>
</div>
<div><span style="line-height: 22.4px;"><font size="2" style="font-size: 14px;">Hi melanie, thanks for your reply.</font></span></div><font size="2" style="font-size: 14px;">
</font><div style="font-family:'微软雅黑'">
<div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;"><br></font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">The version of my cinder and nova is Rocky. <span style="line-height: 1.6;">The scope of the cinder spec[1] </span></font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><span style="line-height: 1.6;"><font size="2" style="font-size: 14px;">is only for available volume migration between two pools from the same ceph cluster.</font></span></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">If the volume is in-use status[2], it will call the generic migration function. <span style="line-height: 1.6;">So that as you </span></font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><span style="line-height: 1.6;"><font size="2" style="font-size: 14px;">describe it, on the nova side, it raises NotImplementedError(_("Swap only supports host devices"). </font></span></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">The get_config of net volume[3] has not source_path.</font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;"><br></font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">So does anyone try to succeed to migrate volume(in-use) with ceph backend or is anyone doing something of it?</font></div><div style="font-size:14px; padding: 0; margin:0;line-height:14px;"><br></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">[1] <a href="https://review.openstack.org/#/c/296150" _src="https://review.openstack.org/#/c/296150" style="line-height: 1.6;">https://review.openstack.org/#/c/296150</a></font></div><div style="font-size:14px; padding: 0; margin:0;line-height:14px;">[2] <a href="https://review.openstack.org/#/c/256091/23/cinder/volume/drivers/rbd.py" _src="https://review.openstack.org/#/c/256091/23/cinder/volume/drivers/rbd.py" style="line-height: 1.6;">https://review.openstack.org/#/c/256091/23/cinder/volume/drivers/rbd.py</a></div><div style="font-size:14px; padding: 0; margin:0;line-height:14px;">[3] <a href="https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/volume/net.py#L101" _src="https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/volume/net.py#L101" style="line-height: 1.6;">https://github.com/openstack/nova/blob/stable/rocky/nova/virt/libvirt/volume/net.py#L101</a></div><div style="font-size:14px; padding: 0; margin:0;line-height:14px;"><br></div><div style="font-size:14px; padding: 0; margin:0;line-height:14px;"><br></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">Cheers,</font></div><div style="padding: 0px; margin: 0px; line-height: 14px;"><font size="2" style="font-size: 14px;">Boxiang</font></div></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/19/2018 22:39</span>,<a class="mail-to" style="text-decoration:none;color:#2a83f2;" href="mailto:melwittt@gmail.com">melanie witt<melwittt@gmail.com></a> wrote: </div>
</div>
<blockquote id="ntes-pcmail-quote" style="margin: 0; padding: 0; font-size: 14px; font-family: '微软雅黑';">
On Fri, 19 Oct 2018 11:33:52 +0800 (GMT+08:00), Boxiang Zhu wrote:<br> <blockquote class="mmbqc1">When I use the LVM backend to create the volume, then attach it to a vm. <br> I can migrate the volume(in-use) from one host to another. The nova <br> libvirt will call the 'rebase' to finish it. But if using ceph backend, <br> it raises exception 'Swap only supports host devices'. So now it does <br> not support to migrate volume(in-use). Does anyone do this work now? Or <br> Is there any way to let me migrate volume(in-use) with ceph backend?<br></blockquote><br>What version of cinder and nova are you using?<br><br>I found this question/answer on ask.openstack.org:<br><br>https://ask.openstack.org/en/question/112954/volume-migration-fails-notimplementederror-swap-only-supports-host-devices/<br><br>and it looks like there was some work done on the cinder side [1] to <br>enable migration of in-use volumes with ceph semi-recently (Queens).<br><br>On the nova side, the code looks for the source_path in the volume <br>config, and if there is not one present, it raises <br>NotImplementedError(_("Swap only supports host devices"). So in your <br>environment, the volume configs must be missing a source_path.<br><br>If you are using at least Queens version, then there must be something <br>additional missing that we would need to do to make the migration work.<br><br>[1] https://blueprints.launchpad.net/cinder/+spec/ceph-volume-migrate<br><br>Cheers,<br>-melanie<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><!--😀-->
</div>
</body>
</html>