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
(Required) - Default Value: No default value
- Parameter:
disks
(Required) - Default Value: No default value
- Parameter:
label
(Required) - Default Value: HDD
- Parameter:
force
(Optional) - Default Value: Not Applicable
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":[ ]
}
NOTE
When using a self-signed certificate, pass the -k
option to
curl
to avoid the certificate check.curl -k -u <username> -X POST https://abc.sj.us:8443/rest/disk/setlabel?host="atsqa4-161.qa.lab"&disks=["/dev/sdd"]&label="label1"