Gnr/recoverygroups/pdisk/replace : PUT
Replaces a failed physical disk (pdisk).
Availability
Available on all IBM Storage Scale Erasure Code editions.
Description
The PUT gnr/recoverygroups/pdisk/replace request replaces a failed physical disk (pdisk). For more information about the fields in the data structures that are returned, see mmvdisk command.
Request URL
https://<IP address or host name of API server>:<port>scalemgmt/v2/gnr/recoverygroups/pdisk/replace
where- pdisk/replace
- Specifies pdisk/replace as the resource. Required.
Request headers
Accept: application/json
Request data
The following list of attributes are available in the request data:
{
"pdiskReplaceArg": {
"recoveryGroup": "Name of the recovery group",
"prepare": true | false,
"cancel": true | false,
"force": true | false,
"pdisk": "The pdisk name"
}
}
The details of the parameters are given in the following list:
- "pdiskReplaceArg":
- The parameters that are required to initiate the pdisk replacement process.
- "recoveryGroup": "The recovery group name"
- Specifies the recovery group for the target pdisk.
- "prepare": true | false
- Specifies whether the disk is prepared for removal and replacement
- "cancel": true | false
- Specifies whether the preparation for the removal and replacement of the disk is canceled.
- "force": true | false
- Specifies whether the replacement disk is allowed to have a field replacement unit (FRU) or type that is different from the removed disk.
- "pdisk": "pdisk name"
- Specifies the name of the physical disk.
Response data
{
"jobs": [
{
"jobId": ID of the job,
"status": "Job status",
"submitted": "Date and time when job was submitted",
"completed": "Date and time when job was completed",
"runtime": Time when Job ran,
"request": {
"type": "Request Type",
"url": "Resource URL"
},
"result": {},
"pids": []
}
],
"status": {
"code": return status code,
"message": "Return message."
}
}
For more information about the fields in the following data structures, see the links at the end of this topic.
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "jobId": "ID",
- The unique ID of the job.
- "submitted": "Time"
- The time at which the job was submitted.
- "completed": "Time"
- The time at which the job was completed.
- "runtime": "Time"
- The duration for which the job ran.
- "status": "RUNNING | COMPLETED | FAILED"
- Status of the job.
- "result"
- Array of commands that are run in this job.
- "pids": list
- A list of pids for this job.
- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
Examples
The following example replaces the failed disk in the recovery group named rgR.
Request data:
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46VHJhY2VAMjAyMQ==' -d '{ \
"pdiskReplaceArg": { \
"recoveryGroup": "rgR", \
"prepare": false, \
"cancel": false, \
"force": false, \
"pdisk": "e1d1s08" \
} \
}' 'https://198.51.100.1:443/scalemgmt/v2/gnr/recoverygroups/pdisk/replace'
Response
data: Note: In the JSON data that is returned, the return code indicates whether
the command is successful. The response code 200 indicates that the command successfully retrieved
the information. Error code 400 represents an
invalid request and 500 represents internal server error.
{
"jobs": [
{
"jobId": 4000000000001,
"status": "RUNNING",
"submitted": "2021-04-27 06:31:37,838",
"completed": "N/A",
"runtime": 3,
"request": {
"type": "PUT",
"url": "scalemgmt/v2/gnr/recoverygroups/pdisk/replace"
},
"result": {},
"pids": []
}
],
"status": {
"code": 202,
"message": "The request was accepted for processing."
}
}