Configure a Block Storage service nodeAfter 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 to
configure the system. Note the following differences from the
installation instructions for the controller node:Set the host name to block1 and use
10.0.0.41 as 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/hosts file
on each system.Follow the instructions in to synchronize from the controller node.Install the required LVM packages, if they are not already
installed:#apt-get install lvm2Create the LVM physical and logical volumes. This guide
assumes a second disk /dev/sdb that is used
for this purpose:#pvcreate /dev/sdb#vgcreate cinder-volumes /dev/sdbAdd a filter entry to the devices
section in the /etc/lvm/lvm.conf file to
keep LVM from scanning devices used by virtual
machines:devices {
...
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
...
}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
a for accept, or an r
for reject. The physical volumes that are required on the
Block Storage host have names that begin with
a. The array must end with
"r/.*/" to reject any device not
listed.In this example, /dev/sda1 is the
volume where the volumes for the operating system for the node
reside, while /dev/sdb is the volume
reserved for cinder-volumes.After you configure the operating system, install the
appropriate packages for the Block Storage service:#apt-get install cinder-volume#yum install openstack-cinder-volume targetcli#zypper install openstack-cinder-volume tgtStart and enable the target service.#service target start#chkconfig target onRespond to the debconf prompts about the database
management, [keystone_authtoken] settings,
and RabbitMQ
credentials. Make sure to enter the same details as
you did for your Block Storage service controller node.Another screen prompts you for the volume-group to use. The Debian
package configuration script detects every active volume group
and tries to use the first one it sees, provided that the
lvm2 package was
installed before Block Storage. This should be the case if you
configured the volume group first, as this guide recommends.If you have only one active volume group on your Block
Storage service node, you do not need to manually enter its
name when you install the cinder-volume package because it is detected
automatically. If no volume-group is available when you install
cinder-common, you
must use dpkg-reconfigure to manually
configure or re-configure cinder-common.Copy the
/etc/cinder/cinder.conf configuration
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_host controller#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_password CINDER_PASSEdit the
/etc/cinder/cinder.conf configuration
file and add this section for keystone credentials:...
[keystone_authtoken]
auth_uri = http://controller:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = CINDER_PASSConfigure Block Storage to use the lioadm iscsi_helper:#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT iscsi_helper lioadmConfigure Block Storage to use the RabbitMQ message
broker.In the [DEFAULT] configuration section
of the /etc/cinder/cinder.conf file, set
these configuration keys and replace
RABBIT_PASS with the password you
chose for RabbitMQ:[DEFAULT]
...
rpc_backend = cinder.openstack.common.rpc.impl_kombu
rabbit_host = controller
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = RABBIT_PASSConfigure Block Storage to use the RabbitMQ message
broker. Replace RABBIT_PASS with
the password you chose for RabbitMQ:#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT rabbit_host controller#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT rabbit_port 5672#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT rabbit_password RABBIT_PASSConfigure Block Storage to use your MySQL database. Edit
the /etc/cinder/cinder.conf file and add
the following key to the [database]
section. Replace CINDER_DBPASS with
the password you chose for the Block Storage database:#openstack-config --set /etc/cinder/cinder.conf \
database connection mysql://cinder:CINDER_DBPASS@controller/cinder[database]
...
connection = mysql://cinder:CINDER_DBPASS@controller/cinderIn some distributions, the
/etc/cinder/cinder.conf file does not
include the [database] section header.
You must add this section header to the end of the file
before you proceed.Configure Block Storage to use the Image Service. Block Storage
needs access to images to create bootable volumes. Edit the
/etc/cinder/cinder.conf file and update the
option in the [DEFAULT]
section:#openstack-config --set /etc/cinder/cinder.conf \
DEFAULT glance_host controller[DEFAULT]
...
glance_host = controllerRestart the Block Storage services with the new
settings:#service cinder-volume restart#service tgt restartStart and configure the Block Storage services to start
when the system boots:#service tgtd start#chkconfig tgtd onStart and configure the cinder volume service to start
when the system boots:#chkconfig openstack-cinder-volume on#service openstack-cinder-volume start