Skip to main content

NetApp

ONTAP LUN Migration Runbook With CLI and REST API

NetApp guide — Storage KnowHow

Scope

This runbook covers moving a LUN from one ONTAP volume to another within an SVM. It is not a host-based data migration and it is not a license to ignore host multipath. NetApp documents lun move start as the command that moves a LUN from one volume to another: lun move start.

Prechecks

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Host checks:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Confirm that the destination volume has space, the host has redundant paths, and the application owner understands whether the move is online for the workload and ONTAP release involved.

CLI Process

Start the LUN move:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Monitor:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Validate mapping:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

REST API Process

Discover the LUN and volumes:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

If your ONTAP release exposes native LUN move endpoints, use that endpoint after validating it in a lab. If not, use the CLI for the move and REST for pre/post evidence. A conservative automation should not fake LUN movement by creating a new LUN unless that is a separate host migration design.

REST validation after the move:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Best Practices

Backout

If the move has not completed, stop according to the LUN move state and ONTAP guidance. If it completed, moving the LUN back is a new controlled operation:

lun move start \
  -vserver svm_prod01 \
  -source-path /vol/dst_lun_vol/app01.lun \
  -destination-path /vol/src_lun_vol/app01.lun

Validate host paths again before closing the change.

Comments