Filesystems/{filesystemName}/quotagracedefaults: POST
Sets or changes default grace period set for quota limits at the file system level. The grace period starts when soft limit that is defined for capacity or inode usage is reached. You can set grace periods for both capacity and inode limits. User can continue the data writes until the grace time expires or hard limit is reached.
Availability
Available on all IBM Storage Scale editions.
Description
The POST filesystems/filesystemName/quotagracedefaults request sets or changes grace period for quota limits for a file system. For more information about the fields in the data structures that are returned, see the topics mmsetquota command and mmrepquota command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/filesystemName/quotagracedefaults
where- filesystems/filesystemName
- Specifies that you need to set or change grace periods for quota limits for the particular file system. Required.
- quotagracedefaults
- Specifies that you need to set or change the default quota details. Required.
Request headers
Accept: application/json
Request parameters
The following parameters can be used in the request URL to customize the
request:
Parameter name | Description and applicable keywords | Required/optional |
---|---|---|
filesystemName | The file system name. | 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
{
" grace":"USR | GRP | FILESET",
"blockGracePeriod":"Grace period for capacity limits",
"filesGracePeriod":"Grace period for inode space limits",
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- " grace":"USR | GROUP | FILESET"
- Specify whether grace period is set for user, group, or fileset.
- "blockGracePeriod":"Grace period for capacity limits"
- Grace period set for the capacity usage. Grace period can be set in seconds, minutes, hours, and days. Default unit is seconds.
- ""filesGracePeriod":"Grace period for inode space limits"
- Grace period set for the inode space usage. Grace period can be set in seconds, minutes, hours, and days. Default unit is seconds.
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":""",
}
"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 this
topic.- "status":
- Return status.
- "message": "ReturnMessage",
- The return message.
- "code": ReturnCode
- The return code.
- "jobs":
- An array of elements that describe jobs. Each element describes one job.
- "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, 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":" "
- Optional.
- "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.
- "status":"RUNNING | COMPLETED | FAILED"
- Status of the job.
Examples
The following example shows how to set or change grace period for the file system gpfs0.
Now, use the following request to set the quota defaults:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'
"https://localhost:47443/scalemgmt/v2/filesystems/gpfs0/quotagracedefaults"
-d '{ "grace" : "GRP" , "blockGracePeriod" : "10hours", "filesGracePeriod" : "1hours" }'
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" : 1000000000008,
"status" : "RUNNING",
"submitted" : "2019-02-20 14:25:05,280",
"completed" : "N/A",
"runtime" : 3,
"request" : {
"type" : "POST",
"url" : "/scalemgmt/v2/filesystems/gpfs0/quotadefaults"
},
"result" : { },
"pids" : [ ]
} ],
"status" : {
"code" : 202,
"message" : "The request was accepted for processing."
}
}
Use the GET filesystems/gpfs0/quotagracedefaults request to see how the
quota defaults are set:
curl -k -u admin:admin001 -XGET -H content-type:application/json
"https://localhost:47443/scalemgmt/v2/filesystems/gpfs0/quotagracedefaults"
{
"status" : {
"code" : 200,
"message" : "The request finished successfully."
},
"quotaGraceDefaults" : [ {
"deviceName" : "gpfs0",
"quotaType" : "USR",
"blockGracePeriod" : 604800,
"filesGracePeriod" : 604800
}, {
"deviceName" : "gpfs0",
"quotaType" : "FILESET",
"blockGracePeriod" : 604800,
"filesGracePeriod" : 604800
}, {
"deviceName" : "gpfs0",
"quotaType" : "GRP",
"blockGracePeriod" : 36000,
"filesGracePeriod" : 3600
} ]
}