Filesystems/{filesystemName}/filesets/{filesetName}: PUT

Modifies a fileset.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The PUT filesystems/{filesystemName}/filesets/{filesetName} request modifies a specific fileset, which is part of the specified file system. For more information about the fields in the data structures that are returned, see the topics mmcrfileset command, mmchfileset command, and mmlsfileset command.

Request URL

https://<IP or host name of API server>:port/scalemgmt/v2/filesystems/filesystemName/filesets/filesetName
where:
filesystems/filesystemName
Specifies the name of the file system to which the fileset belongs. Required.
filesets/filesetName
Specifies fileset to be modified. 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.
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 theIBM Spectrum Scale system to perform the requested operation. Required.

Request data

{     
      "newFilesetName": "Fileset",
      "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": SecondsInterval,
      "afmFileLookupRefreshInterval": SecondsInterval,
      "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}",
 }
      
}
"newFilesetName": "Fileset",
The name of 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": Interval"Protocol://{Host | Map}/Path"
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.
"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 gets information about the fileset myFset1 in file system gpfs0.

Request data:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json' 
-d '{
  "newFilesetName": "newFset1",
  "maxNumInodes": "100M",
  "allocInodes": "5M",
  "permissionChangeMode": "chmodAndSetAcl",
  "comment": "New comment",
  "iamMode": "compliant",
  "afmTarget": "nfs://10.0.100.11/gpfs/afmHomeFs/afmHomeFileset2",
  "afmAsyncDelay": "0",
  "afmDirLookupRefreshInterval": "60",
  "afmDirOpenRefreshInterval": "60",
  "afmEnableAutoEviction": "false",
  "afmExpirationTimeout": "100",
  "afmFileLookupRefreshInterval": "30",
  "afmMode": "read-only",
  "afmNumFlushThreads": "4",
  "afmParallelReadChunkSize": "134217728",
  "afmParallelReadThreshold": "1024",
  "afmParallelWriteChunkSize": "0",
  "afmParallelWriteThreshold": "0",
  "afmPrefetchThreshold": "0",
  "afmPrimaryID": "string",
  "afmRPO": "0",
  "afmShowHomeSnapshots": "false"
}' 'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/filesets/myFset1'
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",
        "data": "{\"config\":{\"filesetName\":\"restfs1001\",\"owner\":\"root\",\"path\":
                 \"/mnt/gpfs0/rest1001\",\"permissions\":\"555\"}"
      },
      "jobId": "12345",
      "submitted": "2016-11-14 10.35.56",
      "completed": "2016-11-14 10.35.56",
      "status": "COMPLETED"
    }
  ]
}