Cinder volume service

On a storage node we will install and configure the Cinder volume service.

But before that we'll prepare the actual storage for Cinder to use.

The guide here uses local disks on the storage node as shown below. We will connect to both an iSCSI target and a NFS server

Add local storage as LVM storage

This configuration is only needed if you want to make use of local storage on the storage node.

Clean previously used disks

If the disks have been previously used we'll need to remove the partitions on them

Disks previously used

sudo lvs
sudo lvremove <LOGICAL_VOLUME>

Remove logical volues

sudo vgs
sudo vgremove <VOLUME_GROUP>

Remove volume groups

Now the disks should be free to use

Disks unused

Install packages

sudo apt install lvm2 thin-provisioning-tools

Create cinder volume group

Now, let's create a volume group for cinder volumes on a disk

sudo pvcreate /dev/sda
sudo vgcreate cinder-volumes /dev/sda

Create Cinder volume group

Configure LVM

Now we'll configure LVM to filter the devices so that the LVM service only scans the devices that contain the cinder-volumes volume group

devices {
  filter = [ "a/sda/", "a/sdb/", "r/.*/"]
}

Note that /sdb is our compute node's OS disk, but as per the Openstack documentation this should also be scanned

Add iSCSI based storage

Check out the iSCSI page

Add NFS based storage

Check out the NFS page

Install and configure Cinder volume service

sudo add-apt-repository cloud-archive:epoxy
sudo apt update
sudo apt install cinder-volume

Configure cinder in /etc/cinder/cinder.conf

[DEFAULT]
# ...
transport_url = rabbit://openstack:RABBIT_PASS@controller
auth_strategy = keystone
my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
enabled_backends = lvm #Note that we can configure more backends
glance_api_servers = http://controller:9292

[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = cinder
password = CINDER_PASS

[database]
connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder

[oslo_concurrency]
lock_path = /var/lib/cinder/tmp