Instalación y configuración de OpenStack Mitaka sobre LXC en Ubuntu 14.04
Instalamos lvm.
root@CONTROLLER:~# apt install lvm2
Creamos el grupo de volúmenes que usaremos para crear nuestros volúmenes en cinder.
root@CONTROLLER:~# pvcreate /dev/sdb
root@CONTROLLER:~# vgcreate cinder-volumes /dev/sdb
Editamos la diguiente línea del fichero /etc/lvm/lvm.conf.
root@CONTROLLER:~# /etc/lvm/lvm.conf
devices {
...
filter = [ "a/sdb/", "r/.*/"]
Instalamos los paquetes necesario en el host CONTROLLER.
root@CONTROLLER:~# apt install cinder-volume python-memcache
Modificamos el fichero /etc/cinder/cinder.conf.
root@CONTROLLER:~# /etc/cinder/cinder.conf
[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = rabbit
auth_strategy = keystone
my_ip = HOST_INTERNAL_IP
enabled_backends = lvm
default_volume_type = lvm
glance_api_servers = http://GLANCE_INTERNAL_IP:9292
[database]
connection = mysql+pymysql://cinder:CINDER_DBPASS@NOVA_CONTROLLER_INTERNAL_IP/cinder
[oslo_messaging_rabbit]
rabbit_host = NOVA_CONTROLLER_INTERNAL_IP
rabbit_userid = openstack
rabbit_password = RABBIT_PASS
[keystone_authtoken]
auth_uri = http://KEYSTONE_INTERNAL_IP:5000
auth_url = http://KEYSTONE_INTERNAL_IP:35357
memcached_servers = NOVA_CONTROLLER_INTERNAL_IP:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = CINDER_DBPASS
[lvm]
volume_driver = cinder.volume.drivers.lvm.LVMVolumeDriver
volume_group = cinder-volumes
iscsi_protocol = iscsi
iscsi_helper = tgtadm
iscsi_iotype = fileio
iscsi_ip_address = $my_ip
[oslo_concurrency]
lock_path = /var/lib/cinder/tmp
Reiniciamos los servicios.
root@CONTROLLER:~# service tgt restart
root@CONTROLLER:~# service cinder-volume restart