|
| 1 | +# Unity Cinder Driver |
| 2 | + |
| 3 | +Copyright (c) 2016 EMC Corporation. |
| 4 | +All Rights Reserved. |
| 5 | + |
| 6 | +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at |
| 7 | + |
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + |
| 10 | +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +See the License for the specific language governing permissions and limitations under the License. |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +EMCUnityDriver (a.k.a. Unity Cinder Driver) is based on the SanDriver defined in Cinder, with the ability to create/delete, attach/detach volumes, create/delete snapshots, etc. |
| 16 | + |
| 17 | +EMCUnityDriver performs the volume operations by Restful API management interface. |
| 18 | + |
| 19 | +## Supported OpenStack Release |
| 20 | + |
| 21 | +This driver supports Mitaka release. |
| 22 | + |
| 23 | +## Requirements |
| 24 | + |
| 25 | +* Unity with OE V4.0.x |
| 26 | + |
| 27 | +## Supported Storage Protocol |
| 28 | + |
| 29 | +* iSCSI |
| 30 | +* Fibre Channel |
| 31 | + |
| 32 | +## Supported Operations |
| 33 | + |
| 34 | +The following operations will be supported by Unity Cinder Driver: |
| 35 | + |
| 36 | +* Create volume |
| 37 | +* Delete volume |
| 38 | +* Extend volume |
| 39 | +* Attach volume |
| 40 | +* Detach volume |
| 41 | +* Create snapshot |
| 42 | +* Delete snapshot |
| 43 | +* Copy Image to Volume |
| 44 | +* Copy Volume to Image |
| 45 | +* Create and delete consistency groups |
| 46 | +* Create, list, and delete consistency group snapshots |
| 47 | +* Modify consistency groups |
| 48 | + |
| 49 | +## Preparation |
| 50 | + |
| 51 | +### Install Unity Cinder Driver |
| 52 | + |
| 53 | +Unity Cinder Driver (EMCUnityDriver) is provided in the installer package consists of one python file: |
| 54 | + |
| 55 | + emc_unity.py |
| 56 | + |
| 57 | +Copy the above python file to the `cinder/volume/drivers/emc/` directory of your OpenStack node(s) where cinder-volume is running. |
| 58 | + |
| 59 | +### San Connection |
| 60 | + |
| 61 | +To access the storage of Unity/Unity array, OpenStack nodes must have iSCSI or Fibre Channel connection with Unity/Unity. |
| 62 | + |
| 63 | +#### iSCSI |
| 64 | + |
| 65 | +Make sure that OpenStack nodes have ethernet connection with array's iSCSI ports. |
| 66 | + |
| 67 | +#### Fibre Channel |
| 68 | + |
| 69 | +Make sure OpenStack nodes's FC ports and array's FC ports are connected. If FC SAN Auto Zoning is not enabled, zoning need be set up so that OpenStack nodes' FC ports can access array's FC ports |
| 70 | + |
| 71 | +## Backend Configuration |
| 72 | + |
| 73 | +Make the following changes in `/etc/cinder/cinder.conf`: |
| 74 | + |
| 75 | +Following are the elements specific to EMC Unity driver to be configured |
| 76 | + |
| 77 | + # Storage protocol |
| 78 | + storage_protocol = iSCSI |
| 79 | + # Storage pool which the backend is going to manage |
| 80 | + storage_pool_names = StoragePool00, StoragePool01 |
| 81 | + # Unisphere IP |
| 82 | + san_ip = 192.168.1.58 |
| 83 | + # Unisphere username and password |
| 84 | + san_login = Local/admin |
| 85 | + san_password = Password123! |
| 86 | + # Volume driver name |
| 87 | + volume_driver = cinder.volume.drivers.emc.emc_unity.EMCUnityDriver |
| 88 | + # backend's name |
| 89 | + volume_backend_name = Storage_ISCSI_01 |
| 90 | + |
| 91 | + [database] |
| 92 | + max_pool_size=20 |
| 93 | + max_overflow=30 |
| 94 | + |
| 95 | + |
| 96 | +* where `san_ip` is one of the Management IP address of the Unity array. |
| 97 | +* where `storage_pool_names` is the comma separated pool names from which user wants to create volumes. The pools can be created using Unisphere for Unity. This option is optional. Refer to the "Multiple Pools Support" for more details |
| 98 | +* Restart of cinder-volume service is needed to make the configuration change take effect. |
| 99 | + |
| 100 | +## Authentication |
| 101 | + |
| 102 | +Unity credentials are needed so that the driver could interact with the array. Credentials in Local and LDAP scopes are supported. |
| 103 | + |
| 104 | +* Local user's san_login: Local/<username> or <username> |
| 105 | +* LDAP user's san_login: <LDAP Domain Name>/<username> |
| 106 | + |
| 107 | +## Multiple Pools Support |
| 108 | + |
| 109 | +Option `storage_pool_names` is used to specify which storage pool or pools of a Unity/Unity system could be used by a Block Storage back end. To specify more than one pool, separate storage pool names with a comma. |
| 110 | +If `storage_pool_names` is not configured, the Block Storage back end uses all the pools on the array. The scheduler will choose which pool to place the volume based on the capacities and capabilities of the pools when more than one pools are managed by a Block Storage back end. |
| 111 | +Note that the option 'storage_pool_name' has been deprecated, the user should use the option 'storage_pool_names' instead. |
| 112 | + |
| 113 | +When a Block Storage back end is managing more than one pool, if the user wants to create a volume on a certain storage pool, a volume type with an extra spec specified storage pool should be created first, then the user can use this volume type to create the volume. |
| 114 | + |
| 115 | +Here is an example about the volume type creation: |
| 116 | + |
| 117 | + cinder type-create "HighPerf" |
| 118 | + cinder type-key "HighPerf" set pool_name=Pool_02_SASFLASH volume_backend_name=unity_1 |
| 119 | + |
| 120 | +## Multi-backend configuration |
| 121 | + |
| 122 | + [DEFAULT] |
| 123 | + |
| 124 | + enabled_backends=backendA, backendB |
| 125 | + |
| 126 | + [backendA] |
| 127 | + |
| 128 | + storage_protocol = iSCSI |
| 129 | + san_ip = 192.168.1.58 |
| 130 | + san_login = Local/admin |
| 131 | + san_password = Password123! |
| 132 | + volume_driver = cinder.volume.drivers.emc.emc_unity.EMCUnityDriver |
| 133 | + volume_backend_name = backendA |
| 134 | + |
| 135 | + [backendB] |
| 136 | + storage_protocol = FC |
| 137 | + storage_pool_names = StoragePool01 |
| 138 | + san_ip = 192.168.1.58 |
| 139 | + san_login = Local/admin |
| 140 | + san_password = Password123! |
| 141 | + volume_driver = cinder.volume.drivers.emc.emc_unity.EMCUnityDriver |
| 142 | + volume_backend_name = backendB |
| 143 | + |
| 144 | + [database] |
| 145 | + |
| 146 | + max_pool_size=20 |
| 147 | + max_overflow=30 |
| 148 | + |
| 149 | +For more details on multi-backend, see [OpenStack Administration Guide](http://docs.openstack.org/admin-guide-cloud/content/multi_backend.html) |
| 150 | + |
| 151 | +## Restriction of deployment |
| 152 | + |
| 153 | +It is not suggested to deploy the driver on Nova Compute Node if "cinder upload-to-image --force True" is to be used against an in-use volume. Otherwise, "cinder upload-to-image --force True" will terminate the VM instance's data access to the volume. |
| 154 | + |
| 155 | +## Thick/Thin Provisioning |
| 156 | + |
| 157 | +Use Cinder Volume Type to define a provisioning type and the provisioning type could be either thin or thick. |
| 158 | + |
| 159 | +Here is an example of how to create thick/thin volume. First create volume types. Then define extra specs for each volume type. |
| 160 | + |
| 161 | + cinder --os-username admin --os-tenant-name admin type-create "ThickVolume" |
| 162 | + cinder --os-username admin --os-tenant-name admin type-create "ThinVolume" |
| 163 | + cinder --os-username admin --os-tenant-name admin type-key "ThickVolume" set storagetype:provisioning=thick |
| 164 | + cinder --os-username admin --os-tenant-name admin type-key "ThinVolume" set storagetype:provisioning=thin |
| 165 | + |
| 166 | +In the example above, two volume types are created: `ThickVolume` and `ThinVolume`. For `ThickVolume`, `storagetype:provisioning` is set to `thick`. Similarly for `ThinVolume`. If `storagetype:provisioning` is not specified, default value `thick` is adopted. |
| 167 | + |
| 168 | +Volume Type names `ThickVolume` and `ThinVolume` are user-defined and can be any names. Extra spec key `storagetype:provisioning` has to be the exact name listed here. Extra spec value for `storagetype:provisioning` has to be either `thick` or `thin`. |
| 169 | +During volume creation, if the driver find `storagetype:provisioning` in the extra spec of the Volume Type, it will create the volume of the provisioning type accordingly. Otherwise, the volume will be default to thick. |
| 170 | + |
| 171 | +## FC SAN Auto Zoning |
| 172 | + |
| 173 | +Unity cinder driver supports FC SAN auto zoning when ZoneManager is configured. Set "zoning_mode" to "fabric" in default section to enable this feature. For ZoneManager configuration, please refer to Block Storage official guide. |
| 174 | + |
| 175 | +## Read-only Volumes |
| 176 | + |
| 177 | +OpenStack support read-only volumes. Administrators can use following command to set a volume as read-only. |
| 178 | + |
| 179 | + cinder --os-username admin --os-tenant-name admin readonly-mode-update <volume> True |
| 180 | + |
| 181 | +After a volume is marked as read-only, the driver will forward the information when a hypervisor is attaching the volume and the hypervisor will have implementation-specific way to make sure the volume is not written. |
| 182 | + |
| 183 | +## Over subscription in thin provisioning |
| 184 | + |
| 185 | +Over subscription allows that the sum of all volumes' capacity (provisioned capacity) to be larger than the pool's total capacity. |
| 186 | + |
| 187 | +`max_over_subscription_ratio` in the back-end section is the ratio of provisioned capacity over total capacity. |
| 188 | + |
| 189 | +The default value of `max_over_subscription_ratio` is 20.0, which means the provisioned capacity can be 20 times of the total capacity. If the value of this ratio is set larger than 1.0, the provisioned capacity can exceed the total capacity. |
0 commit comments