I'm starting with this post on the scaling issue first. Cinder is composed of three main parts, the API server, the scheduler and the volume service. The volume service is some sort of abstraction layer between the API and the actual resources provider.html
By adding more volume nodes into the environment you will be able to increase the total offering of block storage to the tenants. Each volume node can either provide volumes by allocating them locally or on a remote container like an NFS or GlusterFS share.node
Some assumptions before getting into the practice:mysql
First thing to do on the candidate node is to install the required packages. I'm running the examples on CentOS and using the RDO repository which makes this step as simple as:sql
# yum install openstack-cinder
If you plan to host new volumes using the locally available storage dont' forget to create a volume group called cinder-volumes
(the name can be configured via thecinder_volume
parameter). Also don't forget to configure the tgtd
to include the config files created dynamically by Cinder. Add a line like the following:apache
include /etc/cinder/volumes/*
in your /etc/tgt/targets.conf
file. Now enable and start the tgtd
service:ide
# chkconfig tgtd on # service tgtd start
Amongst the three init services installed by openstack-cinder
you only need to run openstack-cinder-volume
, which gets configured in /etc/cinder/cinder.conf
. Configure it to connect to the existing Cinder database (the db in use by the pre-existing node) and to the existing AMQP broker (again, in use by the pre-existing node) by setting the following:post
sql_connection=mysql://cinder:${CINDER_DB_PASSWORD}@${CINDER_DB_HOST}/cinder qpid_hostname=${QPIDD_BROKER}
Set the credentials if needed and/or change the rpc_backend
setting if you're not using Qpid as your message broker. One more setting, not really required to change but worth checking if you're using the local resources:ui
iscsi_ip_address=${TGTD_IP_ADDRESS}
That should match the public ip address of the volume node just installed. The iSCSI targets created locally using tgtadm/tgtd
have to be reachable by the Novanodes. The IP address of each target is stored in the database with every volume created. The iscsi_ip_address
prameter sets what is the IP address to be given to the initiators.this
At this point you should be ready to start the volume service:idea
# service openstack-cinder-volume start
Verify that it started by checking the logs (/var/log/cinder/volume.log
) or by issueing on any Cinder node:
# cinder-manage host list
you should see all of your volume nodes listed. From now on you can create new volumes as usual and they will be allocated on any of the volume nodes, keep in mind that the scheduler will default to the node with the most space available.