CreateVolume

Contributors netapp-mwallis amgrissino ntap-bmegan Download PDF of this page

You can use the CreateVolume method to create a new, empty volume on the cluster. As soon as the volume is created, the volume is available for connection via iSCSI.

Volumes created without specified QoS values use the default values. You can view default values for a volume by using the GetDefaultQoS method.

Parameters

This method has the following input parameters:

Name Description Type Default value Required

access

The access mode for the volume. If this parameter is included, the only supported value is snapMirrorTarget.

string

None

No

accountID

The ID of the account that owns this volume.

integer

None

Yes

associateWithQoSPolicy

Associate the volume with the specified QoS policy. Possible values:

  • true: Associate the volume with the QoS policy specified in the QoSPolicyID parameter.

  • false: Do not associate the volume with the QoS policy specified in the QoSPolicyID parameter. When false, any existing policy association is removed, regardless of whether you specify a QoS policy in the QoSPolicy parameter.

boolean

true

No

attributes

List of name-value pairs in JSON object format. The total attribute size must be less than 1000B, or 1KB, including JSON formatting characters.

JSON object

None

No

enable512e

Enable 512-byte sector emulation. Possible values:

  • true: The volume provides 512-byte sector emulation.

  • false: 512e emulation is not enabled.

boolean

None

Yes

enableSnapMirrorReplication

Determines whether the volume can be used for replication with SnapMirror endpoints. Possible values:

  • true

  • false

boolean

false

No

fifoSize

Specifies the maximum number of First-In-First-Out (FIFO) snapshots supported by the volume. Note that FIFO and non-FIFO snapshots both use the same pool of available snapshot slots on a volume. Use this option to limit FIFO snapshot consumption of the available snapshot slots. If omitted, the value defaults to 24.

integer

24

No

minFifoSize

Specifies the minimum number of First-In-First-Out (FIFO) snapshot slots reserved by the volume. This guarantees that if you are using both FIFO snapshots and non-FIFO snapshots on a volume that the non-FIFO snapshots do not unintentionally consume too many FIFO slots. It also ensures that at least this many FIFO snapshots are always available. Since FIFO and non-FIFO snapshots share the same pool, the minFifoSize reduces the total number of possible non-FIFO snapshots by the same amount. If omitted, the value defaults to 0.

integer

0

No

name

Name of the volume access group (may be user-specified). Not required to be unique, but recommended. Must be 1 to 64 characters in length.

string

None

Yes

qos

The initial quality of service settings for this volume. Default values are used if none are specified. Possible values:

  • minIOPS

  • maxIOPS

  • burstIOPS

QoS object

None

No

qosPolicyID

The ID for the policy whose QoS settings should be applied to the specified volumes. This parameter is mutually exclusive with the qos parameter.

integer

None

No

totalSize

Total size of the volume, in bytes. Size is rounded up to the nearest megabyte.

integer

None

Yes

Return values

This method has the following return values:

Name

Description

Type

volume

Object containing information about the newly created volume.

volumeID

The volumeID for the newly created volume.

integer

curve

The curve is a set of key-value pairs. The keys are the I/O sizes in bytes. The values represent the cost of performing an IOP at a specific I/O size. The curve is calculated relative to a 4096 byte operation set at 100 IOPS.

JSON object

Request example

Requests for this method are similar to the following example:

{
   "method": "CreateVolume",
   "params": {
      "name": "mysqldata",
      "accountID": 1,
      "totalSize": 107374182400,
      "enable512e": false,
      "attributes": {
         "name1": "value1",
         "name2": "value2",
         "name3": "value3"
      },
      "qos": {
         "minIOPS": 50,
         "maxIOPS": 500,
         "burstIOPS": 1500,
         "burstTime": 60
      }
   },
   "id": 1
}

Response example

This method returns a response similar to the following example:

{
    "id": 1,
    "result": {
        "curve": {
            "4096": 100,
            "8192": 160,
            "16384": 270,
            "32768": 500,
            "65536": 1000,
            "131072": 1950,
            "262144": 3900,
            "524288": 7600,
            "1048576": 15000
        },
        "volume": {
            "access": "readWrite",
            "accountID": 1,
            "attributes": {
                "name1": "value1",
                "name2": "value2",
                "name3": "value3"
            },
            "blockSize": 4096,
            "createTime": "2016-03-31T22:20:22Z",
            "deleteTime": "",
            "enable512e": false,
            "iqn": "iqn.2010-01.com.solidfire:mysqldata.677",
            "name": "mysqldata",
            "purgeTime": "",
            "qos": {
                "burstIOPS": 1500,
                "burstTime": 60,
                "curve": {
                    "4096": 100,
                    "8192": 160,
                    "16384": 270,
                    "32768": 500,
                    "65536": 1000,
                    "131072": 1950,
                    "262144": 3900,
                    "524288": 7600,
                    "1048576": 15000
                },
                "maxIOPS": 500,
                "minIOPS": 50
            },
            "scsiEUIDeviceID": "6a796179000002a5f47acc0100000000",
            "scsiNAADeviceID": "6f47acc1000000006a796179000002a5",
            "sliceCount": 0,
            "status": "active",
            "totalSize": 107374182400,
            "virtualVolumeID": null,
            "volumeAccessGroups": [],
            "volumeID": 677,
            "volumePairs": []
        },
        "volumeID": 677
    }
}

New since version

9.6

Find more information