Posted in Cloud, Linux, Openstack

Basic Cinder (volume) service functionality in Openstack – Part2

We saw volume creation with related issues and probable solutions.

Now we will see volume attach to VM. Create partition on it. Remove it and detach volume from VM.

Attach created volume to testvm. Following is command-line requirement for cinder volume-attach.

c20

Volume ID will get it from cinder-list use auto to autoassign the new device.

c21

You can check volume status is changed to in-use now and also changed attached with VM ID.

c22

Now login to VM and check if /dev/vdb volume is discovered on VM.

c23.PNG

It’s discovered successfully.Now create partition /dev/vdb1 on it using fdisk.

c24

Format /dev/vdb1 partition with ext4 filesystem.

c25

Create directory /test and mount /dev/vdb1 on it.

c26

Now cd to /test and create a test file. I have redirected output of dmesg to dmesg.log file and created one file in /test filesystem.

c27

that’s it volume assign. partition creation, filesystem creation and test file creation into it is done now. Remove file, partition and detach volume from VM now.

c28

Commandline requirement for nova volume-detach.

c29

c30

After that just check status of volume is changed to available and detached from VM.

c31

Then you can delete this volume using cinder delete.

c32

This is basic functionality of creating volume. attaching to VM. Creation of partition, Creation of Filesystem. and remove Filesystem, detach volume from VM and reclaim the disk.

Enjoy 🙂

 

 

 

 

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.

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