Chapter 5. Test the Configured Back End
After you deploy the back ends to the overcloud, test if you can successfully create volumes on them. You must load the necessary environment variables first. The variables are defined in /home/stack/overcloudrc by default.
-
To load the variables, run the following command as the
stackuser:
source /home/stack/overcloudrc
$ source /home/stack/overcloudrc
For more information, see Accessing the overcloud in the Director Installation and Usage guide.
-
Create a volume type for each back end. Log in to the Controller node of the overcloud as the
stackuser and run the following command:
cinder type-create backend1 cinder type-create backend2
$ cinder type-create backend1
$ cinder type-create backend2
These commands create the volume types backend1 and backend2, one for each back end defined through the cinder::config::cinder_config class of envfile.
-
Map each volume type to the
volume_backend_nameof a back end enabled through thecinder_user_enabled_backendsclass ofenvfile. The following commands map the volume typebackend1tonetapp1andbackend2tonetapp2:
cinder type-key backend1 set volume_backend_name=netapp1 cinder type-key backend2 set volume_backend_name=netapp2
$ cinder type-key backend1 set volume_backend_name=netapp1
$ cinder type-key backend2 set volume_backend_name=netapp2
-
You can now test each back end. Create a 1GB volume named
netapp_volume_1on thenetapp1back end by invoking thebackend1volume type:
cinder create --volume-type backend1 --display_name netappvolume_1 1
$ cinder create --volume-type backend1 --display_name netappvolume_1 1
-
Create a similar volume on the
netapp2back end by invoking thebackend2volume type:
cinder create --volume-type backend2 --display_name netappvolume_2 1
$ cinder create --volume-type backend2 --display_name netappvolume_2 1