Skip to content

Instantly share code, notes, and snippets.

@madorn
Last active January 3, 2016 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madorn/8445517 to your computer and use it in GitHub Desktop.
Save madorn/8445517 to your computer and use it in GitHub Desktop.
Havana: Cinder

Havana: Cinder

Multiple-Storage Back-Ends

Multiple-storage back-end capability in Cinder was introduced in Grizzly.

This allows one to run multiple cinder volume back-ends and create groups of these back-ends based off unique volume drivers. Cinder volume backends are spawned as children to cinder-volume. The filter scheduler determines where to send the volume based on the volume type thats passed in.

Havana now introduces the ability to migrate volumes between multiple back-ends.

Edit cinder.conf

  1. Open /etc/cinder/cinder.conf
  2. Specify your multiple back-end names along with the volume driver and volume_backend_name.
[DEFAULT]
...
enabled_backends=cinder-volumes-1-driver,cinder-volumes-2-driver,cinder-volumes-3-driver
...
[cinder-volumes-1-driver]
volume_group=cinder-volumes-1
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=LVM
[cinder-volumes-2-driver]
volume_group=cinder-volumes-2
volume_driver=cinder.volume.drivers.lvm.LVMISCSIDriver
volume_backend_name=LVM      
[cinder-volumes-3-driver]
nfs_shares_config=/etc/cinder/shares.txt
volume_driver=cinder.volume.drivers.nfs.NfsDriver
volume_backend_name=NFS

volume_group

A volume group name. This is the name of the volume group that will be accessed by the driver.

volume_driver

A volume driver. This is the name of the driver that will be used when accessing the volume group.

volume_backend_name

A backend name or group name. This is an administrator-defined name for the backend, which groups the drivers so that user requests for storage served from the given backend can be serviced by any driver in the group. It is not related to the name of the configuration group which must be unique.

  1. Enable filter_scheduler
scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler

Setup Volume Back-ends

  1. Create a volume-type
cinder type-create lvm
  1. Link volume-type to back-end name:
cinder type-key lvm set volume_backend_name=LVM
  1. Create another volume-type
cinder type-create lvm_nfs
  1. Link volume-type to back-end name:
cinder type-key lvm_nfs set volume_backend_name=NFS

Create Volume Group

You must specifiy a volume type when creating cinder volumes with multiple back-ends configured:

cinder create --volume_type lvm --display_name test_multiple_backend1

Verify Back-ends

cinder-manage host list

Volume Migration

The Havana release of OpenStack introduces the ability to migrate volumes between back-ends.

  1. View your available back-ends:
$ cinder-manage host list
server1@lvmstorage-1    zone1
server2@lvmstorage-2    zone1
  1. Migrate a volume residing on lvmstorage-1 to lvmstorage-2:
cinder migrate <cinder-volume-id> <back-end>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment