Filesystems/{filesystemName}/quotamanagement: PUT
Enables default quota management at the file system level.
Availability
Available on all IBM Storage Scale editions.
Description
The PUT filesystems/filesystemName/quotamanagement request enables quota management 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/quotamanagement
where- filesystems/filesystemName
- Specifies that you need to enable quota management for the particular file system. Required.
- quotamanagement
- Specifies that you need to enable quota management. 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
{
"quota":"filesystem | fileset | disabled",
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- "quota":"filesystem | fileset | disabled"
- filesystem enables quota management at file system level. fileset enables quota management at fileset level. disabled disables quota management for the specified file system.
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 enables quota management at fileset level.
# curl -k -u admin:admin001 -X PUT -H content-type:application/json
"https://localhost:47443/scalemgmt/v2/filesystems/gpfs0/quotamanagement" -d '{ "quota": "fileset" }'
{
"jobs" : [ {
"jobId" : 1000000000001,
"status" : "RUNNING",
"submitted" : "2019-02-26 13:52:03,743",
"completed" : "N/A",
"runtime" : 3,
"request" : {
"type" : "PUT",
"url" : "/scalemgmt/v2/filesystems/gpfs0/quotamanagement"
},
"result" : { },
"pids" : [ ]
} ],
"status" : {
"code" : 202,
"message" : "The request was accepted for processing."
}
}
Use the following request to see the quota management settings:
# curl -k -u admin:admin001 -X GET -H content-type:application/json
"https://localhost:443/scalemgmt/v2/filesystems/gpfs0?fields=quota"
{
"filesystems" : [ {
"name" : "gpfs0",
"quota" : {
"defaultQuotasEnabled" : "user;group",
"filesetdfEnabled" : false,
"perfilesetQuotas" : true,
"quotasAccountingEnabled" : "user;group;fileset",
"quotasEnforced" : "user;group;fileset"
}
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}