Filesystems/{filesystemName}/filesets/{filesetName}/psnaps: POST
Creates an AFM peer snapshot.
Availability
Available on all IBM Storage Scale editions.
Description
The POST filesystems/{filesystemName}/filesets/{filesetName}/psnaps request creates an AFM peer snapshot. The peer snapshot function provides a snapshot at home and cache sites separately, ensuring application consistency on both home and cache sides. For more information about the fields in the data structures that are returned, see the topics mmpsnap command, mmafmctl command, and mmafmconfig command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/{filesystemName}
/filesets/{filesetName}/psnaps
where- filesystems/{filesystemName}/filesets/{filesetName}
- Specifies the AFM fileset as the target. Required.
- psnap
- Specifies that a peer snapshot needs to be taken for the AFM fileset.
Request headers
Content-Type: application/json
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. You can also use keywords such as :all:, :all_local:, or :all_remote: | Required. |
filesetName | The fileset name. This is the path of the fileset. | 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. | Optional. |
Request data
{
"comment": "Comment",
"uid": "Location",
"rpo": " yes | no",
"wait": "yes | no"
}
For
more information about the fields in the following data structures, see the links at the end of this
topic.- "comment":"Comment"
- Comment about the peer snapshot.
- "uId":"UID"
- A unique identifier for the cache site. If not specified, this defaults to the IBM Storage Scale cluster ID.
- "rpo":"yes | no"
- Specifies whether to create a user recovery point objective (RPO) snapshot for a primary fileset. This option cannot be specified with the --comment and --uid options.
- "wait":"yes | no"
- Specifies whether to make the creation of cache and home snapshots a synchronous process.
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.
- "paging"
- The URL to retrieve the next page. Paging is enabled when more than 1000 objects are returned by the query.
- "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 API command creates a peer snapshot of the fileset myFset1.
Request URL:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'
-d "{
"comment": "My peer snapshot",
"uid": "HONGKONG",
"rpo": "no",
"wait": "yes""
'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/filesets/myFset1/psnaps'
The request URL with no field or filter parameter returns only the
details that uniquely identify the object.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.
{
"status": {
"code": "200",
"message": "..."
},
"job": [
{
"result": {
"commands": "[''mmcrfileset gpfs0 restfs1001'', ...]",
"progress": "[''(2/3) Linking fileset'']",
"exitCode": "0",
"stderr": "[''EFSSG0740C There are not enough resources available to create
a new independent file set.'', ...]",
"stdout": "[''EFSSG4172I The file set {0} must be independent.'', ...]"
},
"request": {
"type": "POST",
"url": "/scalemgmt/v2/filesystems/gpfs0/filesets/myFset1/psnaps",
"data": "comment": "My peer snapshot",
"uid": "HONGKONG",
"rpo": "no",
"wait": "yes",
},
"jobId": "12345",
"submitted": "2016-11-14 10.35.56",
"completed": "2016-11-14 10.35.56",
"status": "COMPLETED"
}
]
}