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
- From the host, stop all host access to the LUN.
- Unmount the LUN on its host so that the host cannot access the LUN.
- Unmap the LUN:lun mapping delete -vserver vserver_name -volume volume_name -lun lun_name -igroup igroup_name
- Determine the Snapshot copy you want to restore your LUN to:volume snapshot show -vserver vserver_name -volume volume_name
- Create a Snapshot copy of the LUN prior to restoring the LUN:volume snapshot create -vserver vserver_name -volume volume_name-snapshot snapshot_name
- Restore the specified LUN in a volume:volume snapshot restore-file -vserver vserver_name -volume volume_name -snapshot snapshot_name -path lun_path
- Follow the steps on the screen.
- Bring the LUN online:lun modify -vserver vserver_name -path lun_path -state online
- Remap the LUN:lun mapping create -vserver vserver_name -volume volume_name -lun lun_name -igroup igroup_name
- From the host, remount the LUN.
- From the host, restart access to the LUN.
- 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.