53c70cf219
This patch adds notes to handle the differences between Debian and Ubuntu. backport: havana Change-Id: I0fea68e65c3c3c4d0c2538a57f3ad4e9bad11cef
145 lines
7.2 KiB
XML
145 lines
7.2 KiB
XML
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
version="5.0"
|
|
xml:id="cinder-node">
|
|
<title>Configuring a Block Storage Node</title>
|
|
<para>After you configure the services on the controller node, configure a second system to be a Block Storage node. This node contains the disk that will be used to serve volumes.</para>
|
|
<para>You can configure OpenStack to use various storage systems. The examples in this guide show how to configure LVM.</para>
|
|
<procedure>
|
|
<title>Configure a Block Storage Node</title>
|
|
<step><para>Using the instructions in
|
|
<xref linkend="ch_basics"/> to configure the system. Note the following differences from the
|
|
controller node:</para>
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>Set the hostname to <literal>block1</literal>. Ensure that the
|
|
IP addresses and hostnames for both nodes are listed in the
|
|
<filename>/etc/hosts</filename> file on each system.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>Follow the instructions in
|
|
<xref linkend="basics-ntp"/> to synchronize from the controller node.</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</step>
|
|
<step><para>After you configure the operating system, install the appropriate
|
|
packages for the block storage service.</para>
|
|
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install cinder-volume lvm2</userinput></screen>
|
|
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-cinder openstack-utils openstack-selinux</userinput></screen>
|
|
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume</userinput></screen>
|
|
</step>
|
|
<step><para>Copy the <filename>/etc/cinder/api-paste.ini</filename>
|
|
file from the controller,
|
|
or open the file in a text editor
|
|
and locate the section <literal>[filter:authtoken]</literal>.
|
|
Make sure the following options are set:</para>
|
|
<programlisting language="ini">[filter:authtoken]
|
|
paste.filter_factory=keystoneclient.middleware.auth_token:filter_factory
|
|
auth_host=<replaceable>controller</replaceable>
|
|
auth_port = 35357
|
|
auth_protocol = http
|
|
admin_tenant_name=service
|
|
admin_user=cinder
|
|
admin_password=<replaceable>CINDER_PASS</replaceable>
|
|
</programlisting>
|
|
</step>
|
|
<step>
|
|
<para os="ubuntu;debian">
|
|
Configure the Block Storage Service to use the RabbitMQ
|
|
message broker by setting the following configuration keys. They are found in
|
|
the <literal>DEFAULT</literal> configuration group of the
|
|
<filename>/etc/cinder/cinder.conf</filename> file.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">rpc_backend = cinder.openstack.common.rpc.impl_kombu
|
|
rabbit_host = controller
|
|
rabbit_port = 5672
|
|
# Change the following settings if you're not using the default RabbitMQ configuration
|
|
#rabbit_userid = guest
|
|
#rabbit_password = guest
|
|
#rabbit_virtual_host = /nova</programlisting>
|
|
<para os="rhel;centos;fedora">Configure the Block Storage Service to
|
|
use Qpid as the message broker.</para>
|
|
<screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_qpid</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT qpid_hostname controller</userinput></screen>
|
|
|
|
<para os="opensuse;sles">Configure the Block Storage Service to use the
|
|
RabbitMQ message broker.</para>
|
|
<screen os="opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rpc_backend cinder.openstack.common.rpc.impl_kombu</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rabbit_host controller</userinput>
|
|
<prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
DEFAULT rabbit_port 5672</userinput></screen>
|
|
</step>
|
|
|
|
<step><para>Configure the Block Storage Service on this Block Storage node to use the cinder database on the controller node.</para>
|
|
<screen os="rhel;centos;fedora;opensuse;sles"><prompt>#</prompt> <userinput>openstack-config --set /etc/cinder/cinder.conf \
|
|
database connection mysql://cinder:<replaceable>CINDER_DBPASS</replaceable>@<replaceable>controller</replaceable>/cinder</userinput></screen>
|
|
<para os="ubuntu;debian">Edit <filename>/etc/cinder/cinder.conf</filename>
|
|
and change the <literal>[database]</literal> section.</para>
|
|
<programlisting os="ubuntu;debian" language="ini">[database]
|
|
...
|
|
# The SQLAlchemy connection string used to connect to the
|
|
# database (string value)
|
|
connection = mysql://cinder:CINDER_DBPASS@controller/cinder
|
|
...</programlisting>
|
|
</step>
|
|
|
|
<step>
|
|
<para>Now, create the LVM Physical Volume and Logical Volume.
|
|
This guide assumes a second disk <literal>/dev/sdb</literal> that
|
|
will be used for this purpose.</para>
|
|
<screen><prompt>#</prompt> <userinput>pvcreate /dev/sdb</userinput>
|
|
<prompt>#</prompt> <userinput>vgcreate cinder-volumes /dev/sdb</userinput></screen>
|
|
</step>
|
|
|
|
<step>
|
|
<para>Add a filter entry to the devices section
|
|
<filename>/etc/lvm/lvm.conf</filename> to keep LVM from scanning devices
|
|
used by virtual machines.</para>
|
|
<note><para>You must add every physical volume that is
|
|
needed for LVM on the Cinder host. You can get a list by running
|
|
<command>pvdisplay</command>.</para></note>
|
|
<para>Each item in the filter array starts with either an
|
|
"<literal>a</literal>" for accept, or an "<literal>r</literal>" for reject.
|
|
Physical volumes that are needed on the Cinder host begin with
|
|
"<literal>a</literal>". The array must end with
|
|
"<literal>r/.*/</literal>" to reject any device not listed.</para>
|
|
<para>In this example, <literal>/dev/sda1</literal> is the volume on which the
|
|
node's own operating system volumes reside, while <literal>/dev/sdb</literal>
|
|
is the volume reserved for <literal>cinder-volumes</literal>.</para>
|
|
<programlisting>devices {
|
|
...
|
|
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
|
|
...
|
|
}</programlisting>
|
|
</step>
|
|
|
|
<step os="ubuntu;debian">
|
|
<para>We now restart the cinder service with its new settings.</para>
|
|
<screen><prompt>#</prompt> <userinput>service cinder-volume restart</userinput>
|
|
<prompt>#</prompt> <userinput>service tgt restart</userinput></screen>
|
|
</step>
|
|
|
|
|
|
<step os="rhel;fedora;centos">
|
|
<para>Configure the ISCI target service to discover cinder volumes.
|
|
Add the following line to the top of <literal>/etc/tgt/targets.conf</literal>
|
|
if it is not already present:</para>
|
|
<programlisting>include /etc/cinder/volumes/*</programlisting>
|
|
</step>
|
|
|
|
<step os="rhel;fedora;centos;opensuse;sles"><para>Start the cinder services and configure them to
|
|
start when the system boots.</para>
|
|
<screen>
|
|
<prompt>#</prompt> <userinput>service openstack-cinder-volume start</userinput>
|
|
<prompt>#</prompt> <userinput>service tgtd start</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig openstack-cinder-volume on</userinput>
|
|
<prompt>#</prompt> <userinput>chkconfig tgtd on</userinput></screen>
|
|
</step>
|
|
|
|
</procedure>
|
|
</section>
|