<commit_before><?xml version="1.0" encoding="UTF-8"?>
<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-install-storage-node">
  <?dbhtml stop-chunking?>
  <title>Configure a Block Storage service node</title>
  <para>After you configure the services on the controller node,
    configure a Block Storage service node, which contains the disk
    that serves volumes.</para>
  <para>You can configure OpenStack to use various storage systems.
    This procedure uses LVM as an example.</para>
  <procedure>
    <title>To configure the operating system</title>
    <step>
      <para>Refer to the instructions in <xref linkend="ch_basic_environment"/>
        to configure the operating system. Note the following differences
        from the installation instructions for the controller node:</para>
      <itemizedlist>
        <listitem>
          <para>Set the host name to <literal>block1</literal> and use
          <literal>10.0.0.41</literal> 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 <filename>/etc/hosts</filename> file
          on each system.</para>
        </listitem>
        <listitem>
          <para>Follow the instructions in <xref linkend="basics-ntp"
            /> to synchronize the time from the controller node.</para>
        </listitem>
      </itemizedlist>
    </step>
  </procedure>
  <procedure>
    <title>To create a logical volume</title>
    <step os="ubuntu;debian;rhel;centos;fedora">
      <para>Install the LVM packages:</para>
      <screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
      <screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install lvm2</userinput></screen>
       <note>
         <para>Some distributions include LVM by default.</para>
       </note>
    </step>
    <step os="rhel;centos;fedora">
      <para>Start the LVM metadata service and configure it to start when the
        system boots:</para>
      <screen><prompt>#</prompt> <userinput>systemctl enable lvm2-lvmetad.service</userinput>
<prompt>#</prompt> <userinput>systemctl start lvm2-lvmetad.service</userinput></screen>
    </step>
    <step>
      <para>Create the LVM physical volume and volume group. This guide
        assumes a second disk <literal>/dev/sdb</literal> is being 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>In the <literal>devices</literal> section in the
        <filename>/etc/lvm/lvm.conf</filename> file, add the filter entry
        <literal>r/.*/</literal> to prevent LVM from scanning devices
        used by virtual machines:</para>
      <programlisting>devices {
...
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
...
}</programlisting>
      <note>
        <para>You must add the required physical volumes for LVM on the
          Block Storage host. Run the <command>pvdisplay</command>
          command to get a list of physical volumes.</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. The physical volumes on the Block Storage host have
        names that begin with <literal>a</literal>. The array must end
        with "<literal>r/.*/</literal>" to reject any device not
        listed.</para>
      <para>In this example, the <literal>/dev/sda1</literal> volume is
        where the volumes for the operating system for the node
        reside, while <literal>/dev/sdb</literal> is the volume
        reserved for <literal>cinder-volumes</literal>.</para>
      </step>
  </procedure>
  <procedure>
    <title>Install and configure Block Storage service node components</title>
    <step>
      <para>Install the packages for the Block Storage service:</para>
      <screen os="debian;ubuntu"><prompt>#</prompt> <userinput>apt-get install cinder-volume</userinput></screen>
      <screen os="centos;fedora;rhel"><prompt>#</prompt> <userinput>yum install openstack-cinder targetcli python-oslo-db</userinput></screen>
      <screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume tgt python-mysql</userinput></screen>
      <note os="opensuse">
        <para>The Python MySQL library is compatible with MariaDB.</para>
      </note>
    </step>
    <step os="debian">
      <para>Respond to the <systemitem class="library"
          >debconf</systemitem> prompts about the <link
          linkend="debconf-dbconfig-common">database<commit_msg>Update cinder content for Juno<commit_after><?xml version="1.0" encoding="UTF-8"?>
<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-install-storage-node">
  <?dbhtml stop-chunking?>
  <title>Configure a Block Storage service node</title>
  <para>After you configure the services on the controller node,
    configure a Block Storage service node, which contains the disk
    that serves volumes.</para>
  <para>You can configure OpenStack to use various storage systems.
    This procedure uses LVM as an example.</para>
  <procedure>
    <title>To configure the operating system</title>
    <step>
      <para>Refer to the instructions in <xref linkend="ch_basic_environment"/>
        to configure the operating system. Note the following differences
        from the installation instructions for the controller node:</para>
      <itemizedlist>
        <listitem>
          <para>Set the host name to <literal>block1</literal> and use
          <literal>10.0.0.41</literal> 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 <filename>/etc/hosts</filename> file
          on each system.</para>
        </listitem>
        <listitem>
          <para>Follow the instructions in <xref linkend="basics-ntp"
            /> to synchronize the time from the controller node.</para>
        </listitem>
      </itemizedlist>
    </step>
  </procedure>
  <procedure>
    <title>To create a logical volume</title>
    <step os="ubuntu;debian;rhel;centos;fedora">
      <para>Install the LVM packages:</para>
      <screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install lvm2</userinput></screen>
      <screen os="rhel;centos;fedora"><prompt>#</prompt> <userinput>yum install lvm2</userinput></screen>
       <note>
         <para>Some distributions include LVM by default.</para>
       </note>
    </step>
    <step os="rhel;centos;fedora">
      <para>Start the LVM metadata service and configure it to start when the
        system boots:</para>
      <screen><prompt>#</prompt> <userinput>systemctl enable lvm2-lvmetad.service</userinput>
<prompt>#</prompt> <userinput>systemctl start lvm2-lvmetad.service</userinput></screen>
    </step>
    <step>
      <para>Create the LVM physical volume and volume group. This guide
        assumes a second disk <literal>/dev/sdb</literal> is being 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>In the <literal>devices</literal> section in the
        <filename>/etc/lvm/lvm.conf</filename> file, add the filter entry
        <literal>r/.*/</literal> to prevent LVM from scanning devices
        used by virtual machines:</para>
      <programlisting>devices {
...
filter = [ "a/sda1/", "a/sdb/", "r/.*/"]
...
}</programlisting>
      <note>
        <para>You must add the required physical volumes for LVM on the
          Block Storage host. Run the <command>pvdisplay</command>
          command to get a list of physical volumes.</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. The physical volumes on the Block Storage host have
        names that begin with <literal>a</literal>. The array must end
        with "<literal>r/.*/</literal>" to reject any device not
        listed.</para>
      <para>In this example, the <literal>/dev/sda1</literal> volume is
        where the volumes for the operating system for the node
        reside, while <literal>/dev/sdb</literal> is the volume
        reserved for <literal>cinder-volumes</literal>.</para>
      </step>
  </procedure>
  <procedure>
    <title>Install and configure Block Storage service node components</title>
    <step>
      <para>Install the packages for the Block Storage service:</para>
      <screen os="debian;ubuntu"><prompt>#</prompt> <userinput>apt-get install cinder-volume python-mysqldb</userinput></screen>
      <screen os="centos;fedora;rhel"><prompt>#</prompt> <userinput>yum install openstack-cinder targetcli python-oslo-db MySQL-python</userinput></screen>
      <screen os="opensuse;sles"><prompt>#</prompt> <userinput>zypper install openstack-cinder-volume tgt python-mysql</userinput></screen>
    </step>
    <step os="debian">
      <para>Respond to the <systemitem class="library"
          >debconf</systemitem> prompts about the <link
          linkend="debconf-dbconfig-common">database
{'fraction_non_alphanumeric': 0.12561779242174628, 'fraction_numerical': 0.005766062602965404, 'mean_word_length': 3.1920586965904185, 'pattern_counts': {'":': 0, '<': 317, '<?xml version=': 2, '>': 317, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 10}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3941499', 'n_tokens_mistral': 2889, 'n_tokens_neox': 2792, 'n_words': 850}