cmusatyalab / elijah-openstack

Elijah OpenStack integration
http://elijah.cs.cmu.edu/
Apache License 2.0
27 stars 26 forks source link

LVMolumeDriver -3.0.0 (config name lvmdriver-1) driver is uninitialized. #8

Open subinjp opened 7 years ago

subinjp commented 7 years ago

I started working on cloudlets,an openstack extension project.I have experienced error while installing openstack extension in my ubuntu system. When I tried to execute ./rejoin-stack.sh I experienced an error as follows. ($ cd ~/devstack $ ./unstack $ ./rejoin-stack.sh) issue WARNING cinder.volume.manager [req-857e6c72-9d99-4dec-8a41-016ebe935b53 None None] Unable to update stats, LVMVolumeDriver -3.0.0 (config name lvmdriver-1) driver is uninitialized. How to solve this problem?

arashsm79 commented 3 years ago

For people who find this thread through searching: I deployed openstack using openstack-ansible. And when tried to verify the installation I found that the cinder-volume service was reporting a status of "down". Digging further a little bit, I found that cinder-volume service needs an LVM volume group to operate correctly. Inside /etc/cinder/cinder.conf there was a LVM section as follows:

[lvm]
...
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes

As you can see, it needs a volume-group named "cinder-volumes". I was deploying openstack inside a VM. So I simply attached a new disk to the VM at /dev/vdb for example. Then made sure that inside /etc/lvm/lvm.conf the /dev/vdb device is added to the filter entry.

devices {
    dir = "/dev"
    scan = [ "/dev" ]
    obtain_device_list_from_udev = 1
    preferred_names = [ ]
    filter = [ "a/vdb/", "a/loop8/", "a/loop3/", "a/loop.*/", "r/.*/" ]
    cache_dir = "/run/lvm"
    ...

The I initialized the physical volume /dev/vbd for use by LVM using pvcreate /dev/vdb and then created a LVM volume group named "cinder-volumes". After that I restarted the cinder-volume service using

service cinder-volume restart

These actions fixed this issue for me.