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:[bash]cd /opt/pf9/etc/pf9-cindervolume-base/conf.d
Add the following snippet of configuration to cinder_override.conf:[ini][DEFAULT] enabled_backends=nfs-hdd,nfs-ssd,solidfire-backend
[nfs-hdd] volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = nfs-hdd-type
nfs_shares_config = /tmp/nfs-hdd.conf
[nfs-ssd] volume_driver = cinder.volume.drivers.nfs.NfsDriver
volume_backend_name = nfs-ssd-type
nfs_shares_config = /tmp/nfs-ssd.conf
[solidfire-backend] volume_backend_name =solidfire-backend
volume_driver = cinder.volume.drivers.solidfire.SolidFireDriver
san_ip = 10.4.0.27
san_login = <solidfire_username>
san_password = <solidfire_password>
sf_account_prefix = ”[/ini]
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:[bash]$ sudo service pf9-cindervolume-base restart[/bash]
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.
Note: If the volume type is defined in the database, but no volume types exist for that backend in the configuration, then no valid host is found.
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.