Filesystems/{filesystemName}/quotadefaults: PUT
Enables default quota limits at file system level.
Availability
Available on all IBM Storage Scale editions.
Description
The PUT filesystems/filesystemName/quotadefaults request enables default 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/quotadefaults
where- filesystems/filesystemName
- Specifies that you need to enable default quota for the particular file system. Required.
- quotadefaults
- Specifies that you need to enable 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
{
"user":"True | False
"group":"True | False",
"fileset":"True | False",
"assign":"True | False",
"reset":"True | False",
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- "user":"True | False"
- Whether to enable or disable default quota for the user.
- "group":"True | False"
- Whether to enable or disable default quota for the group.
- "fileset":"True | False"
- Whether to enable or disable default quota for the fileset.
- "assign":"True | False"
-
Whether to assign the quota defaults to enabled user, group or fileset.
- "reset":"True | False"
- Whether to reset the quota defaults from disabled user, group or fileset.
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 or disables default quota for the file system gpfs0.
Use the following request to see the current default settings:
curl -k -u admin:admin001 -X GET -H content-type:application/json
"https://localhost:443/scalemgmt/v2/filesystems/gpfs0/quotadefaults"
{
"status" : {
"code" : 200,
"message" : "The request finished successfully."
},
"quotaDefaults" : [ {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "FILESET",
"blockSoftLimit" : 0,
"blockHardLimit" : 0,
"filesSoftLimit" : 0,
"filesHardLimit" : 0,
"entryType" : "DEFAULT_OFF"
}, {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "USR",
"blockSoftLimit" : 12288,
"blockHardLimit" : 1048576,
"filesSoftLimit" : 102400,
"filesHardLimit" : 1048576,
"entryType" : "DEFAULT_OFF"
}, {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "GRP",
"blockSoftLimit" : 0,
"blockHardLimit" : 0,
"filesSoftLimit" : 0,
"filesHardLimit" : 0,
"entryType" : "DEFAULT_OFF"
} ]
}
Now, use the following request to set the quota defaults:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json'
"https://localhost:47443/scalemgmt/v2/filesystems/gpfs0/quotadefaults"
-d '{ "user":true, "group": true, "fileset": true }'
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" : 1000000000001,
"status" : "RUNNING",
"submitted" : "2019-02-19 15:18:34,738",
"completed" : "N/A",
"runtime" : 5,
"request" : {
"type" : "PUT",
"url" : "/scalemgmt/v2/filesystems/gpfs0/quotadefaults"
},
"result" : { },
"pids" : [ ]
} ],
"status" : {
"code" : 202,
"message" : "The request was accepted for processing."
}
}
Use the GET filesystems/gpfs0/quotadefaults request to see how the quota
defaults are set:
curl -k -u admin:admin001 -X GET -H content-type:application/json
"https://localhost:443/scalemgmt/v2/filesystems/gpfs0/quotadefaults"
{
"status" : {
"code" : 200,
"message" : "The request finished successfully."
},
"quotaDefaults" : [ {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "USR",
"blockSoftLimit" : 12288,
"blockHardLimit" : 1048576,
"filesSoftLimit" : 102400,
"filesHardLimit" : 1048576,
"entryType" : "DEFAULT_ON"
}, {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "GRP",
"blockSoftLimit" : 0,
"blockHardLimit" : 0,
"filesSoftLimit" : 0,
"filesHardLimit" : 0,
"entryType" : "DEFAULT_ON"
}, {
"deviceName" : "gpfs0",
"filesetId" : 0,
"quotaType" : "FILESET",
"blockSoftLimit" : 0,
"blockHardLimit" : 0,
"filesSoftLimit" : 0,
"filesHardLimit" : 0,
"entryType" : "DEFAULT_ON"
} ]
}