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.


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


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


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


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


Format /dev/vdb1 partition with ext4 filesystem.


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


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.


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.


Commandline requirement for nova volume-detach.



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


Then you can delete this volume using cinder delete.


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 🙂






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: Logo

You are commenting using your 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.