Remotemount/remotefilesystems: POST

Creates a remote file system. This API must be run on a cluster that mounts file systems remotely.

Availability

Available on all IBM Storage Scale editions.

Note: Only the users with user roles Administrator or Container Operator have permission to use this REST API endpoint.

Description

The POST /remotemount/remotefilesystems creates a remote file system. For more information about the fields in the data structures that are returned, see mmremotefs command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/remotemount/remotefilesystems
where
remotemount/remotefilesystems
Specifies the target element that is going to be created.

Request headers

Accept: application/json

Request parameters

The following parameters can be used in the request URL to customize the request:
Table 1. List of request parameters
Parameter name Description and applicable keywords Required/optional
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

"remoteFilesystems": 
    {
      "remoteFilesystem": "Remote file system name",
      "owningFilesystem": "Owning file system name",
      "owningCluster": "Owning cluster name",
      "remoteMountPath": "Remote mount path of the file system",
      "mountOptions": "Mount options",
      "automount": "Status of the auto mount"
    }
"remoteFilesystems":
Remote file system details.
"remoteFilesystem": "Remote file system name"
The name of the remote file system on the remote cluster.
"owningFilesystem": "Owning file system name"
The name of the file system on the owning cluster.
"owningCluster": "Owning cluster name"
The owning cluster of the remote file system.
"remoteMountPath": "Remote mount path of the file system"
The remote mount path of the remote file system.
"mountOptions": "Mount options"
The mount options of the remote file system.
"automount": "Status of the auto mount"
The automount status of the remote 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.
"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, and 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 create a remote file system.

Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json'
-d '{ \ 
   "remoteFilesystem": "RemoteFilesystem1", \ 
   "owningFilesystem": "owningfilesystem1", \ 
   "owningCluster": "Cluster1", \ 
   "remoteMountPath": "string", \ 
   "mountOptions": "string", \ 
   "automount": "string" \
'https://198.51.100.1:443/scalemgmt/v2/remotemount/remotefilesystems'
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/remotemount/remotefilesystems",
        "data":  "nodesDesc": "[ 'mari-16:manager-quorum', 'mari-17::mari-17_admin' ]"
      },
      "jobId": "12345",
      "submitted": "2016-11-14 10.35.56",
      "completed": "2016-11-14 10.35.56",
      "status": "COMPLETED"
    }
  ]
}