Gnr/diskmgmt/vdiskset/define: POST
Defines uniform virtual disk (vdisk) sets across all IBM Storage Scale RAID recovery groups.
Availability
Available with IBM Storage Scale Erasure Code Edition only.
Description
The POST gnr/diskmgmt/vdiskset/define request defines vdisk sets for all recovery groups that belong to IBM Storage Scale RAID. For more information about the fields in the data structures that are returned, see the mmvdisk vdiskset command.
Request URL
https://<IP address or host name of API server>:port/scalemgmt/v2/gnr/diskmgmt/vdiskset/define
where:- vdiskset/define
- Specifies vdiskset/define as the resource. Required.
Request headers
Accept: application/json
Request data
The following list of attributes is available in the request data:
{
"name": "string",
"declusteredArray": "string",
"pool": "string",
"usableSize": size,
"raidCode": "string",
"nsdUsageType": "string",
"blockSize": "string",
"recoveryGroups": [
"string"
],
"existingVdiskSet": "Name",
"forceFlag": true | false
}
The details of the parameters are given in the following list:
- "name": Vdisk set name
- The name of the vdisk set to be defined.
- "declusteredArray": "Declustered array name"
- The name of a single declustered array that must be present in each of the recovery groups for the vdisk set definition. The member vdisk NSDs is defined in this declustered array. You can skip specifying this name if the recovery group has only a single user declustered array. For example, "DA1"
- "pool": "storage pool"
- The name of the file system storage pool for the vdisk set.
- "usableSize": Size
- The size that is available for use for the vdisk set definition.
- "raidCode": "RAID code"
- The RAID code that is used by the member vdisk NSDs.
- "nsdUsageType": "NSD usage"
- The IBM Storage
Scale file system data usage for the vdisk
NSDs. The default value is
dataAndMetadata
. The other valid values aremetadataOnly
anddataOnly
. - "blockSize": "Block size usage"
- The block size that is used by the member vdisk NSDs. Valid values for 3WayReplication and
4WayReplication are
256K, 512K, 1M, and 2M
. The valid values for 4+2P and 4+3P are:512K, 1M, 2M, 4M, 8M
. The valid values for 8+2P and 8+3P are:512K, 1M, 2M, 4M, 8M, 16m
. - "recoveryGroups": "list"
- The list of recovery groups where the vdisk is to be defined.
- "existingVdiskSet": "Name"
- The name of the existing vdisk set from which the attribute definition is copied.
- "forceFlag": true | false
- Specifies whether the
forceFlag
is enabled to copy the vdisk set definition into an incompatible declustered array.
Response data
{
"status": {
"code":ReturnCode",
"message":"ReturnMessage"
},
"jobs": [
{
"result":"",
{
"commands":"Commands used",
"progress":"Request progress,
"exitCode":"Exit code",
"stderr":"STD error messages",
"stdout":"CLI messgaes",
},
"request":" ",
{
"type":"{GET | POST | PUT | DELETE}",
"url":"URL",
"data":""",
}
"jobId":"ID",
"submitted":"Time",
"completed":Time",
"status":"Job status",
"pids":"Process IDs
}
],
}
The details of the parameters are provided in the following list:
- "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 and nonzero denotes failure.
- "stderr":"Error"
- CLI messages from stderr.
- "stdout":"CLI messages"
- 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.
- "pids":"Process ID"
- The process IDs of all the active sub processes that manage the job.
Examples
The following example shows how to define the vdisk set vs1
in the recovery
group RG1
.
Request data:
curl -k -u admin:admin001 -X POST --header 'accept:application/json' -d {
"name": "vs1",\
"declusteredArray": "DA1",\
"pool": "system",\
"usableSize": 10,\
"raidCode": "4+2p",\
"nsdUsageType": "dataAndMetadata",\
"blockSize": "8M",\
"recoveryGroups": [ \
"RG1" \
],\
"existingVdiskSet": "vs2",\
"forceFlag": false
}' 'https://198.51.100.1:443/scalemgmt/v2/gnr/diskmgmt/vdiskset/define'
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" : 1000000000003,
"status" : "COMPLETED",
"submitted" : "2021-01-30 18:01:45,173",
"completed" : "2021-01-30 18:01:45,737",
"runtime" : 564,
"request" : {
"type" : "POST",
"url" : "scalemgmt/v2/gnr/diskmgmt/vdiskset/define"
"data": "{\"define\":{\"vdiskset\":\"vs1\",\"owner\":\"root\",\"path\":\"/mnt/gpfs0/rest1001\",\"permissions\":\"555\"}"
},
"result" : {
"progress" : [ ],
"commands" : [ "mmvdisk vdiskset define --vdisk-set VdiskSet
--recovery-group {all | RgName[,RgName...]}
--code RaidCode --block-size BlockSize
--set-size {n% | n | nK | nM | nG | nT}
[--declustered-array DaName]
[--nsd-usage NsdUsage [--storage-pool StoragePool]] " ],
"stdout" : [ " " ],
"stderr" : [ ],
"exitCode" : 0
},
"pids" : [ ]
} ],
"status" : {
"code" : 200,
"message" : "The request finished successfully."
}
}