Export:Create Export Group

Search (SHIFT+S)



Create Export Group

POST /block/exports

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:

  1. Create an initiator type export group so that a single host can see one or more volumes. An example would be an export group for a host boot lun or a private volume that is meant to be used by only one host. The assumption is, in this case the user wants the boot or private volume to be accessed via known initiators. For this type of export, the request object is expected to have only initiators (i.e. no hosts or clusters). Further, the initiators are expected to belong to the same host. While an initiator type export group can belong to only one host, this does not mean the host can only have the initiator type export group. A hosts can be part of many export groups of any type. The export group type {@link ExportGroupType#Initiator} should be specified in the request for this type of export.
  2. Create an export group so that one or more hosts, which are not part of a cluster, can access one or more volumes. This is the use case of a shared data lun. In this case, it is assumed that the user wants all the hosts initiators that are connected to the storage array (up to the maximum specified by the virtual pool) to be able to access the volume. The export group type {@link ExportGroupType#Host} should be specified in the request for this type of export.
  3. Create an export group so that one or more clusters of hosts can access one or more volumes. This is the same use case of shared data lun as the {@link ExportGroupType#Host} use case with the exception that the user is managing a cluster of hosts as opposed to individual hosts. In this case, the same assumption about the initiators as in the previous case is made. The export group type {@link ExportGroupType#Cluster} should be specified in the request for this type of export.
Note that the above discussion only mentions volumes but mirrors and snapshots can also be used in export groups.

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:

  1. at least one of the Network Systems can provision the Vsan or Fabric in which the each endpoint exists, and
  2. the VirtualArray has "auto_san_zoning" set to true.
The SAN zones each consists of an initiator (from the arguments) and a storage port that is selected. The number of zones created will be determined from the number of required initiator/storage-port communication paths.

NOTE: This is an asynchronous operation.


Required Roles

This call has no restrictions.


Request Payload

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:
  •  Length: 2..128
<project> The ViPR project to which this export will belong. URI Valid Values:
  •  example: a valid URI of a ViPR project
<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 Valid Values:
  •  example: a valid URI of a varray
<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 Valid Values:
  •  example: URI of the volume or snapshot to be added to the block export.
<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>
</block_export_create>

Response Body

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 String Valid Values:
  •  pending = task is pending
  •  ready = task succeed
  •  error = task fails
<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>      
<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 Valid Values:
  •  urn:storageos:resource-type:UUID:
<link> A hyperlink to the details for this resource
<creation_time> A timestamp that shows when this resource was created in ViPR DateTime Valid Values:
  •  YYYY-MM-DDTHH:mm:ssZ
<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 Valid Values:
  •  true
  •  false
<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 Valid Values:
  •  true
  •  false
</task>

JSON Example

Request
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:"
        }
    ]
}
Response
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"
}
Notes: