disk setlabel

Adds a label to disks or a storage pool. Permissions required: fc or a.

Syntax

CLI
maprcli disk setlabel
  -host name/ip 
  -disks comma-separated list of disks 
  -label label-name 
[ -force Need this parameter to reassign label to sp, otherwise reassignment of label 
         will not happen on sp. Parameter takes no value]
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/disk/setlabel?<parameters> 

Parameters

Parameter: host
Default Value: No default value
Possible Values: Any valid host or IP
Description: The hostname or IP address of the machine on which to add the disk.
Parameter: disks
Default Value: No default value
Possible Values: Any valid disk names
Description: A comma-separated list of disk names. Examples:
  • /dev/sdc
  • /dev/sdd,/dev/sde,/dev/sdf
Parameter: label
Default Value: HDD
Possible Values: Any label
Description: The label to use for the storage pool. See Using Storage Labels for more information on labels.
The label should contain only the following characters:
A-Z a-z 0-9 _ - .
Parameter: force
Default Value: Not Applicable
Possible Values: Not Applicable
Description: Forces reassignment of the label to a storage pool.

Output

# maprcli disk setlabel -host atsqa4-161.qa.lab -disks /dev/sdd -label label1 -json
             {
             "timestamp":1590420155635,
             "timeofday":"2020-05-25 08:22:35.635 GMT-0700 AM",
             "status":"OK",
             "total":0,
             "data":[        ]
             }
          

Examples

Set label label1 on disk /dev/sdd:

# maprcli disk setlabel -host atsqa4-161.qa.lab -disks /dev/sdd -label label1 -json
{
        "timestamp":1590420155635,
        "timeofday":"2020-05-25 08:22:35.635 GMT-0700 AM",
        "status":"OK",
        "total":0,
        "data":[        ]
}
TBD