Protocols NVMe services endpoint overview
Overview
A Non-Volatile Memory Express (NVMe) service defines the properties of the NVMe controller target for an SVM. There can be at most one NVMe service for an SVM. An SVM's NVMe service must be created before NVMe host initiators can connect to the SVM.
The Non-Volatile Memory Express (NVMe) service REST API allows you to create, update, delete, and discover NVMe services for SVMs.
Performance monitoring
Performance of the SVM can be monitored by the metric.*
and statistics.*
properties. These show the performance of the SVM in terms of IOPS, latency and throughput. The metric.*
properties denote an average whereas statistics.*
properties denote a real-time monotonically increasing value aggregated across all nodes.
Examples
Creating an NVMe service for an SVM
The simpliest way to create an NVMe service is to specify only the SVM, either by name or UUID. By default, the new NVMe service is enabled.
In this example, the return_records
query parameter is used to retrieve the new NVMe service object in the REST response.
# The API: POST /api/protocols/nvme/services # The call: curl -X POST 'https://<mgmt-ip>/api/protocols/nvme/services?return_records=true' -H 'accept: application/hal+json' -d '{ "svm": { "name": "svm1" } }' # The response: { "num_records": 1, "records": [ { "svm": { "uuid": "bfb1beb0-dc69-11e8-b29f-005056bb7341", "name": "svm1", "_links": { "self": { "href": "/api/svm/svms/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }, "enabled": true, "_links": { "self": { "href": "/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } } ] }
Retrieving the NVMe services for all SVMs in the cluster
# The API: GET /api/protocols/nvme/services # The call: curl -X GET 'https://<mgmt-ip>/api/protocols/nvme/services' -H 'accept: application/hal+json' # The response: { "records": [ { "svm": { "uuid": "ab60c350-dc68-11e8-9711-005056bbe408", "name": "svm0", "_links": { "self": { "href": "/api/svm/svms/ab60c350-dc68-11e8-9711-005056bbe408" } } }, "_links": { "self": { "href": "/api/protocols/nvme/services/ab60c350-dc68-11e8-9711-005056bbe408" } } }, { "svm": { "uuid": "bfb1beb0-dc69-11e8-b29f-005056bb7341", "name": "svm1", "_links": { "self": { "href": "/api/svm/svms/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }, "_links": { "self": { "href": "/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } } ], "num_records": 2, "_links": { "self": { "href": "/api/protocols/nvme/services" } } }
Retrieving details for a specific NVMe service
The NVMe service is identified by the UUID of its SVM.
# The API: GET /api/protocols/nvme/services/{svm.uuid} # The call: curl -X GET 'https://<mgmt-ip>/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341' -H 'accept: application/hal+json' # The response: { "svm": { "uuid": "bfb1beb0-dc69-11e8-b29f-005056bb7341", "name": "svm1", "_links": { "self": { "href": "/api/svm/svms/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }, "enabled": true, "_links": { "self": { "href": "/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }
Disabling an NVMe service
Disabling an NVMe service shuts down all active NVMe connections for the SVM and prevents the creation of new NVMe connections.
The NVMe service to update is identified by the UUID of its SVM.
# The API: PATCH /api/protocols/nvme/services/{svm.uuid} # The call: curl -X PATCH 'https://<mgmt-ip>/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341' -H 'accept: application/hal+json' -d '{ "enabled": "false" }'
You can retrieve the NVMe service to confirm the change.
# The API: GET /api/protocols/nvme/services/{svm.uuid} # The call: curl -X GET 'https://<mgmt-ip>/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341' -H 'accept: application/hal+json' # The response: { "svm": { "uuid": "bfb1beb0-dc69-11e8-b29f-005056bb7341", "name": "svm1", "_links": { "self": { "href": "/api/svm/svms/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }, "enabled": false, "_links": { "self": { "href": "/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341" } } }
Deleting an NVMe service
The NVMe service must be disabled before it can be deleted. In addition, all NVMe interfaces, subsystems, and subsystem maps associated with the SVM must first be deleted.
The NVMe service to delete is identified by the UUID of its SVM.
# The API: DELETE /api/protocols/nvme/services/{svm.uuid} # The call: curl -X DELETE 'https://<mgmt-ip>/api/protocols/nvme/services/bfb1beb0-dc69-11e8-b29f-005056bb7341' -H 'accept: application/hal+json'