disk add

Adds one or more disks to the specified node. Permissions required: fc or a.

Syntax

CLI
maprcli disk add
    -disks <disk names>
    -host <host>   
 [ -label <class of the disks>]
  [ -stripeWidth <stripe-width> ] 
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/disk/add?<parameters> 

Parameters

Parameter: disks (Required)
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: host (Required)
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: label (Optional)
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: stripeWidth (Optional)
Default Value: No default value
Possible Values: Any integer
Description: The number of disks per storage pool.

Output

Output Fields

Field

Description

ip

The IP address of the machine that owns the disk(s).

disk

The name of a disk or partition. Example sca or sca/sca1

all

The string all, meaning all unmounted disks for this node.

Example

Add a disk:

maprcli disk add -disks /dev/sda1 -host 10.250.1.79
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/add?disks=["/dev/sda1"]&host="10.250.1.79"