Filesystems/{filesystemName}/filesets: POST

Creates a fileset.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The POST filesystems/{filesystemName}/filesets command creates a new fileset in the specified file system. For more information about the fields in the request data structures, see the topics mmcrfileset command, mmchfileset command, and mmcrfs command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/{filesystemName}/filesets
where
filesystem/filessystemName
Specifies the file system in which the fileset is to be created. Required.
filesets
Specifies fileset as the resource. Required.

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
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 theIBM Spectrum Scale system to perform the requested operation. Required.

Request data

{     
      "filesetName": "Fileset name",
      "path": "Path",
      "owner": "UserID[:GroupID]",
      "permissions": "Permissions"  
      "inodeSpace": "{new | ExistingFileset}",
      "maxNumInodes": "Inodes",
      "allocInodes": "Inodes",
      "permissionChangeMode": "chmodOnly | setAclOnly | chmodAndSetAcl",
      "comment": "Comment",
      "iamMode": "{advisory | noncompliant | compliant}",
      "afmTarget": "Protocol://{Host | Map}/Path"
      "afmAsyncDelay":" SecondsDelay",
      "afmDirLookupRefreshInterval": "SecondsInterval",
      "afmDirOpenRefreshInterval": "SecondsInterval",
      "afmEnableAutoEviction": "{yes | no}",
      "afmExpirationTimeout": "AFM expiration timeout",
      "afmFileLookupRefreshInterval": Seconds Interval,
      "afmMode": "{single-writer | sw | read-only | ro | local-updates | lu | 
         independent-writer | Primary | Secondary}",
      "afmNumFlushThreads": NumThreads,
      "afmParallelReadChunkSize": NumBytes,
      "afmParallelReadThreshold": NumMegabytes,
      "afmParallelWriteChunkSize": NumBytes,
      "afmParallelWriteThreshold": NumMegabytes,
      "afmPrefetchThreshold": {1 | 1-99 | 100},
      "afmPrimaryID": "ID",
      "afmRPO": MinutesInterval,
      "afmShowHomeSnapshots": "{yes | no}",
 }
Details of the parameters are given in the following list:
"filesetName": "Fileset",
The name of the fileset.
"path": "Path"

The path the fileset will be linked to. If not specified the fileset will be linked to the default path, for example, /mnt/gpfs0/fset1.

"owner": "UserID[:GroupID]"
The user ID of the owner of the new fileset, followed optionally by the group ID, as in "root:".
"permissions ": "Integer"
The permissions that are set using chmod. If not specified, a default ACL will be applied.
"inodeSpace": "Inodes"
The number of inodes that are allocated for use by the fileset.
"maxNumInodes": "Inodes"
The inode limit for the inode space that is owned by the specified fileset.
"permissionChangeMode": "Mode"
The permission change mode. Controls how chmod and ACL commands affect objects in the fileset.
chmodOnly
Only the chmod command can change access permissions.
setAclOnly
Only the ACL commands and API can change access permissions.
chmodAndSetAcl
Both the chmod command and ACL commands can change access permissions.
chmodAndUpdateAcl
Both the chmod command and ACL commands can change access permissions.
"comment": "Comment",
A comment that appears in the output of the mmlsfileset command.
"iamMode": "Mode"
The integrated archive manager (IAM) mode for the fileset.
advisory
noncompliant
compliant
"afmTarget": "Home fileset"
The home that is associated with the cache.
"afmAsyncDelay": Delay
The time in seconds by which to delay write operations because of the lag in updating remote clusters.
"afmDirLookupRefreshInterval": Interval
The interval in seconds between data revalidations of directories that are caused by lookup operations such as ls and stat.
"afmDirOpenRefreshInterval": Interval
The interval in seconds between data revalidations of directories that are caused by lookup operations.
"afmEnableAutoEviction": "{yes | no}"
Enables or disables eviction on the fileset.
"afmExpirationTimeout": Interval
The timeout in seconds after which cached data is considered expired. Used with afmDisconnectTimeout, which is set with mmchconfig.
"afmFileLookupRefreshInterval": Interval
The interval in seconds between data revalidations of files that are caused by lookup operations such as ls and stat.
"afmMode": "{single-writer | sw | read-only | ro | local-updates | lu | independent-writer | Primary | Secondary}"
The mode in which the cache operates.
"afmNumFlushThreads": numThreads
The number of threads that are used on each gateway to synchronize updates to the home cluster.
"afmParallelReadChunkSize": Size
The minimum chunk size of read data, in bytes, that must be distributed among the gateway nodes during parallel reads.
"afmParallelReadThreshold": Threshold
The minimum file size, in megabytes, at which to do parallel reads.
"afmParallelWriteChunkSize": Size
The minimum chunk size of write data, in bytes, that must be distributed among the gateway nodes during parallel writes.
"afmParallelWriteThreshold": Threshold
The minimum file size, in megabytes, at which to do parallel writes.
"afmPrefetchThreshold": {1 | 1-99 | 100}
The percentage of file size that must be cached before the entire file is prefetched.
0
Enables full file prefetching.
1-99
The percentage of file size that must be cached before the entire file is prefetched.
100
Disables full file prefetching.
"afmPrimaryID": "ID"
The unique primary ID of the primary fileset for asynchronous data replication.
"afmRPO": Interval
The recovery point objective (RPO) interval, in minutes, for a primary fileset.
"afmShowHomeSnapshots": "{yes | no}"
Shows or hides the home snapshot directory in cache. Specify yes to show, no to hide.

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 creates and links a fileset fset1 in file system gpfs0.

Request data:
curl -k -u admin:admin001 -X POST --header 'content-type:application/json' --header 'accept:application/json' 
-d '{
  "filesetName": "fset1", 
  "path": "/mnt/gpfs0/fset1", 
  "owner": "scalemgmt", 
  "permissions": "700"
}' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/filesets'
Response data:
{
  "jobs" : [ {
    "jobId" : 1000000000003,
    "status" : "COMPLETED",
    "submitted" : "2017-03-14 15:54:23,042",
    "completed" : "N/A",
    "request" : {
      "data" : {
        "filesetName" : "fset1",
        "owner" : "scalemgmt",
        "path" : "/mnt/gpfs0/fset1",
        "permissions" : 700
      },
      "type" : "POST",
      "url" : "/scalemgmt/v2/filesystems/gpfs0/filesets"
    },
    "result" : { }
  } ],
  "status" : {
    "code" : 202,
    "message" : "The request was accepted for processing"
  }
}