Install and configure a storage node

Install and configure a storage node

This section describes how to install and configure storage nodes for the Block Storage service. For simplicity, this configuration references one storage node with an empty NFS share.

The service provisions block volumes on this device using the Network File System (NFS) driver. You can follow these instructions with minor modifications to horizontally scale your environment with additional storage nodes.

Prerequisites

Note

This step is optional. You may skip this section if you have an access to the NFS share.

  1. Create the directory that will be used to store cinder volumes:

    # mkdir -p /srv/cinder
    
  2. Create /etc/exports file and add created directory to the list of exported shares:

    /srv/cinder -alldirs -maproot=root -network 192.168.1.0/24
    
  3. Enable NFS server and related services:

    # sysrc rpcbind_enable="YES"
    # sysrc nfs_server_enable="YES"
    # sysrc nfsv4_server_enable="YES"
    # sysrc nfsuserd_enable="YES"
    # sysrc mountd_enable="YES"
    # sysrc mountd_flags="-r"
    # sysrc rpc_lockd_enable="YES"
    # sysrc rpc_statd_enable="YES"
    
  4. Start NFS server:

    # service nfsd start
    # service mountd reload
    

Install and configure components

  1. Install the packages:

    # pkg install py27-cinder
    
  1. Edit the /etc/cinder/cinder.conf file and complete the following actions:

    • In the [database] section, configure database access:

      [database]
      ...
      connection = mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder
      

      Replace CINDER_DBPASS with the password you chose for the Block Storage database.

    • In the [DEFAULT] section, configure RabbitMQ message queue access:

      [DEFAULT]
      ...
      transport_url = rabbit://openstack:RABBIT_PASS@controller
      

      Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.

    • In the [DEFAULT] and [keystone_authtoken] sections, configure Identity service access:

      [DEFAULT]
      ...
      auth_strategy = keystone
      
      [keystone_authtoken]
      ...
      auth_uri = http://controller:5000
      auth_url = http://controller:35357
      memcached_servers = controller:11211
      auth_type = password
      project_domain_name = Default
      user_domain_name = Default
      project_name = service
      username = cinder
      password = CINDER_PASS
      

      Replace CINDER_PASS with the password you chose for the cinder user in the Identity service.

      Note

      Comment out or remove any other options in the [keystone_authtoken] section.

    • In the [DEFAULT] section, configure the my_ip option:

      [DEFAULT]
      ...
      my_ip = MANAGEMENT_INTERFACE_IP_ADDRESS
      

      Replace MANAGEMENT_INTERFACE_IP_ADDRESS with the IP address of the management network interface on your storage node, typically 10.0.0.41 for the first node in the example architecture.

    • Create /usr/local/etc/cinder/nfsshares file and insert available nfs share:

      controller:/srv/cinder
      
    • In the [DEFAULT] section, specify the nfsshares location:

      [DEFAULT]
      ...
      nfs_shares_config = /usr/local/etc/cinder/nfsshares
      
    • In the [DEFAULT] section, enable the NFS volume driver:

      [DEFAULT]
      ...
      volume_driver = cinder.volume.drivers.nfs.NfsDriver
      
    • In the [DEFAULT] section, configure the location of the Image service API:

      [DEFAULT]
      ...
      glance_api_servers = http://controller:9292
      
    • In the [oslo_concurrency] section, configure the lock path:

      [oslo_concurrency]
      ...
      lock_path = /var/lib/cinder/tmp
      

Finalize installation

  • Start the Block Storage volume service including its dependencies and configure them to start when the system boots:

    # sysrc cinder_volume_enable="YES"
    # service cinder-volume start
    
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.