Cinder Storage | Installation & Usage - Flux7 Blog


Cinder is a persistent block level storage device for use with OpenStack compute instances. It manages the creation, attachment and detachment of block devices to servers. In addition to using simple Linux server storage, Cinder provides unified storage support for numerous other storage platforms, including Ceph, NetApp, Nexenta, SolidFire and Zadara.

It provides snapshot management functionality for backing up data stored on block storage volumes that can be restored or used to create new block storage volumes.

[Tweet "What is #Cinder and how to install and use it?"]

Cinder includes the following components:

cinder-api: Accepts API requests and routes them to cinder-volume for action.

cinder-volume: Responds to requests to read from and write to a block storage database to maintain state by interacting with other processes, like cinder-scheduler, through a message queue, and to act directly upon block-storage providing hardware or software. It can interact with a variety of storage providers through driver architecture.

cinder-scheduler: Picks the optimal block storage provider node on which to create the volume.

Messaging queue: Routes information between Block Storage Service processes.



Installing Cinder


Install Cinder services.

# apt-get install cinder-api cinder-scheduler cinder-volume

Create database. Glance uses a database to store information. Here we’ll use MySQL as the default database.


> create database cinder;

> grant all privileges on glance.* to cinderUser@localhost identified by ‘StrongPass’;

> grant all privileges on keystone.* to cinderUser@'%' identified by ‘StrongPass’;

Create a cinder user and add the user to tenant service with an admin role.

# keystone user-create --name=cinder --pass=90b68569e6da

# keystone user-role-add --user=cinder --tenant=service --role=admin

Register the cinder service at Keystone.

# keystone service-create --name=cinder --type=volume --description="Cinder Volume Service"

Create a cinder endpoint. For the service-id, use the id generated for the Glance service.

# keystone endpoint-create --service-id=a3f9c625a3b9443f8e66bf4e5de2349f \

--publicurl=\(tenant_id\)s \

--internalurl=\(tenant_id\)s \


Also register a service and endpoint for version 2 of the Block Storage Service API.

# keystone service-create --name=cinderv2 --type=volumev2 --description="Cinder Volume Service V2"

Note the id property returned and use it to create the endpoint.

# keystone endpoint-create --service-id=a3f9c625a3b9443f8e66bf4e5de2349f \

--publicurl=\(tenant_id\)s \

--internalurl=\(tenant_id\)s \


Edit /etc/cinder/cinder.conf and change the database connection string under the [database] section.



connection = mysql://cinderUser:StrongPass@localhost/cinder

Also change rabbitmq details if required:-



rpc_backend = cinder.openstack.common.rpc.impl_kombu

rabbit_host = controller

rabbit_port = 5672

rabbit_userid = guest

rabbit_password = RABBIT_PASS

Finally, add the credentials to the file /etc/cinder/api-paste.ini under section [filter:authtoken].



auth_uri =

auth_host =

auth_port = 35357

auth_protocol = http

admin_tenant_name = service

admin_user = cinder

admin_password = 90b68569e6da

Watch out the next tutorial on how to Neutron - Openstack's Network Service.

Did you find this useful?  

Interested in getting tips, best practices and commentary delivered regularly? Click the button below to sign up for our blog and set your topic and frequency preferences.

Sign Me Up!

April 03, 2014 / Storage

About the Author

Flux7 Labs
Find me on: