
Create block export.
Block export method is use to export one or more volumes to one or more hosts. This is a required step for a host to be able to access a block volume, although in some scenarios, additional configurations may be required. There are three main types of export group to meet the common use cases:
Once a block export is created, following incremental changes can be applied to it: - add volume or volume snapshot to the shared storage pool - remove volume or volume snapshot from the shared storage pool - add new server to the cluster by adding initiator from that server to the block export - remove visibility of shared storage to a server by removing initiators from the block export
Similar to block storage provisioning, block export is also created within the scope of a varray. Hence, volumes and snapshots being added to a block export must belong to the same varray. Fibre Channel and iSCSI initiators must be part of SANs belonging to the same varray as block export.
For Fibre Channel initiators, SAN zones will also be created when the export group is created if the networks are discovered and:
NOTE: This is an asynchronous operation.
This call has no restrictions.
All parameters are required unless otherwise stated.
Field | Description | Type | Notes |
<block_export_create> | |||
<clusters> | |||
<cluster> | URI |
0-* Elements |
|
</clusters> | |||
<hosts> | |||
<host> | URI |
0-* Elements |
|
</hosts> | |||
<initiators> | |||
<initiator> | URI |
0-* Elements |
|
</initiators> | |||
<name> | User assigned name for the export. | String |
Valid Values:
|
<project> | The ViPR project to which this export will belong. | URI | |
<type> | The type of export group which, in turn, shall dictate how masking views or storage groups will be created. | String | |
<varray> | The virtual array where this export is to be created. | URI | |
<volumes> | |||
<volume> |
0-* Elements |
||
<id> | URI of volume or volume snapshot to be added to the block export. This volume or snapshot must belong to the same virtual array as the block export. | URI | |
<lun> | Logical Unit Number for this volume or snapshot as seen by the initiators. This is an optional parameter. If not supplied, LUN number is auto-assigned. Set this only if the volume is to be visible to all initiators in a cluster with the same LUN number. | Integer | |
</volume> | |||
</volumes> | |||
<path_parameters> | |||
<max_paths> | Integer |
Valid Values:
|
|
<paths_per_initiator> | Integer |
Valid Values:
|
|
<min_paths> | Integer |
Valid Values:
|
|
<storage_ports> | |||
<storage_port> | URI |
0-* Elements |
|
</storage_ports> | |||
</path_parameters> | |||
</block_export_create> |
Block export details
This is an asychronous operation that returns a task object. For information on working with tasks, see Asynchronous Operations.
Field | Description | Type | Notes |
<task> | |||
<op_id> | The task operation id | String | |
<resource> | |||
<name> | The name of the resource | String | |
<id> | ViPR ID of the related object | URI | |
<link> | A hyperlink to the related object | ||
</resource> | |||
<tenant> | |||
<id> | ViPR ID of the related object | URI | |
<link> | A hyperlink to the related object | ||
</tenant> | |||
<associated_resources> | A list of links for associated resources | ||
<associated_resource> |
0-* Elements |
||
<name> | The name of the resource | String | |
<id> | ViPR ID of the related object | URI | |
<link> | A hyperlink to the related object | ||
</associated_resource> | |||
</associated_resources> | |||
<state> | The state of the task Valid values: queued = task is queued pending = task is pending ready = task succeed error = task fails suspended_error = task is suspended due to an error suspended_no_error = task is suspended due to config/request | String | |
<allowed_operations> | The allowed operations of the task | String | |
<message> | The task detail message | String | |
<description> | The description of the task | String | |
<service_error> | |||
<code> | The numerical code associated with the error encountered when processing a service request | Integer | |
<description> | The description of the error | String | |
<details> | Detailed information concerning the error | String | |
</service_error> | |||
<start_time> | The date and time of when the task was started | DateTime | |
<end_time> | The date and time of when the task ended | DateTime | |
<progress> | Integer | ||
<workflow> | |||
<id> | ViPR ID of the related object | URI | |
<link> | A hyperlink to the related object | ||
</workflow> | |||
<queuedStartTime> | DateTime | ||
<queueName> | String | ||
<name> | The name assigned to this resource in ViPR. The resource name is set by a user and can be changed at any time. It is not a unique identifier. | String | |
<id> | An identifier that is generated by ViPR when the resource is created. The resource ID is guaranteed to be unique and immutable across all virtual data centers for all time. | URI | |
<link> | A hyperlink to the details for this resource | ||
<creation_time> | A timestamp that shows when this resource was created in ViPR | DateTime | |
<tags> | Keywords and labels that can be added by a user to a resource to make it easy to find when doing a search. | ||
<tag> | String |
0-* Elements |
|
</tags> | |||
<inactive> | Whether or not the resource is inactive. When a user removes a resource, the resource is put in this state before it is removed from the ViPR database. | Boolean | |
<global> | Boolean | ||
<remote> | Boolean | ||
<vdc> | |||
<id> | ViPR ID of the related object | URI | |
<link> | A hyperlink to the related object | ||
</vdc> | |||
<internal> | Whether or not the resource is an internal resource. | Boolean | |
</task> |
POST: https://192.168.0.0:4443/block/exports.json HTTP/1.1 Content-Type: application/json X-SDS-AUTH-TOKEN: <AUTH_TOKEN> { "initiators": [ "urn:storageos:Initiator:10abf341-e0c2-4969-9105-56abdc077442:" ], "name": "rpSanity-lglw1039.lss.emc.com-13564", "project": "urn:storageos:Project:0884e6a1-4392-4949-9316-5a771ec14be6:", "type": "Exclusive", "varray": "urn:storageos:VirtualArray:3746b1cc-1980-4fe0-b897-a018ac08f224:", "volumes": [ { "id": "urn:storageos:BlockSnapshot:4fedc0c0-2ad3-4aec-a8b1-dc41227390e9:" } ] }
HTTP/1.1 202 Accepted Content-Type: application.json { "description": "create export", "link": { "href": "/block/exports/urn:storageos:ExportGroup:ca33f0b6-68c6-458a-8fa4-f1cb5fc231c3:/tasks/234a0c2f-9ada-4a1e-a9a1-687242ebd1e9", "rel": "self" }, "message": "create export", "op_id": "234a0c2f-9ada-4a1e-a9a1-687242ebd1e9", "resource": { "id": "urn:storageos:ExportGroup:ca33f0b6-68c6-458a-8fa4-f1cb5fc231c3:", "link": { "href": "/block/exports/urn:storageos:ExportGroup:ca33f0b6-68c6-458a-8fa4-f1cb5fc231c3:", "rel": "self" }, "name": "rpSanity-lglw1039.lss.emc.com-13564" }, "start_time": 1380722367013, "state": "pending" }