8.4.4. Configuring for Red Hat Storage Backend

This procedure documents the steps involved in configuring the volume service to use Red Hat Storage. The Red Hat Storage shares to be used must already exist and be accessible from the server hosting the volume service.
All steps listed in this procedure must be performed while logged into the system hosting the volume service as the root user.

Important

Mounting of Red Hat Storage volumes requires utilities and libraries from the glusterfs-fuse package. For information on enabling the necessary Red Hat Network channels and installing the glusterfs-fuse package refer to the Red Hat Storage Administration Guide. This package must be installed on all systems that will access volumes backed by Red Hat Storage.

Important

To access instance Red Hat Storage volume, SELinux requires that the virt_use_fusefs Boolean is enabled on any client machine accessing the instance volumes. This includes all compute nodes. Run the following command on each client machine as the root user to enable the Boolean and make it persistent across reboots:
# setsebool -P virt_use_fusefs on
  1. Create a text file in the /etc/cinder/ directory containing a list of the Red Hat Storage shares that the volume service is to use for backing storage.
    HOST:/VOLUME
    Each line must contain a Red Hat Storage share in the format HOST:VOLUME where HOST is replaced by the IP address or host name of the Red Hat Storage server and VOLUME is replaced with the name of a particular volume that exists on that host.
    If required additional mount options must also be added in the same way that they would be provided to the mount command line tool:
    HOST:/VOLUME -o OPTIONS
    Replace OPTIONS with a comma separated list of mount options.
  2. Use the chown command to set the file to be owned by the root user and the cinder group.
    # chown root:cinder FILE
    Replace FILE with the path to the file containing the list of Red Hat Storage shares.
  3. Use the chmod command to set the file permissions such that it can be read by members of the cinder group.
    # chmod 0640 FILE
    Replace FILE with the path to the file containing the list of Red Hat Storage shares.
  4. Set the value of the glusterfs_shares_config configuration key to the path of the file containing the list of Red Hat Storage shares.
    # openstack-config --set /etc/cinder/cinder.conf \
       DEFAULT glusterfs_shares_config FILE
    Replace FILE with the path to the file containing the list of Red Hat Storage shares.
  5. The glusterfs_sparsed_volumes configuration key determines whether volumes are created as sparse files and grown as needed or fully allocated up front. The default and recommended value is true, which ensures volumes are initially created as sparse files.
    Setting the glusterfs_sparsed_volumes configuration key to false will result in volumes being fully allocated at the time of creation. This leads to increased delays in volume creation.
    # openstack-config --set /etc/cinder/cinder.conf \
       DEFAULT glusterfs_sparsed_volumes true
  6. Ensure that the correct volume driver for accessing Red Hat Storage is in use by setting the volume_driver configuration key to cinder.volume.drivers.glusterfs.
    # openstack-config --set /etc/cinder/cinder.conf \
    DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver
The volume service has been configured to use Red Hat Storage.