Filesystems/{filesystemName}/restripefs: PUT

Rebalances or restores the replication factor of all the files in the specified file system.

Availability

Available on all IBM Storage Scale editions.

Description

The PUT scalemgmt/v2/filesystems/{filesystemName}/restripefs request rebalances or restores the replication factor of all the files in the specified file system. For more information about the fields in the data structures that are returned, see mmrestripefs command.

Request URL

https://IP address or host name of API server:port/scalemgmt/v2/filesystems//filesystemName/restripefs
where:
filesystems
Specifies the resource that is updated for this PUT request. Required.
restripefs
Specifies the information that needs to be updated. Required.

Request headers

Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
filesystemName The name of the file system where the files belong. Required.
body Body of the request that contains the required parameters to be passed on to the IBM Storage Scale system to perform the requested operation. Required.

Request data

{
"qoSClass": "maintenance | other",
"poolName": "string",
"nodeClass": "string",
"migrateCriticalFlag": "true | false",
"migrateAllFlag": true | false,
"changeReplicationFlag": " true | false",
"repairFlag": " true | false",
"performFlag": " true | false",
"performFlag": " true | false",
"conflictFlag": " true | false",
"rebalanceFlag": " true | false,
"rebalanceStrictFlag": " true | false",}
For more information about the fields in the following data structures, see the links at the end of the topic.
"qoSClass": "maintenance | other"
Specifies the Quality of Service for I/O operations (QoS) class that is assigned to the command instance.
"poolName": "Name"
The name of the storage pool that comprises the files that are being repaired.
"nodeClass": "Name"
Specifies the node class that comprises the nodes that are participating in the restripe of the file system.
"migrateCriticalFlag": "true |false"
Specifies whether any critical data is migrated from any suspended disk in the specified file system. Critical data refers to all data that is lost if currently suspended disks were removed.
"migrateAllFlag": true |false
Specifies whether all the data is migrated from the suspended disks.
"changeReplicationFlag": true | false
Specifies whether the replication settings of each file, directory, and system metadata object are changed to match them with the default file system settings.
"repairFlag": true | false
Specifies whether file placement within the storage pool must be repaired.
"performFlag": true | false
Specifies whether any deferred or incomplete compression or decompression of files exist in the file system .
"conflictFlag": true | false
Specifies whether the file system is scanned and the replicas of metadata and data are compared to report any conflicts existing between them.
"rebalanceFlag": true | false
Specifies whether the file system is being rebalanced to enhance performance. Rebalancing attempts to distribute file blocks evenly across the disks of the file system.
"rebalanceStrictFlag": true | false
Specifies whether the rebalancing is done by using a strict round-robin method.

Response data

{
   "status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   "jobs": [
      {
         "result":"", 
           { 
             "commands":"String",
             "progress":"String,
             "exitCode":"Exit code",
             "stderr":"Error",
             "stdout":"String",
           },
         "request":" ",
           {
             "type":"{GET | POST | PUT | DELETE}",
             "url":"URL",
             "data":{
               "gid": Group ID,
          "group": "Group name",
          "permissions": Number of permissions,
          "recursive": true | false,
          "uid": User ID,
          "user": "user name"
         
           }
         "jobId":"ID",
         "submitted":"Time",
         "completed":Time",
         "status":"Job status",
         }
   ],
  }
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.
"status":
Return status.
"message": "ReturnMessage",
The return message.
"code": ReturnCode
The return code.
"result"
"commands":"String'
Array of commands that are run in this job.
"progress":"String'
Progress information for the request.
"exitCode":"Exit code"
Exit code of command. Zero is success and nonzero denotes failure.
"stderr":"Error"
CLI messages from stderr.
"stdout":"String"
CLI messages from stdout.
"request"
"type":"{GET | POST | PUT | DELETE}"
HTTP request type.
"url":"URL"
The URL through which the job is submitted.
"data":" "
"migrateCriticalFlag": "true |false"
Specifies whether any critical data is migrated from any suspended disk in the specified file system. Critical data refers to all data that is lost if currently suspended disks were removed.
"migrateAllFlag": true |false
Specifies whether all data is migrated from the suspended disks.
"changeReplicationFlag": true | false
Specifies whether replication settings of each file, directory, and system metadata object are changed to match them with the default file system settings.
"repairFlag": true | false
Specifies whether file placement within the storage pool must be repaired.
"performFlag": true | false
Specifies whether any deferred or incomplete compression or decompression of files exist in the file system.
"conflictFlag": true | false
Specifies whether the replicas of metadata and data are conflicting.
"rebalanceFlag": true | false
Specifies whether the file system is being rebalanced to enhance performance. Rebalancing attempts to distribute file blocks evenly across the disks of the file system.
"rebalanceStrictFlag": true | false
Specifies whether the rebalancing is done by using a strict round-robin method.
"jobId":"ID",
The unique ID of job.
"submitted":"Time"
The time at which the job was submitted.
"completed":Time"
The time at which the job was completed.
"status":"RUNNING | COMPLETED | FAILED"
Status of the job.

Examples

The following example shows how to rebalance the replication factor for files within the file system fs1.

Request data:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json' 
-d '{ 
   "qoSClass": "maintenance | other", \ 
   "poolName": "string", \ 
   "nodeClass": "string", \ 
   "migrateCriticalFlag": false, \ 
   "migrateAllFlag": false, \ 
   "changeReplicationFlag": false, \ 
   "repairFlag": false, \ 
   "performFlag": false, \ 
   "conflictFlag": false, \ 
   "rebalanceFlag": false, \ 
   "rebalanceStrictFlag": false \ 
 }' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/fs1/restripefs'
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": 1000000000005,
      "status": "RUNNING",
      "submitted": "2021-12-27 04:09:53,322",
      "completed": "N/A",
      "runtime": 4,
      "request": {
        "data": {
          "changeReplicationFlag": false,
          "conflictFlag": false,
          "migrateAllFlag": false,
          "migrateCriticalFlag": false,
          "nodeClass": "string",
          "performFlag": false,
          "poolName": "string",
          "qoSClass": "maintenance | other",
          "rebalanceFlag": false,
          "rebalanceStrictFlag": false,
          "repairFlag": false
        },
        "type": "PUT",
        "url": "/scalemgmt/v2/filesystems/fs1/restripefs"
      },
      "result": {},
      "pids": []
    }
  ],
  "status": {
    "code": 202,
    "message": "The request was accepted for processing."
  }
}