SMB/shares/{shareName}: GET

Gets information about a specific SMB share.

Availability

Available on all IBM Spectrum Scale™ editions.

Description

The GET smb/shares/shareName request gets information about the specified SMB share. For more information about the fields in the data structures that are returned, see mmsmb command.

Request URL

https://<IP address or host name of API server>:<port>/scalemgmt/v2/smb/shares/shareName
where
smb/shares
Specifies the SMB share as the resource. Required.
shareName
Specifies the SMB share about which you need to get the details. 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
fields Comma separated list of fields to be included in response. ':all:' selects all available fields. Optional.
shareName Name of the SMB share. Required.

Request data

No request data.

Response data

The following list of attributes are available in the response data:

{      
"status": {
      "code":ReturnCode",
      "message":"ReturnMessage"
   },
   "paging": 
    {
    "next": "URL"
    },
  "SmbShare": 
    {
         "shareName": "Share name"
         "filesystemName": File system name
         "filesetName": Fileset Name
         "path": "Path",      
      ),
      "smbOptions": "Options"
      (
         "browseable":""Browseable"
         "guestok": "yes | no"
         "smbencrypt": "auto | default | mandatory | disabled"
         "adminusers": "Users"
         "comment": "Comments"
         "cscpolicy": "Client-side caching policy"
         "fileidalgorithm": "fsname | hostname | fsnamenodirs |     fsnamenorootdir"
         "gpfsleases": "yes | no"
         "gpfsrecalls": "yes | no"
         "gpfssharemodes,": "yes | no"
         "gpfssyncio": "yes | no"
         "hideunreadable": "yes | no"
         "oplocks": "yes | no"
         "posixlocking": "yes | no"
         "readonly": "yes | no"
         "syncopsonclose": "yes | no"
         }
The details of the parameters are given in the following list:
"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.
"SmbShares":
An array of information about SMB shares addresses. The array contains elements that describe the SMB shares. For more information about the fields in this structure, see the links at the end of this topic.
"sharename": "String"
Name of the SMB share.
"filesystemName": "String"
The file system to which the SMB share belongs.
"filesetName": "String"
The fileset to which the SMB share belongs.
"path": "String"
The path for which SMB share is created.
"smbOptions":
An array of information about SMB shares addresses. The array contains elements that describe the SMB shares. For more information about the fields in this structure, see the links at the end of this topic.
"browseable":""Browseable"
If the value is set as yes, the export is shown in the Windows Explorer browser while browsing the file server.
"guestok": "{yes | no}"
The guest ok parameter means that the access is permitted as the default guest user. By default, this parameter is set to yes and it cannot be changed.
"smbencrypt": "{auto | default | mandatory | disabled}"
This option controls whether the remote client is allowed or required to use SMB encryption. This option controls whether the remote client is allowed or required to use SMB encryption.
"adminusers": "Users"
Using this option, administrative users can be defined in the format of admin users=user1;user2, ..usern. The users must be domain users. ,
"comment": "Comments"
User-defined text.
"cscpolicy": "{manual | disable | documents | programs}"
The client-side caching policy specifies how the clients that are capable of offline caching caches the files in the share.
"fileidalgorithm": "{fsname | hostname | fsnamenodirs | fsnamenorootdir}"
This option allows to control the level of enforced data integrity. If the data integrity is ensured on the application level, it can be beneficial in cluster environments to reduce the level of enforced integrity for performance reasons.
"gpfsleases": "yes | no"
These are cross protocol oplocks (opportunistic locks). That is, an SMB client can lock a file that provides the user improved performance while reading or writing to the file because no other user read or write to this file. If the value is set as yes, clients accessing the file over the other protocols can break the lock of an SMB client and the user gets informed when another user is accessing the same file at the same time.
"gpfsrecalls": "{yes | no}"
If the value is set as yes, files that are migrated from disk recalled on access. If recalls = no, files are not recalled on access and the client receives.
"gpfssharemodes,": "{yes | no}"
An application can set share modes. If you set gpfs:sharemodes = yes, the share modes that are specified by the application is respected by all protocols and not only by the SMB protocol. If you set gpfs:sharemodes = no, then the share modes that are specified by the application is only respected by the SMB protocol.
"gpfssyncio": "{yes | no}"
If the value is set as yes, the files in an export for which the setting is enabled, are opened with the OSYNC flag. Accessing a file is faster if gpfs:syncio is set to yes. Performance for certain workloads can be improved when SMB accesses the file with the OSYNC flag set. For example, updating only small blocks in a large file as observed with database applications. The underlying GPFS™ behavior is then changed to not read a complete block, if there is only a small update to it.
"hideunreadable": "{yes | no}"
If the value is set as yes, all files and directories that the user has no permission to read is hidden from directory listings in the export. The hideunreadable=yes option is also known as access-based enumeration. When users are listing (enumerating) the directories and files within the export, they see only the files and directories that they have read access to.
"oplocks": "{yes | no}"
If the value is set as yes, a client might request an opportunistic lock (oplock) from an SMB server when it opens a file. If the server grants the request, the client can cache large chunks of the file without informing the server what it is doing with the cached chunks until the task is completed. Caching large chunks of a file saves a lot of network I/O round-trip time and enhances performance.
"posixlocking": "{yes | no}"
If the value is set as yes, it is tested if a byte−range (fcntl) lock is already present on the requested portion of the file before granting a byte−range lock to an SMB client. For improved performance on SMB−only shares this option can be disabled. Disabling locking on cross−protocol shares can result in data integrity issues when clients concurrently set locks on a file through multiple protocols, for example, SMB and NFS.
"readonly": "{yes | no}"
If the value is set as yes, files cannot be modified or created on this export independent of the ACLs.
"syncopsonclose": "{yes | no}"
This option ensures that the file system synchronizes data to the disk each time a file is closed after writing. The written data is flushed to the disk.

Examples

The following example gets information about the SMB share share1.

Request URL:
curl -k -u admin:admin001 -X GET --header 'accept:application/json' 
'https://198.51.100.1:443/scalemgmt/v2/smb/shares/smbShare1
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": "..."
  },
  "paging": {
    "next": "https://localhost:443/scalemgmt/v2/smb/shares/smbShare1?lastId=1001"
  },
  "SmbShares": [
    {
        "shareName": "smbShare1",
        "filesystemName": "gpfs0",
        "filesetName": "fset1",
        "path": "/mnt/gpfs0/fset1"
      },
      "smbOptions": {
        "browseable": "yes",
        "guestok": "yes",
        "smbencrypt": "auto",
        "adminusers": "admin",
        "comment": "This is a comment",
        "cscpolicy": "manual",
        "fileidalgorithm": "fsname",
        "gpfsleases": "yes",
        "gpfsrecalls": "yes",
        "gpfssharemodes": "yes",
        "gpfssyncio": "yes",
        "hideunreadable": "yes",
        "oplocks": "yes",
        "posixlocking": "yes",
        "readonly": "yes",
        "syncopsonclose": "yes"
      }
    }
  ]
}