Jump to: navigation, search

Difference between revisions of "Xenapi-sm-volume-driver"

m
 
(30 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
+
 
 
<!-- ## page was renamed from xenapi-sm-support -->
 
<!-- ## page was renamed from xenapi-sm-support -->
* '''Launchpad Entry''': [[NovaSpec]]:xenapi-sm-support
+
* '''Launchpad Entry''': NovaSpec:xenapi-sm-support
 
* '''Created''': 1 February 2011
 
* '''Created''': 1 February 2011
* '''Contributors''': Armando Migliaccio
+
* '''Contributors''': Renuka Apte, Armando Migliaccio
  
 
== Summary ==
 
== 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
  
TBD
+
== 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 ==
 
== 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.
This section should include a paragraph describing the end-user impact of this change.  It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)
 
 
 
It is mandatory.
 
  
 
== Rationale ==
 
== 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 ==
 
== 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 ==
 
== Assumptions ==
 +
For the design and implementation of the new Nova-Volume driver, XenAPI for [[XenServer]]/XCP is going to be used.
  
 
== Design ==
 
== 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.
 +
* 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. Until we have a way of selecting flavor, we will use a simple "first-fit" policy, where the first backend that can successfully create this volume is the one that is used.
 +
 +
The entity relationship diagram is given below:
 +
 +
[[Image:erd-xenapi-sm.png]]
 +
 +
=== Operation ===
 +
Using the nova-manage command detailed in the implementation, an admin can add flavors and backends.
  
You can have subsections that better describe specific parts of the issue.
+
One or more nova-volume service instances will be deployed per availability zone. When an instance is started, it will create 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 ===
 +
A category called “sm” has been added to nova-manage in the class '''[[StorageManagerCommands]]'''
  
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:
+
The following actions will be added:
  
=== UI Changes ===
+
# flavor_list
 +
# flavor_create
 +
# flavor_delete
 +
# backend_list
 +
# backend_add
 +
# backend_remove
  
Should cover changes required to the UI, or specific UI that is required to implement this
+
Usage:
  
=== Code Changes ===
+
nova-manage sm flavor_create <label> <description>
 +
 
 +
nova-manage sm flavor_delete<label>
 +
 
 +
nova-manage sm backend_add <flavor label> <SR type> [config connection parameters]
 +
 
 +
Note: SR type and config connection parameters are in keeping with the Xen Command Line Interface. http://support.citrix.com/article/CTX124887
 +
 
 +
nova-manage sm backend_delete <backend-id>
 +
 
 +
Examples:
 +
 
 +
nova-manage sm flavor_create gold "Not all that glitters"
 +
 
 +
nova-manage sm flavor_delete gold
 +
 
 +
nova-manage sm backend_add gold nfs name_label=toybox-renuka server=myserver serverpath=/local/scratch/myname
 +
 
 +
nova-manage sm backend_remove 1
 +
 
 +
=== API Changes ===
 +
As mentioned above, the API changes required to create/delete a volume''' '''''of a particular flavor ''will be deferred till the LUNR code is available. It is therefore not possible to create a volume for a particular flavor yet, although the code/design exists.
 +
 
 +
The existing euca-create-volume and euca-delete-volume commands should be used.
 +
 
 +
=== New 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:
 +
{| border="1" cellpadding="2" cellspacing="0"
 +
|< >|Field
 +
|<width="91px" 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="58px" 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="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;          ">|Key
 +
|<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;          ">|Default
 +
|-
 +
|<width="89px" 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="91px" 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="58px" 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="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="89px" 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="91px" 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="58px" 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="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="89px" 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="91px" 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="58px" 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="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="89px" 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="91px" 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="58px" 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="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="89px" 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="91px" 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="58px" 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="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;          ">|PRI
 +
|<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="89px" 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;          ">|flavor_id
 +
|<width="91px" 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="58px" 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="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;          ">|MUL
 +
|<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="89px" 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;          ">|sr_uuid
 +
|<width="91px" 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="58px" 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="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="89px" 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;          ">|sr_type
 +
|<width="91px" 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="58px" 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="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="89px" 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;          ">|config_params
 +
|<width="91px" 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(2047)
 +
|<width="58px" 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="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
 +
|}
  
Code changes should include an overview of what needs to change, and in some cases even the specific details.
+
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
 +
|}
  
=== Migration ===
+
=== Code Changes ===
 +
A new volume driver called XenSMDriver has been added to nova/volume. It leverages the xenapi  storage manager to control the available backends. Functions have been exposed to create/forget storage repositories and connect to them.
  
Include:
+
A do_setup function is added to volume driver in order to perform initialization (which includes creating backend repositories) when the service is started.
* data migration, if any
 
* redirects from old URLs to new ones, if any
 
* how users will be pointed to the new way of doing things, if necessary.
 
  
 
== Test/Demo Plan ==
 
== Test/Demo Plan ==
 
+
Unit tests will be provided as code is developed.
This need not be added or completed until the specification is nearing beta.
 
  
 
== Unresolved issues ==
 
== Unresolved issues ==
 
+
None at the time of writing
This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.
 
  
 
== BoF agenda and discussion ==
 
== BoF agenda and discussion ==
 +
Related topics:
  
Use this section to take notes during the BoF; if you keep it in the approved spec, use it for summarising what was discussed and note any options that were rejected.
+
* 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
  
 
----
 
----
 
[[Category:Spec]]
 
[[Category:Spec]]

Latest revision as of 20:50, 21 April 2015

  • 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.
  • 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. Until we have a way of selecting flavor, we will use a simple "first-fit" policy, where the first backend that can successfully create this volume is the one that is used.

The entity relationship diagram is given below:

Erd-xenapi-sm.png

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 create 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:

  1. flavor_list
  2. flavor_create
  3. flavor_delete
  4. backend_list
  5. backend_add
  6. backend_remove

Usage:

nova-manage sm flavor_create <label> <description>

nova-manage sm flavor_delete<label>

nova-manage sm backend_add <flavor label> <SR type> [config connection parameters]

Note: SR type and config connection parameters are in keeping with the Xen Command Line Interface. http://support.citrix.com/article/CTX124887

nova-manage sm backend_delete <backend-id>

Examples:

nova-manage sm flavor_create gold "Not all that glitters"

nova-manage sm flavor_delete gold

nova-manage sm backend_add gold nfs name_label=toybox-renuka server=myserver serverpath=/local/scratch/myname

nova-manage sm backend_remove 1

API Changes

As mentioned above, the API changes required to create/delete a volume of a particular flavor will be deferred till the LUNR code is available. It is therefore not possible to create a volume for a particular flavor yet, although the code/design exists.

The existing euca-create-volume and euca-delete-volume commands should be used.

New 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

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

Code Changes

A new volume driver called XenSMDriver has been added to nova/volume. It leverages the xenapi storage manager to control the available backends. Functions have been exposed to create/forget storage repositories and connect to them.

A do_setup function is added to volume driver in order to perform initialization (which includes creating backend repositories) when the service is started.

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