APIs in Category: clone | Vserver API version 1.20

clone-autodelete clone-create | The cloning feature is based on constant time sis cloning storage (SIS) implementation and is the the block sharing infrastructure provided by Data ONTAP. The feature allows for the cloning from either a file or a LUN. Also the user can clone the entire file or LUN (full range) or a portion of the file or LUN (sub range). In case of full range cloning, a new file/LUN will always be created in the same volume where the source file/LUN exists. In case of sub range cloning, the destination file can either be same as the source file/LUN or can be a different file/LUN within the same volume where the source file/LUN exists. Constant time SIS cloning supersedes the implementation of cloning in versions older than Data ONTAP 8.1. In Data ONTAP 8.0 the cloning implementation is an asynchronous operation. The clone-start API is used to start a clone operation. It returns an clone-id which is used for polling to get the status of the clone operation using the clone-list-status API. If this API returns success, the user can consider that clone operation has completed; if it returns failure, the user should clear the status of clone operation using clone-clear API. A clone operation in progress can be aborted using the clone-stop API. In Data ONTAP 8.1 the cloning implementation is a synchronous operation. The APIs to manage ongoing synchronous operations are deprecated, but retained for backwards compatibility.

NetApp Manage ONTAP

clone-autodelete | [top]

> Set autodelete on a lun clone.

> Input Name | Range | Type | Description
> clone-path |  | string | Path of the file or the LUN inside the volume. It's relative if the volume name is specified otherwise it's absolute.
> enable |  | boolean | If this field is true, autodelete will be allowed to delete the clone in try/disrupt mode. and if it is false, autodelete will not be allowed to delete the clone in try/disrupt mode.
> volume |  | string optional | Name of the volume where the clone file or LUN reside.

> Errno | Description
> EVSERVERNOTFOUND |  |
> EVOLUMEDOESNOTEXIST |  |
> EVOLUMENOTONLINE |  |
> EINVALIDINPUTERROR |  |
> EINTERNALERROR |  |
> EFILENOTFOUND |  |
> EVOLUMEBUSY |  |
> EVOLUMEOFFLINE |  |
> EONTAPI_EPERM |  |
> EONTAPI_EVOLOPNOTSUPP |  |

clone-create | [top]

> Create a file/sub file or LUN/sub LUN clone.

> Input Name | Range | Type | Description
> block-ranges |  | block-range[] optional | List of block ranges for sub-file/sub-LUN cloning. For sub-LUN cloning the block range specified will be considered as SCSI LBA range. If only one block range is supplied, the source and destination range must not overlap and both ranges must not extend past the end of the file If multiple block ranges are specified in one operation, the user must ensure all source and destination ranges do not overlap, otherwise the result is undefined. In case of sub-LUN cloning, the API will copy data in case the LBAs are not block aligned. If the user provides LBAs such that actual number of blocks to be cloned is zero, then API will return error. The API will fail if the source range overlaps with the destination range or if the source and the destination ranges overlap amongst themselves. If block range is not provided then the file/LUN cloning is fully cloned.
> destination-path |  | string optional | Full path of the Destination file or destination LUN relative to the volume. The destination file must be in same volume as "source-path". If not specified, a sub-range clone of the source file or LUN will be performed onto itself. Either "destination-path" or "block-ranges" must be specified.
> ignore-locks |  | boolean optional | Clone even if (advisory/mandatory) byte_range locks or share_mode locks exist on the source or destination. By default value is false.
> ignore-streams |  | boolean optional | Clone only the base file and ignore streams on source or destination. By default value is false so streams are also cloned from source and existing destination streams are deleted.
> qos-policy-group-name |  | string optional | QoS policy group defines measurable Service Level Objectives (SLOs) that apply to the storage objects with which the policy group is associated. If you do not assign a policy group to a flexclone file, the system will not monitor and control the traffic to it. This field is available in Data ONTAP 8.2 and later
> snapshot-name |  | string optional | Snapshot name from which to clone the source file or LUN. If not specified, the contents of the active filesystem will be used.
> source-path |  | string | Relative path of the source file or the source LUN inside the volume.
> space-reserve |  | boolean optional | Set the space reservation of the destination clone. By default space reservation is inherited from source. The API errors out if used in conjunction with block range arguments, since space reservations cannot be set for a block range.
> volume |  | string | Name of the volume where the source and destination files or LUNs reside.

> Errno | Description
> ESIS_CLONE_LICENSE_EXPIRED |  |
> ESIS_CLONE_CLONE_INVALID_SPC_RSRV |  |
> ESIS_CLONE_STALE_INODE |  |
> ESIS_CLONE_DECOMP_ACTIVE |  |
> ESIS_CLONE_SPLIT_MAP |  |
> ESIS_CLONE_SOURCE_TOO_SMALL |  |
> EDENSE_CLONE_NOT_LICENSED |  |
> EONTAPI_EBUSY |  |
> EONTAPI_ESTALE |  |
> EONTAPI_EDQUOT |  |
> EONTAPI_EACCES |  |
> EONTAPI_ENOSPC |  |
> ESIS_CLONE_DOWNGRADE |  |
> EINTERNALERROR |  |

Element definition: block-range | [top]

> Structure containing source and destination block range for sub-file/sub-LUN cloning.

> Name | Range | Type | Description
> block-count | [1..2^24] | integer | Number of blocks to be cloned.
> destination-block-number | [0..2^63-1] | integer | Starting file block number of destination block range.
> source-block-number | [0..2^63-1] | integer | Starting file block number of source block range. Block size is 4096 bytes.