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
- 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:/VOLUMEEach line must contain a Red Hat Storage share in the formatHOST:VOLUMEwhereHOSTis replaced by the IP address or host name of the Red Hat Storage server andVOLUMEis 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 themountcommand line tool:HOST:/VOLUME-oOPTIONSReplaceOPTIONSwith a comma separated list of mount options. - Use the
chowncommand to set the file to be owned by therootuser and thecindergroup.#chown root:cinderFILEReplaceFILEwith the path to the file containing the list of Red Hat Storage shares. - Use the
chmodcommand to set the file permissions such that it can be read by members of thecindergroup.#chmod 0640FILEReplaceFILEwith the path to the file containing the list of Red Hat Storage shares. - Set the value of the
glusterfs_shares_configconfiguration 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_configFILEReplaceFILEwith the path to the file containing the list of Red Hat Storage shares. - The
glusterfs_sparsed_volumesconfiguration key determines whether volumes are created as sparse files and grown as needed or fully allocated up front. The default and recommended value istrue, which ensures volumes are initially created as sparse files.Setting theglusterfs_sparsed_volumesconfiguration key tofalsewill 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_volumestrue - Ensure that the correct volume driver for accessing Red Hat Storage is in use by setting the
volume_driverconfiguration key tocinder.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.