Filesystems/{filesystemName}/disks: GET
Gets details of the disks that are part of a file system.
Availability
Available on all IBM Spectrum Scale™ editions.
Description
The GET filesystems/{filesystemName}/disks request gets details of the disks that belong to the specified file system. For more information about the fields in the data structures that are returned, see the topics mmlsdisk command, mmlsnsd commandand mmlsfs command.
Request URL
https://<IP address or host name of API server>:<port>/scalemgmt/v2/filesystems/filesystemName/disks
where- filesystems/filesystemName
- Specifies the file system to which the disks belong. Required.
- disks
- The disks that belong to the specified file system. Required.
Request headers
Accept: application/json
Parameters
The following parameters can be used in the request URL to customize the
request:
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. |
fields | Comma separated list of fields to be included in response. ':all:' selects all available fields. | Optional. |
filter | Filter objects by expression. For example, 'status=HEALTHY,entityType=FILESET' | Optional. |
Request data
No request data.
Response data
{
"status": {
"code":ReturnCode,
"message":"ReturnMessage"
},
"paging":
{
"next": "URL"
},
disks: [
{
"name":"DiskName",
"filesystem":"FileSystemName",
"failureGroup":"FailureGroupID",
"type":"{dataOnly | metadataOnly | dataAndMetadata | descOnly | localCache}",
"storagePool":"StoragePool",
"status":"Status",
"availability":Availability,
"quorumdisk":"QuorumDisk",
"remarks":Remarks,
"size":Size,
"availableBlocks":"AvailableBlocks",
"availableFragments":"AvailableFragments"
"nsdServers":"NSDServers",
"nsdVolumeId":"NSDVolumeID",
}
],
}
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.
- "disks":
- An array of elements that describe one disk.
- "name":"DiskName"
- Name of the disk.
- "filesystem":"FileSystemName"
- The file system to which the disk belongs.
- "failureGroup":"FailureGroupID"
- Failure group of the disk.
- "type":"{dataOnly | metadataOnly | dataAndMetadata | descOnly | localCache}"
- Specifies the type of data to be stored on the disk:
- dataOnly
- Indicates that the disk contains data and does not contain metadata. This is the default for disks in storage pools other than the system pool.
- metadataOnly
- Indicates that the disk contains metadata and does not contain data.
- dataAndMetadata
- Indicates that the disk contains both data and metadata. This is the default for disks in the system pool.
- descOnly
- Indicates that the disk contains no data and no file metadata. Such a disk is used solely to keep a copy of the file system descriptor, and can be used as a third failure group in certain disaster recovery configurations. For more information, see the help topic Synchronous mirroring utilizing GPFS replication in IBM Spectrum Scale: Administration Guide.
- localCache
- Indicates that the disk is to be used as a local read-only cache device.
- "storagePool":"StoragePool"
- Storage pool to which the disk belongs.
- "status":"Status"
- The status of the disk.
- "availability":"Availability"
- The availability of the disk.
- "quorumdisk":"Quorum disk"
- The quorum status of the disk.
- "remarks":"Remarks"
- User-defined remarks about the disk.
- "size":"Size"
- The size of the disk.
- "availableBlocks":"Available blocks"
- The available blocks of the disk.
- "availableFragments":"Available fragments"
- The available fragments of the disk.
- "nsdServers":"NSD servers"
- The name of the NSD servers.
- "nsdVolumeID":"NSD volume ID"
- The volume ID of the NSD.
Examples
The following example gets information about disks in the file system gpfs0.
Request data:
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/disks'
The request URL with no field or filter parameter returns only the
details that uniquely identify the object.Response data:
The disks array
returns details of the disks. Each config object contains details about one
disk.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.
{
"disks" : [ {
"fileSystem" : "gpfs0",
"name" : "disk1"
}, {
"fileSystem" : "gpfs0",
"name" : "disk8"
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully"
}
}
Using the field parameter ":all:" returns entire details of the disks that are available in the system.
curl -k -u admin:admin001 -X GET --header 'accept:application/json'
'https://198.51.100.1:443/scalemgmt/v2/filesystems/gpfs0/disks?fields=:all:'
{
"disks" : [ {
"availability" : "up",
"availableBlocks" : "9.15 GB",
"availableFragments" : "552 kB",
"failureGroup" : "1",
"fileSystem" : "gpfs0",
"name" : "disk1",
"nsdServers" : "mari-11.localnet.com,mari-15.localnet.com,mari-14.localnet.com,
mari-13.localnet.com,mari-12.localnet.com",
"nsdVolumeId" : "0A00640B58B82A8C",
"quorumDisk" : "no",
"remarks" : "desc",
"size" : " 10.00GiB",
"status" : "ready",
"storagePool" : "system",
"type" : "nsd"
}, {
"availability" : "up",
"availableBlocks" : "9.45 GB",
"availableFragments" : "664 kB",
"failureGroup" : "1",
"fileSystem" : "gpfs0",
"name" : "disk8",
"nsdServers" : "mari-11.localnet.com,mari-12.localnet.com,mari-13.localnet.com,
mari-14.localnet.com,mari-15.localnet.com",
"nsdVolumeId" : "0A00640B58B82AD9",
"quorumDisk" : "no",
"remarks" : "desc",
"size" : " 10.00GiB",
"status" : "ready",
"storagePool" : "data",
"type" : "nsd"
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully"
}
}