Difference between revisions of "Xenapi-sm-volume-driver"
Line 38: | Line 38: | ||
== Design == | == Design == | ||
− | Definitions | + | === Definitions === |
− | |||
* Backend: A term for a particular storage backend. This could be iSCSI, NFS, Netapp etc. | * Backend: A term for a particular storage backend. This could be iSCSI, NFS, Netapp etc. | ||
* Backend-config: All the parameters required to connect to a specific backend. For e.g. For NFS, this would be the server, path, etc. This also includes which zone a particular backend is meant for. | * Backend-config: All the parameters required to connect to a specific backend. For e.g. For NFS, this would be the server, path, etc. This also includes which zone a particular backend is meant for. | ||
Line 47: | Line 46: | ||
A flavor can be associated with multiple backends. Some kind of policy will decide which backend will be used to create a volume of a particular flavor. | A flavor can be associated with multiple backends. Some kind of policy will decide which backend will be used to create a volume of a particular flavor. | ||
+ | |||
+ | Please look at the attached file for an entity relationship diagram.[[attachment:erd-xenapi-sm]] | ||
+ | |||
+ | === Operation === | ||
+ | Using the nova-manage command detailed in the implementation, an admin can add flavors and backends. | ||
+ | |||
+ | One or more nova-volume service instances will be deployed per availability zone. When an instance is started, it will created storage repositories (SRs) to connect to the backends available within that zone. All nova-volume instances within a zone can see all the available backends. These instances are completely symmetric and hence should be able to service any create_volume request within the zone. | ||
== Implementation == | == Implementation == | ||
− | |||
− | |||
− | |||
=== Commands === | === Commands === | ||
A category called “sm” has been added to nova-manage in the class '''[[StorageManagerCommands]]''' | A category called “sm” has been added to nova-manage in the class '''[[StorageManagerCommands]]''' | ||
Line 64: | Line 67: | ||
# backend_remove | # backend_remove | ||
− | + | === Tables === | |
+ | SM Flavor: | ||
+ | {| border="1" cellpadding="2" cellspacing="0" | ||
+ | |< >|Field | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Type | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Null | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Key | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Default | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|created_at | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|updated_at | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|deleted_at | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|deleted | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|tinyint(1) | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|id | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|int(11) | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NO | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|PRI | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|label | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|varchar(255) | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="72px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|description | ||
+ | |<width="83px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|varchar(255) | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="63px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="67px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |} | ||
− | |||
Backend-config: | Backend-config: | ||
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 140: | Line 192: | ||
|<width="60px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | |<width="60px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
|<width="64px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | |<width="64px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |} | ||
+ | |||
+ | SM Volume: | ||
+ | {| border="1" cellpadding="2" cellspacing="0" | ||
+ | |< >|Field | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Type | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Null | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Key | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|Default | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|created_at | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|updated_at | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|deleted_at | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|datetime | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|deleted | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|tinyint(1) | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|id | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|int(11) | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NO | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|PRI | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|backend_id | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|int(11) | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NO | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|MUL | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
+ | |- | ||
+ | |<width="79px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|vdi_uuid | ||
+ | |<width="102px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|varchar(255) | ||
+ | |<width="42px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|YES | ||
+ | |<width="69px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">| | ||
+ | |<width="70px" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0in 0in 0in 0.08in;">|NULL | ||
|} | |} | ||
Revision as of 00:40, 24 June 2011
- Launchpad Entry: NovaSpec:xenapi-sm-support
- Created: 1 February 2011
- Contributors: Renuka Apte, Armando Migliaccio
Summary
Design and implement a new driver for Nova-Volume, based on XenAPI Storage Manager. This will provide basic storage functionality (like volume creation, and destruction) on a number of different storage back-ends, but it will enable the capability of using more sophisticated storage back-ends for operations like cloning/snapshotting etc. To have an idea of the benefits of using XenAPI SM to provide back-end storage services, the list below shows some of the storage plugins already supported in XenServer/XCP:
- NFS VHD: SR plugin which stores disks as VHD files on a remote NFS filesystem
- Local VHD on LVM: SR plugin which represents disks as VHD disks on Logical Volumes within a locally-attached Volume Group
- HBA LUN-per-VDI driver: SR plugin which represents LUNs as VDIs sourced by hardware HBA adapters, e.g. hardware-based iSCSI or FC support
- NetApp: SR driver for mapping of LUNs to VDIs on a NETAPP server, providing use of fast snapshot and clone features on the filer
- LVHD over FC: SR plugin which represents disks as VHDs on Logical Volumes within a Volume Group created on an HBA LUN, e.g. hardware-based iSCSI or FC support
- iSCSI: Base ISCSI SR driver, provides a LUN-per-VDI. Does not support creation of VDIs but accesses existing LUNs on a target.
- LVHD over iSCSI: SR plugin which represents disks as Logical Volumes within a Volume Group created on an iSCSI LUN
- EqualLogic: SR driver for mapping of LUNs to VDIs on a EQUALLOGIC array group, providing use of fast snapshot and clone features on the array
Glossary
- XenServer: Commercial, supported product from Citrix
- Xen Cloud Platform (XCP): Open-source equivalent of XenServer (and the development project for the toolstack). Everything said about XenServer below applies equally to XCP
- XenAPI: The management API exposed by XenServer and XCP
- xapi: The primary daemon on XenServer and Xen Cloud Platform; the one that exposes the XenAPI
Release Note
No direct impact on user consuming the external HTTP API services. This blueprint enables the use of several storage back-ends by writing a single nova-volume driver, rather than several ones, as many as the specific storage back-ends required to be supported are needed. In due course, leveraging capabilities of specific back-ends, will enable operations like volume snapshotting, cloning, etc. that can be exposed via official API.
Rationale
This new driver will sit alongside drivers already developed like AoE, iSCSI and SAN (both running on commodity boxes running Linux). However, the latter is slightly different as it will still run on commodity hardware, but it access remote controllers on SAN hardware by some protocol like SSH, CLI or custom API. This is clearly undesirable because every time there is a need to support new hardware, a new driver must be designed and developed. The adoption of XenAPI SM will enable a number of storage back-end that are abstracted by a common API. Moreover, this becomes premium value to customers of service providers and may become differentiator for enterprise private clouds.
User stories
The system administrator of a medium sized company deploys a private cloud based on OpenStack. He had previously bought and deployed a NetApp filer to provide back-end storage to employees' virtual machines. He now uses XenAPISM volume driver to provide block storage to VMs created using the OpenStack private cloud.
A service provider wants to deliver premium storage to its customers. Storage back-ends like NetApp or EqualLogic can be easily supported using XenAPISM volume driver.
Assumptions
For the design and implementation of the new Nova-Volume driver, XenAPI for XenServer/XCP is going to be used.
Design
Definitions
- Backend: A term for a particular storage backend. This could be iSCSI, NFS, Netapp etc.
- Backend-config: All the parameters required to connect to a specific backend. For e.g. For NFS, this would be the server, path, etc. This also includes which zone a particular backend is meant for.
- Flavor: A user friendly term to specify some notion of quality of service. For example, "gold" might mean that the volumes will use a backend where backups are possible.
The concept of flavor has been introduced in keeping with the LUNR work. No API changes have been introduced to allow for creating a volume of a particular flavor. This will be deferred until the LUNR code is available.
A flavor can be associated with multiple backends. Some kind of policy will decide which backend will be used to create a volume of a particular flavor.
Please look at the attached file for an entity relationship diagram.attachment:erd-xenapi-sm
Operation
Using the nova-manage command detailed in the implementation, an admin can add flavors and backends.
One or more nova-volume service instances will be deployed per availability zone. When an instance is started, it will created storage repositories (SRs) to connect to the backends available within that zone. All nova-volume instances within a zone can see all the available backends. These instances are completely symmetric and hence should be able to service any create_volume request within the zone.
Implementation
Commands
A category called “sm” has been added to nova-manage in the class StorageManagerCommands
The following actions will be added:
- flavor_list
- flavor_create
- flavor_delete
- backend_list
- backend_add
- backend_remove
Tables
SM Flavor:
Field | Type | Null | Key | Default |
created_at | datetime | YES | NULL | |
updated_at | datetime | YES | NULL | |
deleted_at | datetime | YES | NULL | |
deleted | tinyint(1) | YES | NULL | |
id | int(11) | NO | PRI | NULL |
label | varchar(255) | YES | NULL | |
description | varchar(255) | YES | NULL |
Backend-config:
Field | Type | Null | Key | Default |
created_at | datetime | YES | NULL | |
updated_at | datetime | YES | NULL | |
deleted_at | datetime | YES | NULL | |
deleted | tinyint(1) | YES | NULL | |
id | int(11) | NO | PRI | NULL |
flavor_id | int(11) | NO | MUL | NULL |
sr_uuid | varchar(255) | YES | NULL | |
sr_type | varchar(255) | YES | NULL | |
config_params | varchar(2047) | YES | NULL | |
created | tinyint(1) | YES | NULL | |
zone | varchar(255) | NO | NULL |
SM Volume:
Field | Type | Null | Key | Default |
created_at | datetime | YES | NULL | |
updated_at | datetime | YES | NULL | |
deleted_at | datetime | YES | NULL | |
deleted | tinyint(1) | YES | NULL | |
id | int(11) | NO | PRI | NULL |
backend_id | int(11) | NO | MUL | NULL |
vdi_uuid | varchar(255) | YES | NULL |
Migration
This new driver may require changes to the database schema, more to follow once the actual implementation starts. However procedures to migrate DB schema will be provided.
Test/Demo Plan
Unit tests will be provided as code is developed.
Unresolved issues
None at the time of writing
BoF agenda and discussion
Related topics:
- Having VM's root devices running on block storage
- Thin provisioning
- Fast cloning
- Advanced volume API (Volume as a Service)
- Fibre channel and StorageLink
- Dedup