Attach Storage Group to Partition
The Attach Storage Group to Partition operation attaches a storage group to a partition.
HTTP method and URI
POST /api/partitions/{partition-id}/operations/attach-storage-group
In this request, the URI variable {partition-id} is the object ID of the partition.
Request body contents
Name | Type | Rqd/Opt | Description |
---|---|---|---|
storage-group-uri | String/ URI | Required | The canonical URI of the Storage Group object to be attached to the partition. |
Description
The Attach Storage Group to Partition operation attaches the storage group to the partition specified by the {partition-id} portion of the request URI.
On successful execution, the storage group gets associated with the partition.
For a storage group of type "fc", the virtual storage resources are created if the partition is in one of the following states: "active", "degraded", "paused" or "terminated", if the fulfillment state of the storage group is "complete".
The virtual storage resources are created immediately on the storage ports depending on the status of the unassigned worldwide port names of the storage group. If the status of the worldwide port name is "validated", a previously verified storage port is used to create the virtual storage resource. If the status of the worldwide port name is "not-validated", a virtual storage resource is created without a storage port. In that case, a storage port is assigned to the virtual storage resource later, when DPM successfully verifies connectivity to the defined storage volumes on storage ports.
If this operation changes the value of any property for which property-change notifications are due, those notifications are emitted asynchronously to this operation.
This operation enables the operating system in the partition to access the storage volumes defined in the storage group, through the virtual storage resources that are assigned to storage ports. The operating system may not be able to access all the volumes defined in the storage group, until the fulfillment state of the storage group is "complete".
The URI path must designate an existing Partition object and the API user must have object-access permission to it. In addition, storage-group-uri field in the request body must designate an existing Storage Group and the API user must have object-access permission to that storage group.
If either of these conditions are not met, status code 404 (Not Found) is returned. In addition, the API user must have action/task permissions to Partition Details task; otherwise, status code 403 (Forbidden) is returned. If the request body is not valid, status code 400 (Bad Request) is returned with a reason code indicating the validation error encountered.
If the partition is in any of the transitional states ("starting" or "stopping") or if the CPC is not in a valid state, 409 (Conflict) status code is returned. If the partition does not have the "dpm-storage-management" feature enabled, a 409 (Conflict) status code is returned.
Authorization requirements
- Object-access permission to the Partition object designated by {partition-id}.
- Object-access permission to the Storage Group object designated by the storage-group-uri field.
- Action/task permission to the Partition Details task.
HTTP status and reason codes
On success, HTTP status code 204 (No Content) is returned and no response body is provided.
The following HTTP status codes are returned for the indicated errors, and the response body is a standard error response body providing the reason code indicated and associated error message.
HTTP error status code | Reason code | Description |
---|---|---|
400 (Bad Request) | Various | Errors were detected during common request validation. See Common request validation reason codes for a list of the possible reason codes. |
403 (Forbidden) | 1 | The API user does not have the required permission for this operation. |
404 (Not Found) | 1 | The object ID in the URI {partition-id} does not designate an existing partition object, or the API user does not have object-access permission to the partition. |
2 | The object ID in the storage group URI in request body field storage-group-uri does not designate an existing Storage Group object, or the API user does not have object-access permission to that storage group. | |
409 (Conflict) | 1 | Partition status is not valid to perform the operation. |
2 | Partition object with ID {partition-id} was busy performing some other operation. | |
6 | The state of the CPC hosting the partition is not valid to perform the operation (must be in one of the following states: "active", "service-required", "degraded", or "exceptions".) | |
13 | The operation is not supported when the "dpm-storage-management" feature is not enabled on the partition. | |
118 | The Storage Group specified by storage-group-uri is already attached to the partition. | |
119 | The Storage Group specified by storage-group-uriis already attached to maximum partitions according to its specification. | |
124 | The storage group object designated by the {storage-group-uri} was busy performing some other operation. | |
503 (Service Unavailable) | 1 | The request could not be processed because the HMC is not currently communicating with an SE needed to perform the requested operation. |
Additional standard status and reason codes can be returned, as described in Invoking API operations.