Skip to main content
Element Software
A newer release of this product is available.

CloneVolume

Contributors netapp-pcarriga netapp-dbagwell

You can use the CloneVolume method to create a copy of a volume. This method is asynchronous and might take a variable amount of time to complete.

The cloning process begins immediately when you make the CloneVolume request and is representative of the state of the volume when the API method is issued. You can use the GetAsyncResult method to determine when the cloning process is complete and the new volume is available for connections. You can use ListSyncJobs to see the progress of creating the clone. The initial attributes and quality of service settings for the volume are inherited from the volume being cloned. You can change these settings with ModifyVolume.

Note Cloned volumes do not inherit volume access group membership from the source volume.

Parameters

This method has the following input parameters:

Name Description Type Default value Required

access

Access allowed for the new volume. If a value is not specified, the access value does not change. Possible values:

  • readOnly: (Optional) Only read operations are allowed.

  • readWrite: (Optional) Reads and writes are allowed.

  • locked: (Optional) No reads or writes are allowed. If not specified, the access value of the volume being cloned is used.

  • replicationTarget: (Optional) Identify a volume as the target volume for a paired set of volumes. If the volume is not paired, the access status is locked.

string

None

No

attributes

List of name-value pairs in JSON object format.

JSON object

None

No

enable512e

Specifies whether the new volume should use 512-byte sector emulation. If unspecified, the setting of the volume being cloned is used.

boolean

Setting of original volume

No

enableSnapMirrorReplication

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

  • true

  • false

boolean

false

No

name

Name of the new cloned volume; must be 1 to 64 characters in length.

string

None

Yes

newAccountID

AccountID for the owner of the new volume. If unspecified, the accountID of the owner of the volume being cloned is used.

integer

AccountID of the owner of original volume

No

newSize

New size of the volume, in bytes. Might be greater or less than the size of the volume being cloned. If not specified, the volume size is not changed. Size is rounded up to the nearest 1MB in size.

integer

None

No

snapshotID

ID of the snapshot that is used as the source of the clone. If no ID is provided, the current active volume is used.

integer

None

No

volumeID

VolumeID for the volume to be cloned.

integer

None

Yes

Return values

This method has the following return values:

Name

Description

Type

asyncHandle

The handle value used to obtain the operation result.

integer

cloneID

The cloneID for the newly cloned volume.

integer

curve

The QoS curve values applied to the clone.

JSON object

volume

An object containing information about the newly cloned volume.

volumeID

VolumeID for the newly cloned volume.

integer

Request example

Requests for this method are similar to the following example:

{
   "method": "CloneVolume",
   "params": {
      "volumeID" : 5,
      "name"  : "mysqldata-snapshot1",
      "access" : "readOnly"
   },
   "id" : 1
}

Response example

This method returns a response similar to the following example:

{
  "id": 1,
  "result": {
      "asyncHandle": 42,
      "cloneID": 37,
      "volume": {
          "access": "readOnly",
          "accountID": 1,
          "attributes": {},
          "blockSize": 4096,
          "createTime": "2016-03-31T22:26:03Z",
          "deleteTime": "",
          "enable512e": true,
          "iqn": "iqn.2010-01.com.solidfire:jyay.mysqldata-snapshot1.680",
          "name": "mysqldata-snapshot1",
          "purgeTime": "",
          "qos": {
              "burstIOPS": 100,
              "burstTime": 60,
              "curve": {
                  "4096": 100,
                  "8192": 160,
                  "16384": 270,
                  "32768": 500,
                  "65536": 1000,
                  "131072": 1950,
                  "262144": 3900,
                  "524288": 7600,
                  "1048576": 15000
              },
              "maxIOPS": 100,
              "minIOPS": 50
          },
          "scsiEUIDeviceID": "6a796179000002a8f47acc0100000000",
          "scsiNAADeviceID": "6f47acc1000000006a796179000002a8",
          "sliceCount": 0,
          "status": "init",
          "totalSize": 1000341504,
          "virtualVolumeID": null,
          "volumeAccessGroups": [],
          "volumeID": 680,
          "volumePairs": []
      },
      "volumeID": 680
  }
}

New since version

9.6

Find more information