Filesystems/{filesystemName}/unmount: PUT

Performs unmount operation of a specific file system.

Availability

Available on all IBM Storage Scale editions.

Description

The PUT filesystems/filesystemName/unmount request unmounts a file system. For more information about the fields in the data structures that are returned, see mmmount command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/FileSystemName/unmount
where
filesystems/filesystemName
The file system that is going to be unmounted. Required.
unmount
Specifies the action to be performed on the file system. Required.

Request headers

Content-Type: application/json
Accept: application/json

Parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of parameters
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.
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

{
          "nodes":{"node name"},
         "remoteCluster": "Remote cluster name",
         "force": "True | False"
}

For more information about the fields in the following data structures, see the links at the end of this topic.

"nodes":"node name"
The node on which the file system must be unmounted.
"remoteCluster": "Remote cluster name"
Remote cluster name from where the file system must be unmounted.
"force": "True | False"
Forces the unmount to take place even though the file system may be still in use.

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.
"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, 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 how to unmount the file system gpfs0.

Request data:
{
  "nodes": ["testnode-11","testnode-12"],
  "remoteCluster": "myRemoteClusterName",
  "force": false
}
Corresponding request URL:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json' 
-d -d '{ \ 
   "nodes": ["testnode-11","testnode-12"] \ 
   "remoteCluster": "myRemoteClusterName", \ 
   "force": false \  'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/unmount'
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" : 1000000000002,
    "status" : "RUNNING",
    "submitted" : "2017-03-14 15:50:00,493",
    "completed" : "N/A",
    "request" : {
      "data" : {
        "entries" : [ 
      {
          "type" : "allow",
          "who" : "special:owner@",
          "permissions" : "rwmxDaAnNcCos",
          "flags" : ""
        }, 
         {
          "type" : "allow",
          "who" : "special:group@",
          "permissions" : "rxancs",
          "flags" : ""
        }, 
        {
          "type" : "allow",
          "who" : "special:everyone@",
          "permissions" : "rxancs",
          "flags" : ""
        }, 
        {
          "type" : "allow",
          "who" : "user:scalemgmt",
          "permissions" : "rxancs",
          "flags" : "fd"
        } ],
        "type" : "NFSv4"
      },
      "type" : "PUT",
      "url" : "/scalemgmt/v2/filesystems/gpfs0/unmount"
    },
    "result" : { }
  } ],
  "status" : {
    "code" : 202,
    "message" : "The request was accepted for processing"
  }
}