2015-09-09

Cinder  is the  default block storage service on Openstack. Cinder service manages the volumes , volume snapshots, and volume types. Prior to year 2012 , cinder was part of nova module in the name of nova-volume. To reduce the nova coding and improve the volume service, developers has separated the volume service from nova codes and they named volume service as cinder. Since then , multiple vendors are started providing the API to the cinder services. By default , cinder uses the LVM as back-end storage system.  The default configuration file is /etc/cinder/cinder.conf. In this article, I will demonstrate that how to use the cinder service on Openstack which is configured using devstack method.

There are three important components in cinder block service.

cinder-volume.

cinder-scheduler

cinder-backup

Messaging queue. (RabbitMQ)

Cinder act like a front-end interface and communicate to LVM or Ceph using the API in the back-end to provide the volume services. Ceph is the advanced storage which eliminates the limitations of LVM.

Note:  In my case, both Openstack controller node & cinder nodes are same. Created this environment using the devstack method on Ubuntu.

Configure the cinder: (Only for the testing purpose )

Note: Since I have logged in as stack user , Need to use sudo command to get the necessary privileges.

1.Let’s have dedicated harddrive for cinder.

2. Install the lvm2 packages. (In my case, lvm2 is already installed)

3. Create the physical volume using the /dev/sdb.

4. Create the volume group using /dev/sdb.

5. Edit the cinder.conf like below. Just replaced volume group name as stack-vg.

6. Run unstack.sh & re-join.sh to restart all the openstack services.

8. Login to Openstack Dashboard to use the first cinder volume. If you unable to get the Dashboard, restart the Apache services like below.

9. By default, nova instance creates the image file under below mentioned location when you launch the instance (using image).

10. Since we have configured the cinder , Let’s create new instance on cinder volume. Login to the Openstack dashboard & Launch instance.

11.  Click on Access & security to map the right key pairs & security profile.

12.  Here you can see that instance has been created using the cinder volume.

13.  Navigate to the volumes tab.  Here you can see that volume is created and attached to the instance “vua02”. Since  it is a OS volume , so marked as  bootable.  (Right side)

There was an issue while configuring the cinder service where I am unable to create a new volume using the dashboard. But I was able to create the volume using “cinder create 1” using command line. To fix this , I have re-installed the ISCSI packages. (Ubuntu)

14. Let’s see how it has been created in the back-end.  List the cinder volume .

In the back-end , cinder service communicates to the LVM driver & create the volumes on the specified volume group (Refer Step 5).

Hope this article is informative to you.

The post Openstack – Configure Cinder Service (Testing Method) appeared first on UnixArena.

Show more