Attaching external storages
Besides the local compute storage, you can integrate your compute cluster with a third-party storage compatible with OpenStack. This will allow you to use an enterprise-grade storage solution, as well as isolate storage from your compute nodes.
OpenStack provides multiple drivers for different storages. A set of available operations on volumes is limited by the driver capabilities and can be checked in the Cinder Driver Support Matrix. The currently supported storages only include those that use the Pure Storage iSCSI volume driver. As this driver is based on the iSCSI storage protocol, compute nodes must be configured to support multipathing.
Once you connect an external storage to the compute cluster, you can start using it by creating external storage policies and applying them to new volumes.
Limitations
- External storage policies cannot be applied to existing compute volumes.
- External storage policies can only be edited via the command-line interface.
- Volumes with external storage policies cannot be reverted from snapshots.
To enable multipathing
On each compute node, configure and start the multipathing service:
-
Edit the configuration file /etc/multipath.conf as follows:
defaults { user_friendly_names yes find_multipaths yes polling_interval 10 } devices { device { vendor "PURE" product "FlashArray" fast_io_fail_tmo 10 path_grouping_policy "group_by_prio" failback "immediate" prio "alua" hardware_handler "1 alua" max_sectors_kb 4096 } } blacklist { device { vendor "QEMU" product "*" } }
For more details about the multipathing configuration, refer to Linux Recommended Settings.
-
Load the kernel module:
# modprobe dm-multipath
-
Launch and enable the multipathing service:
# systemctl start multipathd; systemctl enable multipathd
To attach an external storage
Use the following command:
# vinfra service compute storage add <storage_name> --params volume_backend_name=<storage_name>,\ volume_driver=cinder.volume.drivers.pure.PureISCSIDriver,san_ip=<ip_address>,use_multipath_for_image_xfer=True,\ image_volume_cache_enabled=True --secret-params pure_api_token=<token> --enable
Where:
<storage_name>
andvolume_backend_name=<storage_name>
is a custom name of your external storage. These two parameters must use the same name, otherwise you will not be able to create volumes in this external storage.volume_driver
is the name of the OpenStack volume driver. For Pure Storage, this name iscinder.volume.drivers.pure.PureISCSIDriver
.san_ip=<ip_address>
is the IP address of the external storage to connect to.use_multipath_for_image_xfer
should be set toTrue
to allow multipathing.image_volume_cache_enabled
should be set toTrue
to enable image-volume caching for the external storage, to improve the performance of creating a volume from an image.--secret-params
is intended to be used for sensitive data, like passwords or tokens. For example,pure_api_token=<token>
is the API token for a Pure Storage solution.
For example, to add the external storage purestorage
with the IP address 10.10.10.11, run:
# vinfra service compute storage add purestorage --params volume_backend_name=purestorage,\ volume_driver=cinder.volume.drivers.pure.PureISCSIDriver,san_ip=10.10.10.11,use_multipath_for_image_xfer=True,\ image_volume_cache_enabled=True --secret-params pure_api_token=7acb5db8-d312-4f66-b076-f556d6fa1232 --enable
Ensure that the data specified is valid. An incorrectly configured storage will lead to the critical state of the cinder-volume
service and the node itself. However, all other operations on the node will not be affected.
The added external storage will appear in the vinfra service compute storage list
output:
# vinfra service compute storage list +-------------+-----------------------------------------------------------+-----------------------+---------+------------+ | name | params | secret_params | enabled | configured | +-------------+-----------------------------------------------------------+-----------------------+---------+------------+ | purestorage | san_ip: 10.10.10.11 | pure_ip_token: ****** | True | True | | | use_multipath_for_image_xfer: True | | | | | | image_volume_cache_enabled: True | | | | | | volume_backend_name: purestorage | | | | | | volume_driver: cinder.volume.drivers.pure.PureISCSIDriver | | | | +-------------+-----------------------------------------------------------+-----------------------+---------+------------+
To create an external storage policy
Use the vinfra service compute storage-policy create
command specifying the external storage and desired custom parameters in the key-value format.
# vinfra service compute storage-policy create <policy_name> --storage <storage_name> --params <key=value>[,<key2=value2>,...]
For example, to create the storage policy purestorage-policy
for the external storage purestorage
, run:
# vinfra service compute storage-policy create purestorage-policy --storage purestorage
In the admin panel, the created storage policy will appear with the External type.
Once you create as many storage policies for your external storage as required, you can start applying them to new compute volumes.
To detach an external storage
-
Disconnect the external storage from the compute cluster. For example, to remove the external storage
purestorage
, run:# vinfra service compute storage remove purestorage
-
On each compute node, stop and disable the multipathing service:
# systemctl stop multipathd; systemctl disable multipathd
After detaching your external storage, you will have to manually delete storage policies associated with it.