Atom feed of this document
 

 Managing Volumes

The Cinder project provides the service that allows you to give extra block level storage to your OpenStack Compute instances. You may recognize this as a similar offering from Amazon EC2 known as Elastic Block Storage (EBS). However, OpenStack Block Storage is not the same implementation that EC2 uses today. This is an iSCSI solution that employs the use of Logical Volume Manager (LVM) for Linux. Note that a volume may only be attached to one instance at a time. This is not a ‘shared storage’ solution like a SAN of NFS on which multiple servers can attach to.

Before going any further; let's discuss the block storage implementation in OpenStack:

The cinder service uses iSCSI-exposed LVM volumes to the compute nodes which run instances. Thus, there are two components involved:

  1. lvm2, which works with a VG called cinder-volumes or another named Volume Group (Refer to http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) for further details)

  2. open-iscsi, the iSCSI implementation which manages iSCSI sessions on the compute nodes

Here is what happens from the volume creation to its attachment:

  1. The volume is created via nova volume-create; which creates an LV into the volume group (VG) cinder-volumes

  2. The volume is attached to an instance via nova volume-attach; which creates a unique iSCSI IQN that will be exposed to the compute node

  3. The compute node which run the concerned instance has now an active ISCSI session; and a new local storage (usually a /dev/sdX disk)

  4. libvirt uses that local storage as a storage for the instance; the instance get a new disk (usually a /dev/vdX disk)

For this particular walk through, there is one cloud controller running nova-api, nova-scheduler, nova-objectstore, nova-network and cinder-* services. There are two additional compute nodes running nova-compute. The walk through uses a custom partitioning scheme that carves out 60GB of space and labels it as LVM. The network uses FlatManger is the NetworkManager setting for OpenStack Compute (Nova).

Please note that the network mode doesn't interfere at all with the way cinder works, but networking must be set up for cinder to work. Please refer to Networking for more details.

To set up Compute to use volumes, ensure that Block Storage is installed along with lvm2. The guide will be split in four parts :

  • Installing the Block Storage service on the cloud controller.

  • Configuring the cinder-volumes volume group on the compute nodes.

  • Troubleshooting your installation.

  • Backup your nova volumes.


loading table of contents...