The cinder volume driver allows using VDisks directly as cinder volumes. The current driver only supports access of the VDisks over iSCSI. FC support will be added next
Installation
The driver files can be downloaded from <a href="/virtentdub3z/quadstor-cinder.tgz>quadstor-cinder.tgz</a> Copy the driver files to the cinder volume drivers directory. For example on RHEL 6
# tar xvzf quadstor-cinder.tgz # cp -r quadstor /usr/lib/python2.6/site-packages/cinder/volume/drivers # ls -1 /usr/lib/python2.6/site-packages/cinder/volume/drivers/quadstor common.py __init__.py iscsi.py
Restart cinder volume, api and scheduler service
Driver parameters
cfg.StrOpt('vdisk_compression', default='off', help='Enable/Disable VDisk compression'), cfg.StrOpt('vdisk_pool', default=None, help='Storage pool for VDisks'), cfg.StrOpt('vdisk_deduplication', default='on', help='Enable/Disable VDisk deduplication'), cfg.StrOpt('vdisk_volume_prefix', default='', help='Prefix for VDisk names to identify that it is a cinder volume/snapshot'),
vdisk_compression when set to 'on' will create a vdisk with compression enabled. By default compression is disabled. vdisk_pool specifies the storage pool to which the vdisk will belong. If no storage pool is specified, the Default pool is used vdisk_deduplication enables or disabled data deduplication when the vdisk is created. By default data deduplication is enabled vdisk_volume_prefix specifies the prefix added to the name of the vdisk when it is created The cinder volume driver extends the san ISCSI driver and requires the following additional parameters
san_login san_password san_ip
Example configuration
Following is an example of additions to cinder.conf
enabled_backends=quadstor-1, quadstor-2 scheduler_driver=cinder.scheduler.filter_scheduler.FilterScheduler [quadstor-1] volume_driver=cinder.volume.drivers.quadstor.iscsi.QUADStorSanISCSIDriver volume_backend_name=QUADStorSanISCSIDriver san_login=root san_password=rootpass san_ip=10.0.13.120 vdisk_compression=on vdisk_volume_prefix=ostack [quadstor-2] volume_driver=cinder.volume.drivers.quadstor.iscsi.QUADStorSanISCSIDriver volume_backend_name=quadstor_iscsi san_login=root san_password=rootpass san_ip=10.0.13.120 vdisk_compression=off vdisk_deduplication=off vdisk_volume_prefix=cloud
In the above configuration 10.0.13.120 is the system where quadstor virtualization software is installed. san_login shall be root and san_password will be root's password. The commands are executed over ssh and the system should allow ssh logins for root. A simple way to test this is
$ ssh root@10.0.13.120 pwd root@10.0.13.120's password: /root
- Volume create, delete and extend
- Snapshot create and delete
Command line examples
# cinder --os-username admin --os-tenant-name admin type-create quadstor # cinder --os-username admin --os-tenant-name admin type-key quadstor set volume_backend_name=QUADStorSanISCSIDriver # cinder --os-username admin --os-tenant-name admin type-create quadstor2 # cinder --os-username admin --os-tenant-name admin type-key quadstor2 set volume_backend_name=quadstor_iscsi # cinder extra-specs-list +--------------------------------------+-----------+-----------------------------------------------------+ | ID | Name | extra_specs | +--------------------------------------+-----------+-----------------------------------------------------+ | 157f1ae7-69ed-45ba-bb4f-313ee81a0282 | quadstor2 | {u'volume_backend_name': u'quadstor_iscsi'} | | a8aa6061-bd15-4737-8439-ae023e6d54ac | quadstor | {u'volume_backend_name': u'QUADStorSanISCSIDriver'} | # cinder create --volume_type quadstor --display_name vdisk3 20 # cinder create --volume_type quadstor2 --display_name vdisk4 20 # cinder list +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+ | 2f7efd4f-2b81-48d8-b347-8f0df7cc2b22 | available | vdisk4 | 20 | quadstor | false | | | 57c12d49-3167-4219-907e-3bdc7c819c5c | available | vdisk3 | 20 | quadstor2 | false | | +--------------------------------------+-----------+--------------+------+-------------+----------+-------------+