Clone File operation

The Clone File operation clones a file by using a flexclone.

The following table describes the elements for this request.


Adapter request elements for the Clone File operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: clone-file

Yes

<arguments>

Specifies a list of arguments required for this operation

Yes

<targets>

Contains the parent XML element for the <target> element, which specifies the dynamic targets

Conditional; required if the adapter configuration is empty in Grid Manager

<target>

Specifies dynamic targets

Using dynamic targets, you can define connection information for a remote host in an adapter request, which enables you to configure an adapter in Grid Manager by specifying configuration information in an adapter request.

This XML element can have <host>, <user-name>, <password>, <protocol>, and <port> as its child elements.

Note

  • Adapter configuration specified using request level dynamic targets takes precedence over the Grid Manager level configuration information.
  • If you specify a request-level dynamic target by using <targets>, the request ignores the <targets> element that is a child of <arguments>.

Conditional; required if <targets> is present in the adapter request

<host>

Specifies the host name or IP address of the server on which NetApp DataFabric Manager is running

Conditional; required if <targets> is present in the adapter request

<user-name>

Specifies the user name required to log on to NetApp DataFabric Manager

Conditional; required if <targets> is present in the adapter request

<password>

Specifies the password that corresponds to the <user-name>

The <password> element can contain an encryption-type attribute. The encryption-type attribute indicates whether the password specified is encrypted.

Valid values for the encryption-type attribute: Base64, Plain (default)

Conditional; required if <targets> is present in the adapter request

<protocol>

Specifies the communication protocol used by the adapter

Valid values: http (default), https

No

<port>

Specifies the port on which NetApp DataFabric Manager is enabled

Default values: 8088 (http), 8488 (https)

No

<target>

Contains the child XML element of the <arguments> XML element

You can use this element to specify the connection information for a DFM server:

  • The values specified for <target> must be the same as the values specified for the <name> attribute of <config> in the Grid Manager adapter configuration.
  • You can specify ALL as the value. If you specify All, the request is executed on all the DFM servers defined in the Grid Manager adapter configuration.
  • You can specify multiple comma-separated names for simultaneous execution of requests across multiple DFM servers.
  • You can skip this element. In this case, the request is executed on the first defined Grid Manager adapter configuration.
  • You can leave this element empty. In this case, the request is executed on the first defined Grid Manager adapter configuration.

    Note

    If you specify a request-level dynamic target by using <targets>, the request ignores this element.

No

<target-host>

Specifies the host name or IP address of the target storage/filer

Yes

<change-log>

Specifies whether the fingerprints of the clone blocks are recorded

If this element is set to true, the fingerprints of data blocks of the destination file/block ranges that are created are logged to the change log file if A-SIS is enabled on the volume.

With change logging, the clone operation slows, because to get fingerprints, all the data blocks are read. Without change logging, the clone operation deals with only indirect blocks without reading the data blocks.

If this element is set to false (that is, without change logging), fingerprints of the clone blocks are not recorded. The clone blocks are shared with the source blocks, but as the source blocks are modified later, corresponding clone blocks are no longer shared.

If you do not use change logging, clone blocks, which could be involved in sharing with the rest of the file system, cannot be shared in the next SIS operation. The only option is to start SIS from the beginning by using "sis start -s" to gather fingerprints of clone blocks.

No

<destination-path>

Specifies the full path of the destination file or the Logical Unit Number (LUN) in /vol/volumeName/file-path format

Destination path should be in the same flexible volume where a source file is located. For subfile/sub-LUN clone operation in the same file/LUN, a destination path is not required.

Conditional

<no-snap>

Specifies whether a snapshot of the source file is taken for cloning

If this element is set to false or is unspecified, a temporary snapshot is taken and the source file locked in snapshot is considered for cloning so that the clone operation is not affected by writes to the source file in parallel to the clone operation.

You can get atomic point in time copy of the source. Whether the clone operation is completed successfully or not, any temporary snapshot taken for cloning is deleted automatically.

If this element is set to true, the source file in the AFS is used for cloning. You might get random data in a clone if the source file is modified while the clone operation is in progress. This option must be used only when the source file will remain consistent during the clone operation. The destination file is not protected against modification while the clone operation is in progress.

You must use the destination file or destination block ranges after the clone operation is finished.

No

<source-path>

Specifies the full path of the source file or LUN in /vol/<volume-name>/<file-path> format

Yes

A sample adapter request for this operation is given in the following figure.

Sample adapter request for Clone File operation

<netapp-storage-request>
    <operation-name>clone-file</operation-name>
    <arguments>
      <targets>
        <target>
          <host>172.11.11.111</host>
          <user-name>username</user-name>
          <password encryption-type = "Base64">cGFzc3dvcmQ=</password>
          <protocol>http</protocol>
          <port>8088</port>
        </target>
      </targets>
      <target />
      <target-host>Filer1</target-host>
      <source-path>/vol/san_dataset_1/lun1/lun1</source-path>
      <destination-path>/vol/san_dataset_1/lun1/lun2</destination-path>
      <no-snap>true</no-snap>
      <change-log>false</change-log>
    </arguments>
  </netapp-storage-request>


A sample adapter response for this operation is given in the following figure.

Sample adapter response for Clone File operation

<netapp-storage-response>
  <metadata>
    <status>success</status>
    <response-count>1</response-count>
  </metadata>
  <responses>
    <response>
      <metadata>
        <target>server137</target>
        <status>success</status>
        <count>1</count>
      </metadata>
      <output>
        <clone-id>
          <clone-id-info>
            <volume-uuid>8532028c-1866-11df-9563-005056162c5a</volume-uuid>
            <clone-op-id>1</clone-op-id>
          </clone-id-info>
        </clone-id>
      </output>
    </response>
  </responses>
</netapp-storage-response>
Was this page helpful? Yes No Submitting... Thank you

Comments