How to restore LUN in ONTAP

Restoring a single LUN from a Snapshot copy

You can restore a single LUN from a Snapshot copy without restoring the entire volume that contains the single LUN. You can restore the LUNin place or to a new path in the volume. The operation restores only the single LUN without impacting other files or LUNs in the volume. You can also restore files with streams.

Steps

  1. From the host, stop all host access to the LUN.
  2. Unmount the LUN on its host so that the host cannot access the LUN.
  3. Unmap the LUN:lun mapping delete -vserver vserver_name -volume volume_name -lun lun_name -igroup igroup_name
  4. Determine the Snapshot copy you want to restore your LUN to:volume snapshot show -vserver vserver_name -volume volume_name
  5. Create a Snapshot copy of the LUN prior to restoring the LUN:volume snapshot create -vserver vserver_name -volume volume_name-snapshot snapshot_name
  6. Restore the specified LUN in a volume:volume snapshot restore-file -vserver vserver_name -volume volume_name -snapshot snapshot_name -path lun_path
  7. Follow the steps on the screen.
  8. Bring the LUN online:lun modify -vserver vserver_name -path lun_path -state online
  9. Remap the LUN:lun mapping create -vserver vserver_name -volume volume_name -lun lun_name -igroup igroup_name
  10. From the host, remount the LUN.
  11. From the host, restart access to the LUN.
  12. Verify the required files are restored.

Above procedure can be performed from OnCommand GUI, using the LUN Management section by deselecting the Initiator and doing a snapshot restore.