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

Modifies a fileset.

Availability

Available on all IBM Storage 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 the IBM Storage 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": "enable | disable"
      "afmAsyncDelay": SecondsDelay,
      "afmDirLookupRefreshInterval": SecondsInterval,
      "afmRefreshOnce": true | false
      "afmReadDirOnce":true | false 
      "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}",
      "afmObjectSubdir":"true | false", 
            "afmObjectUserKeys":"true | false",
            "afmObjectXattr":"true | false",
            "afmObjectSSL":"true | false",
            "afmObjectVHB":"true | false",
            "afmObjectGCS":"true | false",
            
      "accept": "true | false"
 }
"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.
"afmTarget": enable | disable
Whether AFM filesets can be converted to regular independent filesets.
"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 revalidation of directories that are caused by lookup operations such as ls and stat.
"afmDirOpenRefreshInterval": Interval
The interval in seconds between data revalidation 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 revalidation of files that are caused by lookup operations such as ls and stat.
"afmRefreshOnce": true | false
Whether the AFM is able to revalidate files and directories only once.
"afmReadDirOnce": true | false
Whether the AFM is able to complete a one-time readdir of a directory from the home directory after the data is migrated to the cache and the application is started on the cache directory.
"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.
"afmObjectSubdir":"true | false"
Whether to create sub-directory if '/' is present in the object name.
"afmObjectUserKeys":"true | false"
Whether to use user keys on requests from the object store.
"afmObjectXattr":"true | false"
Whether user extended attributes are available in object store.
"afmObjectSSL":"true | false"
Whether to enable SSL certificate verification, which is valid only with HTTPS from the object store.
"afmObjectVHB":"true | false"
Whether to use Virtual Hosted Bucket, for Alibaba Cloud Object Storage Service (OSS).
"afmObjectGCS":"true | false"
Whether to use Google Cloud Services.
"accept":"true | false"
Whether the defined conditions sent through the request is automatically accepted. This must be set to true. The acceptance prompt does not appear while sending the request.

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 afm-test3 in file system gpfs1.

Request data:
curl -k -u admin:admin001 -X PUT --header 'content-type:application/json' --header 'accept:application/json' 
-d '{ \  
   "afmTarget": "disable", \
   "afmRefreshOnce":false, \
   "afmreadDirOnce":false, \ 
   "accept": true \ 
 }' 'https://glogin03.pok.stglabs.ibm.com:1991/scalemgmt/v2/filesystems/gpfs1/filesets/afm-test3'
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" : 1000000000007,
    "status" : "COMPLETED",
    "submitted" : "2020-09-29 15:17:52,389",
    "completed" : "2020-09-29 15:17:53,388",
    "runtime" : 999,
    "request" : {
      "data" : {
         "afmTarget": "disable", 
         "accept": true 
         },
      "type" : "PUT",
      "url" : "/scalemgmt/v2/filesystems/gpfs1/filesets/afm-test3"
    },
    "result" : {
      "progress" : [ ],
      "commands" : [ "mmchfileset gpfs1' 'afm-test3' -p 'afmTarget=disable' --yes ],
      "stdout" : ["EFSSG0071I File set afm-test3 changed successfully." ],
      "stderr" : [ "com.ibm.fscc.zimon.unified.ZiMONException: Could not connect to the performance collector server" ],
      "exitCode" : 8
    },
    "pids" : [ ]
  } ],
  "status" : {
    "code" : 200,
    "message" : "The request finished successfully."
  }
}

See also