After you configure the services on the controller node, configure a second system to be a Block Storage service node. This node contains the disk that serves volumes.
You can configure OpenStack to use various storage systems. This example uses LVM.
Use the instructions in Chapter 2, Basic environment configuration to configure the system. Note the following differences from the installation instructions for the controller node:
Set the host name to
block1and use10.0.0.41as IP address on the management network interface. Ensure that the IP addresses and host names for both controller node and Block Storage service node are listed in the/etc/hostsfile on each system.Follow the instructions in the section called “Network Time Protocol (NTP)” to synchronize from the controller node.
Create the LVM physical and logical volumes. This guide assumes a second disk
/dev/sdbthat is used for this purpose:# pvcreate /dev/sdb # vgcreate cinder-volumes /dev/sdb
Add a filter entry to the
devicessection in the/etc/lvm/lvm.conffile to keep LVM from scanning devices used by virtual machines:devices { ... filter = [ "a/sda1/", "a/sdb/", "r/.*/"] ... }![[Note]](../common/images/admon/note.png)
Note You must add required physical volumes for LVM on the Block Storage host. Run the pvdisplay command to get a list or required volumes.
Each item in the filter array starts with either an
afor accept, or anrfor reject. The physical volumes that are required on the Block Storage host have names that begin witha. The array must end with "r/.*/" to reject any device not listed.In this example,
/dev/sda1is the volume where the volumes for the operating system for the node reside, while/dev/sdbis the volume reserved forcinder-volumes.After you configure the operating system, install the appropriate packages for the Block Storage service:
# yum install openstack-cinder scsi-target-utils
Copy the
/etc/cinder/cinder.confconfiguration file from the controller, or perform the following steps to set the keystone credentials:# openstack-config --set /etc/cinder/cinder.conf DEFAULT \ auth_strategy keystone # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ auth_uri http://
controller:5000 # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ auth_hostcontroller# openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ auth_protocol http # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ auth_port 35357 # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ admin_user cinder # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ admin_tenant_name service # openstack-config --set /etc/cinder/cinder.conf keystone_authtoken \ admin_passwordCINDER_PASSConfigure Block Storage to use the Qpid message broker:
# openstack-config --set /etc/cinder/cinder.conf \ DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid # openstack-config --set /etc/cinder/cinder.conf \ DEFAULT qpid_hostnamecontrollerConfigure Block Storage to use your MySQL database. Edit the
/etc/cinder/cinder.conffile and add the following key to the[database]section. ReplaceCINDER_DBPASSwith the password you chose for the Block Storage database:# openstack-config --set /etc/cinder/cinder.conf \ database connection mysql://cinder:
CINDER_DBPASS@controller/cinderConfigure Block Storage to use the Image Service. Block Storage needs access to images to create bootable volumes. Edit the
/etc/cinder/cinder.conffile and update theglance_hostoption in the[DEFAULT]section:# openstack-config --set /etc/cinder/cinder.conf \ DEFAULT glance_host
controllerConfigure the iSCSI target service to discover Block Storage volumes. Add the following line to the beginning of the
/etc/tgt/targets.conffile, if it is not already present:include /etc/cinder/volumes/*
Start and configure the Block Storage services to start when the system boots:
# service openstack-cinder-volume start # service tgtd start # chkconfig openstack-cinder-volume on # chkconfig tgtd on

