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

Start a file move operation

Contributors

POST /storage/file/moves

Introduced In: 9.11

Starts a file move operation. This API can be used to move files from one FlexVol volume to another FlexVol volume or within a FlexGroup volume for capacity rebalancing. For a FlexGroup volume file move operation, only one source file can be specified in files_to_move. The source volume is the FlexGroup volume. The destination volume is the destination FlexGroup volume constituent to move the file to. When automatic is true, destination volume is not required. The source path is the path to the file to be moved within the FlexGroup volume. If the destination path is specified, it must be the same as the source path.

Required properties for file move operation

  • files_to_move - List of files with the destination they are to be moved to.

Optional properties for file move operation

  • reference - The source reference file for moving multiple files.

Default property values

  • max_throughput - 0

  • max_cutover_time - 10

  • reference.max_cutover_time - 10

  • volume file move start

  • volume rebalance file-move start

Parameters

Name Type In Required Description

force

boolean

query

False

If true, the FlexGroup volume file move operation breaks the existing lock state on the file being moved. Breaking the lock state may cause a disruption for some client applications.

  • Default value:

automatic

boolean

query

False

If true, the FlexGroup volume file move operation selects the destination constituent automatically.

  • Default value:

return_records

boolean

query

False

The default is false. If set to true, the records are returned.

  • Default value:

Request Body

Name Type Description

cutover_time

integer

Time that the file move operation takes before cutover completes, in seconds.

destination

destination

Destination file information.

elapsed_time

integer

Time elapsed since the start of the file move operation, in seconds.

failure

error

Contains the most recent failure reason for move operation.

files_to_move

files_to_move

A list of source files along with the destination file they are moved to. If the terminal path component of the destination is a directory, then the source file's basename is replicated in that directory. This is only used for FlexVol volume file move operations.

index

integer

An additional unique element identifying one file among many that could possibly be moved as part of a job. File index is an identifier ordered by the file path arrays provided during create. For file move operations that involve only one file, the file-index value of zero is always correct.

is_destination_ready

boolean

Indicates whether the destination file is ready for use.

is_flexgroup

boolean

Indicates whether this is a FlexGroup file move operation.

is_snapshot_fenced

boolean

Indicates whether Snapshot copies are fenced.

max_cutover_time

integer

The maximum amount of time, in seconds that the source can be quiesced before a destination file must be made available for read-write traffic. Not supported in FlexGroup volume file move operations.

max_throughput

integer

Maximum amount of data, in bytes that can be transferred per second in support of this operation. A non-zero value less than 1 MB/s is set to 1 MB/s. A non-zero value greater than 1 MB/s is truncated to the nearest integral megabyte value. If unspecified, the default value is "0" which means no range is set for the data transfer.

node

node

Node hosting the destination of this move operation.

reference

reference

scanner

scanner

source

source

Source file information.

svm

svm

SVM of the FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

uuid

string

The UUID which uniquely identifies the job that started this move operation.

volume

volume

FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

Example request
{
  "cutover_time": 8,
  "destination": {
    "path": "d1/d2/file1",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "volume": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "volume1",
      "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
    }
  },
  "elapsed_time": 100,
  "failure": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  },
  "files_to_move": {
    "destinations": [
      {
        "path": "d1/d2/file1",
        "svm": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "svm1",
          "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
        },
        "volume": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "volume1",
          "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
        }
      }
    ],
    "sources": [
      {
        "path": "d1/d2/file1",
        "svm": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "svm1",
          "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
        },
        "volume": {
          "_links": {
            "self": {
              "href": "/api/resourcelink"
            }
          },
          "name": "volume1",
          "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
        }
      }
    ]
  },
  "index": 0,
  "max_cutover_time": 10,
  "max_throughput": 250000,
  "node": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "node1",
    "uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
  },
  "reference": {
    "max_cutover_time": 5,
    "path": "string",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "volume": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "volume1",
      "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
    }
  },
  "scanner": {
    "percent": 80,
    "progress": 80000,
    "state": "string",
    "total": 100000
  },
  "source": {
    "path": "d1/d2/file1",
    "svm": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "svm1",
      "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
    },
    "volume": {
      "_links": {
        "self": {
          "href": "/api/resourcelink"
        }
      },
      "name": "volume1",
      "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
    }
  },
  "svm": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "svm1",
    "uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
  },
  "uuid": "4fcb3159-a4ee-42b5-bb16-f752f2c430fc",
  "volume": {
    "_links": {
      "self": {
        "href": "/api/resourcelink"
      }
    },
    "name": "volume1",
    "uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
  }
}

Response

Status: 201, Created

Error

Status: Default

ONTAP Error Response Codes

Error Code Description

7012352

File locations are inconsistent. All files must be on the same volume.

7012353

Exceeded the file operations supported number of files.

7012354

Unable to pair the number of source files to destination files.

7012357

Cannot start a file operation until all cluster nodes support the file operations capability.

7012358

The specified source path is invalid.

7012359

The specified destination path is invalid.

7012360

The SVMs are not in an intracluster peering relationship.

7012361

The SVMs peering relationship does not include application "file-move".

7012362

The SVMs are not yet in a peered state.

7012363

Cannot move files. All file operations must be managed by the destination SVM's administrator.

7012365

Copying a file between clusters is not supported.

7012367

A reference path may only be specified if multiple source paths are specified.

7012368

The reference path must have a matching source path.

7012371

The reference cutover time exceeds the maximum allowable time.

7012374

Source volume and destination volume have different home clusters.

7012376

Operation not allowed on a volume that is part of a SnapMirror Synchronous relationship.

7012377

Cannot start a file move operation on the volume because an active volume conversion is in progress.

144179206

Source file does not exist.

144179207

Volume capacity balancing requires an effective cluster version of 9.10.1 or later.

144180200

Destination constituent not a member of FlexGroup volume.

144180201

Destination constituent not properly configured.

144180206

File movement with automatic destination constituent selection only supported on FlexGroup volumes with more than one constituent.

196608143

Cannot start the operation. The volume is undergoing a secure purge operation.

Name Type Description

error

error

Example error
{
  "error": {
    "arguments": [
      {
        "code": "string",
        "message": "string"
      }
    ],
    "code": "4",
    "message": "entry doesn't exist",
    "target": "uuid"
  }
}

Definitions

See Definitions

href

Name Type Description

href

string

Name Type Description

self

href

svm

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

Name Type Description

_links

_links

name

string

The name of the volume.

uuid

string

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

destination

Destination file information.

Name Type Description

path

string

svm

svm

volume

volume

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

error

Contains the most recent failure reason for move operation.

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.

destinations

Name Type Description

path

string

svm

svm

volume

volume

sources

Name Type Description

path

string

svm

svm

volume

volume

files_to_move

A list of source files along with the destination file they are moved to. If the terminal path component of the destination is a directory, then the source file's basename is replicated in that directory. This is only used for FlexVol volume file move operations.

Name Type Description

destinations

array[destinations]

The destination file information.

sources

array[sources]

The source file information.

node

Node hosting the destination of this move operation.

Name Type Description

_links

_links

name

string

uuid

string

svm

SVM of the source reference file.

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

Volume of the source reference file.

Name Type Description

_links

_links

name

string

The name of the volume.

uuid

string

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

reference

Name Type Description

max_cutover_time

integer

The maximum amount of time, in seconds that the source reference file can be quiesced before the corresponding destination file must be made available for read-write traffic. Not supported in FlexGroup volume file move operations.

path

string

The source reference file. If a reference file is specified, data for other files being moved will be transferred as a difference from the reference file. This can save bandwidth and destination storage if the specified source files share blocks. If provided, this input must match one of the source file paths. This input need not be provided if only one source file is specified. Not supported in FlexGroup volume file move operations.

svm

svm

SVM of the source reference file.

volume

volume

Volume of the source reference file.

scanner

Name Type Description

percent

integer

Scanner progress, as a percentage.

progress

integer

Scanner progress, in bytes scanned.

state

string

Status of the file move scanner.

total

integer

Total bytes to be scanned.

source

Source file information.

Name Type Description

path

string

svm

svm

volume

volume

svm

SVM of the FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

Name Type Description

_links

_links

name

string

The name of the SVM.

uuid

string

The unique identifier of the SVM.

volume

FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

Name Type Description

_links

_links

name

string

The name of the volume.

uuid

string

Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

file_move

Details of a file move operation.

Name Type Description

cutover_time

integer

Time that the file move operation takes before cutover completes, in seconds.

destination

destination

Destination file information.

elapsed_time

integer

Time elapsed since the start of the file move operation, in seconds.

failure

error

Contains the most recent failure reason for move operation.

files_to_move

files_to_move

A list of source files along with the destination file they are moved to. If the terminal path component of the destination is a directory, then the source file's basename is replicated in that directory. This is only used for FlexVol volume file move operations.

index

integer

An additional unique element identifying one file among many that could possibly be moved as part of a job. File index is an identifier ordered by the file path arrays provided during create. For file move operations that involve only one file, the file-index value of zero is always correct.

is_destination_ready

boolean

Indicates whether the destination file is ready for use.

is_flexgroup

boolean

Indicates whether this is a FlexGroup file move operation.

is_snapshot_fenced

boolean

Indicates whether Snapshot copies are fenced.

max_cutover_time

integer

The maximum amount of time, in seconds that the source can be quiesced before a destination file must be made available for read-write traffic. Not supported in FlexGroup volume file move operations.

max_throughput

integer

Maximum amount of data, in bytes that can be transferred per second in support of this operation. A non-zero value less than 1 MB/s is set to 1 MB/s. A non-zero value greater than 1 MB/s is truncated to the nearest integral megabyte value. If unspecified, the default value is "0" which means no range is set for the data transfer.

node

node

Node hosting the destination of this move operation.

reference

reference

scanner

scanner

source

source

Source file information.

svm

svm

SVM of the FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

uuid

string

The UUID which uniquely identifies the job that started this move operation.

volume

volume

FlexGroup volume in file move operation. Only used in a FlexGroup volume file move operation.

error

Name Type Description

arguments

array[error_arguments]

Message arguments

code

string

Error code

message

string

Error message

target

string

The target parameter that caused the error.