<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
We did this something similar recently, we booted all instances from
Cinder volume (with "Delete on terminate" set) in an old platform.<br>
<br>
So we added our new Ceph storage to the old platform, removed
instances (updated delete_on_terminate to 0 in Nova DB).<br>
Then we issued a retype so cinder-volume performed a `dd` of the
volume from the old to the new storage.<br>
<br>
We then synced network/subnet/sg and started instances with same
fixed IP and moved floating IPs to the new platform.<br>
<br>
Since you only have to swap storage you should experiment with
powering off the instances and try doing a migrate of the volume<br>
but I suspect you need to either remove the instance or do some
really nasty database operations.<br>
<br>
I would suggest always going through the API and recreate the
instance from the migrated volume instead of changing in the DB.<br>
We had to update delete_on_terminate in DB but that was pretty
trivial (and I even think there is a spec that is not implemented
yet that will allow that from API).<br>
<br>
<div class="moz-cite-prefix">On 1/29/20 9:54 PM, Jean-Philippe
Méthot wrote:<br>
</div>
<blockquote type="cite"
cite="mid:13E45A51-9013-4F13-AE83-6DF08F2D6052@planethoster.info">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hi,
<div class=""><br class="">
</div>
<div class="">We have a several hundred VMs which were built on
cinder block devices as root drives which use a SAN backend. Now
we want to change their backend from the SAN to Ceph.</div>
<div class="">We can shutdown the VMs but we will not destroy
them. I am aware that there is a cinder migrate volume command
to change a volume’s backend, but it requires that the volume be
completely detached. Forcing a detached state on</div>
<div class="">that volume does let the volume migration take
place, but the volume’s path in Nova block_device_mapping
doesn’t update, for obvious reasons.</div>
<div class=""><br class="">
</div>
<div class="">So, I am considering forcing the volumes to a
detached status in Cinder and then manually updating the nova db
block_device_mapping entry for each volume so that the VM can
boot back up afterwards. </div>
<div class="">However, before I start toying with the database and
accidentally break stuff, has anyone else ever done something
similar? Got any tips or hints on how best to proceed?</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">
Jean-Philippe Méthot</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">
Openstack system administrator</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">
Administrateur système Openstack</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">
PlanetHoster inc.</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</blockquote>
<br>
</body>
</html>