Score:0

Import exisiting Logical Volume into Openstack

gb flag

My Openstack (Microstack on Ubuntu) got screwed up and I had to reinstall it. Putting a backup of the Openstack config back in place didn't work so have to start "fresh".

The problem now is: I have my LV group "cinder-volumes" with all its Logical Volumes. But I can't seem to find a way to "import" these existing volumes into Openstack.

  ACTIVE            '/dev/ubuntu-vg/ubuntu-lv' [<110.29 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/cinder-volumes-pool' [442.47 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-67c6131b-027c-4630-9e7b-28fc58bba5b7' [1.00 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-a97cb400-0d75-4e63-970f-aee85e9cf765' [20.00 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-6dcec4d1-fe28-431d-b5b6-6486d0fb2c0e' [20.00 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-d370bd24-48de-43c5-be5e-2b69587e1679' [20.00 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-1414d413-39d6-4c54-abc6-4ecf1a2fe1bf' [20.00 GiB] inherit
  inactive          '/dev/cinder-volumes/_snapshot-77b443bf-22e9-4062-aeaa-82c6802c0930' [20.00 GiB] inherit
  ACTIVE            '/dev/cinder-volumes/volume-0ffb52ac-f3d4-4269-b385-18b812ecddac' [<3.91 TiB] inherit
  inactive          '/dev/cinder-volumes/_snapshot-1af42d15-bce8-440b-a478-a0789a824dbc' [<3.91 TiB] inherit

The goal is to create new instances with these existing LV.

Is there a way to do this please?

EDIT: I do have recent sql database backups of Openstack.

Thank you

us flag
You could look into the `cinder manage` command to make existing volumes known to openstack. I have done this with ceph storage backend, I'm not sure if and how it works with LVM based volumes.
Nephews avatar
gb flag
Thanks @eblock I did find some documentation on this procedure with CEPH but unfortunately not with LVM. I am amazed that not more people have (had) this issue. My next route will be to analyze the DB and see if I can put in some manual rows in the cinder tables with the right info. But I don't really like this approach.
berndbausch avatar
us flag
I found instructions for [Pure Storage](https://blog.purestorage.com/purely-technical/hints-on-using-cinder-manage-with-openstack-newton-and-later/) and [Netapp](https://community.netapp.com/t5/OpenStack-Discussions/Cinder-manage-command/td-p/127839). The LVM backend is not for production use, which might explain why you have not found LVM instructions, but nothing prevents you from trying anyway.
Nephews avatar
gb flag
Thank you @berndbausch especially the Pure Storage page seems very interesting. I didn't realize there was a difference between "cinder manage" and "cinder-manage". I'll look into it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.