Rackspace has developed a set of OpenStack Block Storage (Cinder) chef recipes, combined into a cookbook, that can be used to configure a Cinder node or group of nodes. This section discusses the concepts and architecture behind Cinder and describes the procedures for configuring Cinder nodes.
The Cinder project provides "block storage as a service" functionality in OpenStack. Beginning in the Folsom release and going forward, it is designed to replace the nova-volumes service.
The Cinder architecture includes the following components:
With the Rackspace Private Cloud Cinder recipes, you can install the services across multiple nodes or all together on a single node. The Rackspace Private Cloud cookbooks provide convenient chef roles to assist in installing services on nodes. The cinder-api, cinder-scheduler, and cinder-volume roles, when applied to a node, will install the respective services by running the relevant recipes. The cinder-all meta-role includes all three cinder roles.
Rackspace Private Cloud Software installs cinder-api and cinder-scheduler on the controller node by default. You will need to add additional cinder-volume nodes to use OpenStack Block Storage on your cluster.
Rackspace recommends that the physical server that will become a Cinder volume node or a Cinder all-in-one node meet the following criteria.
Your environment must meet the following criteria.
Install Ubuntu 12.04 on the server that will become the Cinder volume node.
Install and configure chef-client on the new server. The following commands will ensure that the chef-client points to the Chef server on the controller node.
$curl -L http://opscode.com/chef/install.sh | bash$mkdir -p /etc/chef$export chef=your_controller_ip$cat > /etc/chef/client.rb <<EOF chef_server_url "http://${chef}:4000" environment "rpcs" EOF
On the controller node, locate /etc/chef/validation.pem.
Copy this file to /etc/chef/ on the new server.
Run chef-client on the new server to register the new server.
$rm -fr /etc/chef/client.pem ; chef-client
Log into the controller node and switch to root access with sudo -i. Update the cookbooks and roles with the procedure documented in "Update the Cookbooks".
Create an LVM volume group on the new server. In this example, the server has a disk that appears as /dev/sdb, and a volume group called cinder-volumes will be created on this disk.
$sshserver_ip_address$sudo pvcreate /dev/sdb$sudo vgcreate cinder-volumes /dev/sdb
On the controller node, execute the following knife command to add the cinder-volume role to the server. For , substitute the fully qualified domain name of the server, such as server_namecindervolume1.mydomain.com.
$knife node run_list addserver_name'role[cinder-volume]'
Run chef-client on the server to complete the process.
$ssh my.new.server$sudo chef-client
When the procedure is complete, you should receive output similar to the following:
[2012-10-30T10:32:02+00:00] INFO: *** Chef 10.14.2 ***
[2012-10-30T10:32:04+00:00] INFO: Run List is [role[cinder-volume]]
--output truncated--
[2012-10-29T16:23:34+00:00] INFO: Running report handlers
[2012-10-29T16:23:34+00:00] INFO: Report handlers complete
When the process is complete, the new Cinder volume node will be ready to use.
Volumes can be created through the Dashboard or with python-cinderclient. The client is installed by default on the cinder node, but you can install it on your local workstation with the following command:
$sudo apt-get install python-cinderclient
You should also ensure that your workstation's environment variables have been set correctly, as described in Viewing and Setting Environment Variables.
In this example, a volume called myvolume with a size of 1 is created and attached to an instance with python-cinderclient.
$cinder create --display-name myvolume 1+---------------------+--------------------------------------+ | Property | Value | +---------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | created_at | 2012-10-29T17:16:23.260483 | | display_description | None | | display_name | myvolume | | id | 845514f9-8fff-44bb-b82a-27d4e32b9939 | | metadata | {} | | size | 1 | | snapshot_id | None | | status | creating | | volume_type | None | +---------------------+--------------------------------------+$cinder list+------------------------+-----------+---------+------+--------+---------+ | ID | Status | Display | Size | Volume | Attached| | | | Name | | Type | to | +------------------------+-----------+---------+------+--------+---------+ | 845514f9[id truncated] | available |myvolume | 1 | None | | +------------------------+-----------+---------+------+--------+---------+
This volume is now available to be attached to a nova instance. For this example, myvolume will be attached to an instance called myserver with the nova volume-attach command. The auto argument allows the Block Storage API to determine how the disk will appear when its information is viewed from within the virtual machine. In this case, Cinder assigns a block device named /dev/vdb to the volume.
$nova list+------------------------+----------+--------+----------------------+ | ID | Name | Status | Networks | +------------------------+----------+--------+----------------------+ | f947896e[id truncated] | myserver | ACTIVE | public=192.168.100.4 | +------------------------+----------+--------+----------------------+$cinder list+------------------------+-----------+---------+------+--------+---------+ | ID | Status | Display | Size | Volume | Attached| | | | Name | | Type | to | +------------------------+-----------+---------+------+--------+---------+ | 845514f9[id truncated] | available |myvolume | 1 | None | | +------------------------+-----------+---------+------+--------+---------+$nova volume-attach f947896e-600a-4600-a27a-3f372146b6e9 \ 845514f9-8fff-44bb-b82a-27d4e32b9939 auto+----------+--------------------------------------+ | Property | Value | +----------+--------------------------------------+ | device | /dev/vdb | | id | 0501bc27-5ebd-44f2-8a4a-bb1595ee7e42 | | serverId | f947896e-600a-4600-a27a-3f372146b6e9 | | volumeId | 0501bc27-5ebd-44f2-8a4a-bb1595ee7e42 | +----------+--------------------------------------+
The Cinder volume is now attached to myserver.
$cinder list+------------------------+-----------+---------+------+--------+------------+ | ID | Status | Display | Size | Volume | Attached | | | | Name | | Type | to | +------------------------+-----------+---------+------+--------+------------+ | 845514f9[id truncated] | available |myvolume | 1 | None | f947896e...| +------------------------+-----------+---------+------+--------+------------+
When you ssh to the instance to which the volume was attached and look up the disk information, you will see the disk information for the block device. In this example, the instance has an IP address of 192.168.100.4.
$ssh cirros@192.168.100.4$sudo fdisk -l /dev/vdbDisk /dev/vdb: 1073 MB, 1073741824 bytes 16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/vdb doesn't contain a valid partition table
If you did not use the Rackspace Private Cloud Software installer to create your cluster, and if you did not use the Rackspace single-controller role in a manual configuration, you will need to create a Block Storage node with the cinder-all role. This will create a node with the cinder-api, cinder-scheduler, and cinder-volume roles.
You can also create a block storage all-in-one node following the steps outlined in Adding Volume Storage Nodes, with one change.
In step 8, you will specify the cinder-all role instead of cinder-volume. For , substitute the fully qualified domain name of the server, such as server_namecinder1.mydomain.com.
$knife node run_list addserver_name'role[cinder-volume]'
When the procedure is complete, you should receive output similar to the following:
[2012-10-30T10:32:02+00:00] INFO: *** Chef 10.14.2 ***
[2012-10-30T10:32:04+00:00] INFO: Run List is [role[cinder-all]]
[2012-10-30T10:32:04+00:00] INFO: Run List expands to [osops-utils::packages, openssh, ntp, sosreport, rsyslog::default, hardware, osops-utils::default, cinder::cinder-api, cinder::cinder-scheduler, cinder::cinder-volume]
--output truncated--
[2012-10-29T16:23:34+00:00] INFO: Running report handlers
[2012-10-29T16:23:34+00:00] INFO: Report handlers complete
When the process is complete, the new Cinder all-in-one node will be ready to use.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

6 Comments
Can you run cinder block
The answer depends on how
The forums are a great place for some of the more technical discussions: privatecloudforums.rackspace.com
Also, we've started a similar discussion recently at: https://privatecloudforums.rackspace.com/viewtopic.php?f=4&t=284
I have the exact same
Please see my comment above.
Install Cinder
problems with commonds ..
chef_server_url "http://${chef}:4000"
what is ${chef} here ???
I used IP address of node to be maid new volume node. But didn't worked.
In step 7,
$ ssh server_ip_address
what is significance of this command ??
it asks for password+key pair
how to give it ?
Add new comment