You can provision LUNs on your Storage Virtual Machines (SVMs) by using the provisioning APIs provided as a part of Active IQ Unified Manager. This provisioning workflow details the steps for retrieving the keys of the SVMs, Performance Service Levels, and Storage Efficiency Policies before creating the LUN.
The following diagram illustrates the steps in a LUN provisioning workflow.
Obtain the key for the Performance Service Level by running the following API and retrieving the key from the response.
Category | HTTP verb | Path |
---|---|---|
storage-provider | GET | /storage-provider/performance-service-levels |
Category | HTTP verb | Path |
---|---|---|
storage-provider | GET | /storage-provider/storage-efficiency-policies |
Determine if initiator groups (igroups) have been created to grant access to the LUN target that you want to create.
Category | HTTP verb | Path |
---|---|---|
datacenter | GET | /datacenter/protocols/san/igroups /datacenter/protocols/san/igroups/{key} |
You must enter the parameter value for indicating the SVM for which the igroup has authorized access. Additionally, if you want to query a particular igroup, enter the igroup name (key) as an input parameter.
In the output, if you can find the igroup that you want to grant access to, obtain the key. Otherwise create the igroup.
Category | HTTP verb | Path |
---|---|---|
datacenter | POST | /datacenter/protocols/san/igroups |
You must enter the details of the igroup that you want to create, as the input parameters. This is a synchronous call and you can verify the igroup creation in the output. In case of an error, a message is displayed for you to troubleshoot and rerun the APi.
Create the LUN.
Category | HTTP verb | Path |
---|---|---|
storage-provider | POST | /storage-provider/luns |
You must enter all the details of the LUN that you want to create, as the input parameters.
curl -X POST "https://<hostname>/api/storage-provider/luns" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic <Base64EncodedCredentials>" -d "{ \"name\": \"MigrationLunWithVol\", \"os_type\": \"windows\", \"performance_service_level\": { \"key\": \"7873dc0d-0ee5-11ea-82d7-fa163ea0eb69\" }, \"space\": { \"size\": 1024000000 }, \"svm\": { \"key\": \"333fbcfa-0ace-11ea-9d6d-00a09897cc15:type=vserver,uuid=4d462ec8-0f56-11ea-9d6d-00a09897cc15\" }}"
The JSON output displays a Job object key that you can use to verify the LUN that you created.
Verify the LUN creation by using the Job object key returned in querying the Job:
Category | HTTP verb | Path |
---|---|---|
management-server | GET | /management-server/jobs/{key} |
At the end of the response, you see the key of the LUN created.
{ "name": "lunKey", "value": "key": "f963839f-0f95-11ea-9963-00a098884af5:type=lun,uuid=71f3187e-bf19-4f34-ba34-b1736209b45a" } ], "_links": { "self": { "href": "/api/management-server/jobs/fa7c856d29e2b80f%3A-8d3325d%3A16e9eb5ed6d%3A-548b" } } }
Category | HTTP verb | Path |
---|---|---|
storage-provider | GET | /storage-provider/luns/{key} |
Sample JSON output
You can see that the POST method of /storage-provider/luns internally invokes all the APIs required for each of the functions and creates the object. For example, it invokes the /storage-provider/performance-service-levels/ API for assigning the Performance Service Level on the LUN.
{ "key": "f963839f-0f95-11ea-9963-00a098884af5:type=lun,uuid=71f3187e-bf19-4f34-ba34-b1736209b45a", "name": "/vol/NSLM_VOL_LUN_1574753881051/LunForTesting1", "uuid": "71f3187e-bf19-4f34-ba34-b1736209b45a", "cluster": { "uuid": "f963839f-0f95-11ea-9963-00a098884af5", "key": "f963839f-0f95-11ea-9963-00a098884af5:type=cluster,uuid=f963839f-0f95-11ea-9963-00a098884af5", "name": "sti2552-4451574693410", "_links": { "self": { "href": "/api/datacenter/cluster/clusters/f963839f-0f95-11ea-9963-00a098884af5:type=cluster,uuid=f963839f-0f95-11ea-9963-00a098884af5" } } }, "svm": { "uuid": "7754a99c-101f-11ea-9963-00a098884af5", "key": "f963839f-0f95-11ea-9963-00a098884af5:type=vserver,uuid=7754a99c-101f-11ea-9963-00a098884af5", "name": "Testingsvm1", "_links": { "self": { "href": "/api/datacenter/svm/svms/f963839f-0f95-11ea-9963-00a098884af5:type=vserver,uuid=7754a99c-101f-11ea-9963-00a098884af5" } } }, "volume": { "uuid": "961778bb-2be9-4b4a-b8da-57c7026e52ad", "key": "f963839f-0f95-11ea-9963-00a098884af5:type=volume,uuid=961778bb-2be9-4b4a-b8da-57c7026e52ad", "name": "NSLM_VOL_LUN_1574753881051", "_links": { "self": { "href": "/api/datacenter/storage/volumes/f963839f-0f95-11ea-9963-00a098884af5:type=volume,uuid=961778bb-2be9-4b4a-b8da-57c7026e52ad" } } }, "assigned_performance_service_level": { "key": "861f6e4d-0c35-11ea-9d73-fa163e706bc4", "name": "Value", "peak_iops": 75, "expected_iops": 75, "_links": { "self": { "href": "/api/storage-provider/performance-service-levels/861f6e4d-0c35-11ea-9d73-fa163e706bc4" } } }, "recommended_performance_service_level": { "key": null, "name": "Idle", "peak_iops": null, "expected_iops": null, "_links": {} }, "assigned_storage_efficiency_policy": { "key": null, "name": "Unassigned", "_links": {} }, "space": { "size": 1024458752 }, "os_type": "linux", "_links": { "self": { "href": "/api/storage-provider/luns/f963839f-0f95-11ea-9963-00a098884af5%3Atype%3Dlun%2Cuuid%3D71f3187e-bf19-4f34-ba34-b1736209b45a" } } }
The nodes <node_name> and <partner_node_name> have no LIFs configured with the iSCSI or FCP protocol for Vserver <server_name>. Use the access-endpoints API to create a LIF for the LUN.
Create an access endpoint supporting ISCSI/FCP protocol on the SVM on which you tried creating the LUN.
Category | HTTP verb | Path |
---|---|---|
storage-provider | POST | /storage-provider/access-endpoints |
Sample cURL
You must enter the details of the access endpoint that you want to create, as the input parameters.
curl -X POST "https://<hostname>/api/storage-provider/access-endpoints" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic <Base64EncodedCredentials>" -d "{ \"data_protocols\": [ \"iscsi\" ], \"ip\": { \"address\": \"10.162.83.126\", \"ha_address\": \"10.142.83.126\", \"netmask\": \"255.255.0.0\" }, \"lun\": { \"key\": \"e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=lun,uuid=b8e0c1ae-0997-47c5-97d2-1677d3ec08ff\" }, \"name\": \"aep_example\" }"
Category | HTTP verb | Path |
---|---|---|
management-server | GET | /management-server/jobs/{key} |
Sample JSON output
At the end of the output, you can see the key of the access endpoints created. In the following output, the "name": "accessEndpointKey" value indicates the access endpoint created on the home node of the LUN, for which the key is 9c964258-14ef-11ea-95e2-00a098e32c28. The "name": "accessEndpointHAKey" value indicates the access endpoint created on the partner node of the home node, for which the key is 9d347006-14ef-11ea-8760-00a098e3215f.
"job_results": [ { "name": "accessEndpointKey", "value": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=network_lif,lif_uuid=9c964258-14ef-11ea-95e2-00a098e32c28" }, { "name": "accessEndpointHAKey", "value": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=network_lif,lif_uuid=9d347006-14ef-11ea-8760-00a098e3215f" } ], "_links": { "self": { "href": "/api/management-server/jobs/71377eeea0b25633%3A-30a2dbfe%3A16ec620945d%3A-7f5a" } } }
Category | HTTP verb | Path |
---|---|---|
storage-provider | PATCH | /storage-provider/lun/{key} |
In the input, specify the igroup key with which you want to update the LUN mapping, along with the LUN key.
curl -X PATCH "https://<hostname>/api/storage-provider/luns/e4f33f90-f75f-11e8-9ed9-00a098e3215f%3Atype%3Dlun%2Cuuid%3Db8e0c1ae-0997-47c5-97d2-1677d3ec08ff" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic <Base64EncodedCredentials>" -d "{ \"lun_maps\": [ { \"igroup\": { \"key\": \"e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=igroup,uuid=d19ec2fa-fec7-11e8-b23d-00a098e32c28\" }, \"logical_unit_number\": 3 } ]}"
The JSON output displays a Job object key that you can use to verify whether the mapping is successful.
Category | HTTP verb | Path |
---|---|---|
storage-provider | GET | /storage-provider/luns/{key} |
Sample JSON output
In the output you can see the LUN has been successfully mapped with the igroup (key d19ec2fa-fec7-11e8-b23d-00a098e32c28) with which it was initially provisioned.
{ "key": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=lun,uuid=b8e0c1ae-0997-47c5-97d2-1677d3ec08ff", "name": "/vol/NSLM_VOL_LUN_1575282642267/example_lun", "uuid": "b8e0c1ae-0997-47c5-97d2-1677d3ec08ff", "cluster": { "uuid": "e4f33f90-f75f-11e8-9ed9-00a098e3215f", "key": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=cluster,uuid=e4f33f90-f75f-11e8-9ed9-00a098e3215f", "name": "umeng-aff220-01-02", "_links": { "self": { "href": "/api/datacenter/cluster/clusters/e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=cluster,uuid=e4f33f90-f75f-11e8-9ed9-00a098e3215f" } } }, "svm": { "uuid": "97f47088-fa8e-11e8-9ed9-00a098e3215f", "key": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=vserver,uuid=97f47088-fa8e-11e8-9ed9-00a098e3215f", "name": "NSLM12_SVM_ritu", "_links": { "self": { "href": "/api/datacenter/svm/svms/e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=vserver,uuid=97f47088-fa8e-11e8-9ed9-00a098e3215f" } } }, "volume": { "uuid": "a1e09503-a478-43a0-8117-d25491840263", "key": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=volume,uuid=a1e09503-a478-43a0-8117-d25491840263", "name": "NSLM_VOL_LUN_1575282642267", "_links": { "self": { "href": "/api/datacenter/storage/volumes/e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=volume,uuid=a1e09503-a478-43a0-8117-d25491840263" } } }, "lun_maps": [ { "igroup": { "uuid": "d19ec2fa-fec7-11e8-b23d-00a098e32c28", "key": "e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=igroup,uuid=d19ec2fa-fec7-11e8-b23d-00a098e32c28", "name": "lun55_igroup", "_links": { "self": { "href": "/api/datacenter/protocols/san/igroups/e4f33f90-f75f-11e8-9ed9-00a098e3215f:type=igroup,uuid=d19ec2fa-fec7-11e8-b23d-00a098e32c28" } } }, "logical_unit_number": 3 } ], "assigned_performance_service_level": { "key": "cf2aacda-10df-11ea-bbe6-fa163e599489", "name": "Value", "peak_iops": 75, "expected_iops": 75, "_links": { "self": { "href": "/api/storage-provider/performance-service-levels/cf2aacda-10df-11ea-bbe6-fa163e599489" } } }, "recommended_performance_service_level": { "key": null, "name": "Idle", "peak_iops": null, "expected_iops": null, "_links": {} }, "assigned_storage_efficiency_policy": { "key": null, "name": "Unassigned", "_links": {} }, "space": { "size": 1073741824 }, "os_type": "linux", "_links": { "self": { "href": "/api/storage-provider/luns/e4f33f90-f75f-11e8-9ed9-00a098e3215f%3Atype%3Dlun%2Cuuid%3Db8e0c1ae-0997-47c5-97d2-1677d3ec08ff" } } }