Configure Multiple Storage Backends in Cinder
This article explains how to configure a block storage node with multiple storage backends.
Authorize a host with the Block Storage role before continuing this tutorial. You may select any driver on the authorization step. The driver selected on the authorization step won't be used. The steps outlined below show you how to set the driver for each storage backend.
If you already have a host authorized as a block storage node, you may continue with the configuring the block storage node as given below.
Multiple storage backend configuration
To enable support for multiple storage backends on a single block storage node, update the configuration file as shown below.
For this article, we assume the following.
NFS server 1: 10.4.0.25 (hdd)
NFS server 2: 10.4.0.26 (ssd)
SolidFire appliance: 10.4.0.27
Block Storage node: 10.4.0.28
We want the block storage node (10.4.0.28) to use NFS servers 1 and 2 as well as the SolidFire appliance as storage pools.
SSH into the block storage node and create a file named cinder_override.conf in /opt/pf9/etc/pf9-cindervolume-base/conf.d:
Add the following snippet of configuration to cinder_override.conf:
It is important to append the name of the config group (e.g. nfs-ssd) to the list of enabled_backends. Otherwise, Cinder ignores that particular config group.
Each config group must have at least the following parameters.
The choice of volume_driver dictates additional parameters to be set. For NFS, nfs_shares_config is required. This parameter sets the path to the NFS exports to be used for this storage backend.
Drivers available to Cinder are available here. Use the dot notation format to access the desired driver. See the examples above.
Restart the pf9-cindervolume service on the block storage node:
Here's an example nfs-hdd.conf:
An example nfs-ssd.conf:
To use select a particular storage backend when creating volumes, a volume type must be created referencing the volume_backend_name. For more information on volume types, please read this article. For our purposes here, let us create volume types for each of our storage backends.
- Create a new volume type by clicking on the Create New Volume Type as seen above.
- Fill in the desired name for the volume type.
- Select the desired volume backend name
- Create a key volume_backend_name with value nfs-hdd-type.
The value for the volume_backend_name should be the same as the ones in your cinder_override.conf.
- Click Create Volume Type to create the volume type.
You can creating the remaining volume types in a similar way.
You are now be able to create volumes on specific storage backends using their corresponding volume types.
July 01, 2016