Posted in Cloud, Linux, Openstack

Basic Cinder (volume) service functionality in Openstack – Part1

In this post I am going to show you basic functionality of openstack cinder (volume) service functionality by creating volume on internal storage. Attaching that volume to VM. Create partition on that volume in client machine and test partition remove and detaching volume from VM.

Lets take one running state vm for cinder testing as we can do this operation on the fly. I have one VM name testvm.

c1

Check the disk and partitions on the VM. I can access the testvm using private IP and public IP. Lets access it using private IP using unique network namespace.

First check private-net network ID and test the ping to private IP of VM using network namespace. For more details about basic networking in openstack check my last blog posts.

c2

c3

Now ssh to VM using cirros user as I have used cirros image for testvm.

c4

now sudo to root to check disk details. cirros user does not have privileges to check the disk details.

c5

We can see we have one disk vda and we have one partition /dev/vda1 on top of it.

Check whether cinder related services are up and running on controller node.

c9

Check the command-line requirement for cinder volume create

c6c7

Create a volume with 1GB in size and name test-vol-1

c8

You can check the status of volume into cinder list. If you find that volume is in error state like following.

c10

Then check status of cinder-volume service.

c11

Also in service status log you can find couple of errors.i.e. WARNING cinder.volume.manager Update driver status failed: (config name lvm) is uninitialized.

c13

 

One of the reason for these issues are we might have sudoers permission issue in cinder sudoers file. Update the /etc/sudoers.d/cinder with following content.

c14

Also make sure you have correct volume group specified into cinder.conf file and that volume group is present on the server. Volume group also should have enough free space available to create new volumes.

c17

and now restart openstack-cinder-volume service and check the status messages and cinder service-list

c15

c16

Now cinder-volume state became up.

Now again try to create volume and check the status of volume after creation.

c18

c19

New volume test-vol-1 is created successfully.

Next Part attaching volume to VM. Creation of partition on it and detaching that volume from VM.

 

 

 

 

Advertisements

Author:

I have created this blog to share my learning from IT world. Hope you find it useful in your day to day work. Feel free to send me your feedback about my blog.

One thought on “Basic Cinder (volume) service functionality in Openstack – Part1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s