APIs in Category: clone | Vserver API version 1.15

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-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.
> 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.