Gnr/recoverygroups/pdisk/change : PUT

Changes the runtime state of a physical disk (pdisk). The disk is resumed or suspended depending on its current state.

Availability

Available on all IBM Storage Scale Erasure Code editions.

Description

The PUT scalemgmt/v2/gnr/recoverygroups/pdisk/change request changes the runtime state of a physical disk (disk). The state is resumed or suspended based on its status. For more information about the fields in the data structures that are returned, see the mmvdisk command

Request URL

https://<IP address or host name of API server>:<port>scalemgmt/v2/gnr/recoverygroups/pdisk/change
where
pdisk/change
Specifies pdisk/change as the resource. Required.

Request headers

Accept: application/json

Request data

The following list of attributes is available in the request data:

{
  "pdiskChangeArg": {
    "recoveryGroup": "string",
    "pdisk": "string",
    "identity": true | false,
    "clearErrorCounters": true | false,
    "diagnose": true | false,
    "suspend": true | false,
    "resume": true | false,
    "revive": true | false,
    "reviveFailing": true | false,
    "reviveSlow": true | false,
    "beginServiceDrain": true | false,
    "endServiceDrain": true | false,
    "simulateDead": true | false,
    "simulateFailing": true | false  }
}
The details of the parameters are given in the following list:
"pdiskChangeArg":
The parameters that are required to initiate the pdisk change process.
"recoveryGroup": "recovery group name"
Specifies the recovery group for the target pdisk.
"pdisk": "pdisk name"
Specifies the name of the physical disk.
"identity": true | false
Specifies whether the identity of the pdisk is authenticated.
"clearErrorCounters": true | false
Specifies whether the error counters for the pdisk are resolved.
"diagnose": true | false
Specifies whether basic tests can be run on the pdisk.
"suspend": true | false
Specifies whether the pdisk is suspended. If a pdisk remains in the suspended state longer than the predefined timeout period, IBM Storage Scale RAID begins rebuilding the data from that pdisk into spare space.
"resume": true | false
Specifies whether the previously suspended pdisk use is resumed.
"revive": true | false
Specifies whether the pdisk is made usable again by removing the pdisk state flags, dead, failing, and readonly.
"reviveFailing": true | false
Specifies that the pdisks that are marked with the failing state might be reused with the help of added diagnostic inputs.
"reviveSlow": true | false
Specifies that the pdisks that are marked with the slow state might be reused with the help of added diagnostic inputs.
"beginServiceDrain": true | false
Specifies whether all data can be drained out of the pdisk before it is temporarily removed.
"endServiceDrain": true | false
Specifies whether the drained data can be reloaded on to the pdisk.
"simulateDead": true | false
Specifies whether the simulatedDead state can be enabled to forcefully fail the pdisk.
"simulateFailing": true | false
Specifies whether the simulatedFailing state can be enabled to forcefully fail the pdisk.

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 the topic.

"jobs":
An array of elements that describe jobs. Each element describes one job.
"jobId": "ID",
Specifies the unique ID of the job.
"submitted": "Time"
Specifies the time at which the job was submitted.
"completed": "Time"
Specifies the time at which the job was completed.
"runtime": "Time"
Specifies the duration for which the job ran.
"status": "RUNNING | COMPLETED | FAILED"
Specifies the status of the job.
"result"
An array of commands that are run in this job.
"pids": list
Specifies a list of pids for this job.
"request"
"type": "{GET | POST | PUT | DELETE}"
Specifies the HTTP request type.
"url": "URL"
Specifies the URL through which the job is submitted.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.

Examples

The following example changes the runtime status of the recovery group rgL.

Request data:
curl -k -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Authorization: Basic YWRtaW46VHJhY2VAMjAyMQ==' -d 
'{"pdiskChangeArg":{ \
 "recoveryGroup": "rgL",\
 "pdisk": "e1d1s02",\ 
 "identity": false,\
 "clearErrorCounters": false,\
 "diagnose": false, \
 "suspend": false, \
 "resume": true,\
 "revive": false, \
 "reviveFailing": false, \
 "reviveSlow": false,\
 "beginServiceDrain": false, \
 "endServiceDrain": false,\
 "simulateDead": false, \
 "simulateFailing": false \
} \
}' 'https://198.51.100.1:443/scalemgmt/v2/gnr/recoverygroups/pdisk/change' 

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": 4000000000004,
      "status": "RUNNING",
      "submitted": "2021-04-27 06:31:37,838",
      "completed": "N/A",
      "runtime": 3,
      "request": {
        "type": "PUT",
        "url": "scalemgmt/v2/pdisk/change"
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": 202,
    "message": "The request was accepted for processing."
  }
}