Restore a single LUN from an ONTAP SnapVault backup
You can restore a single LUN to a new location or to the original location. You can restore from any snapshot in the SnapVault secondary volume. To restore the LUN to the original location, you first restore it to a new location and then copy it.
-
The SnapVault relationship must be initialized and the SnapVault secondary volume must contain an appropriate snapshot to restore.
-
The storage virtual machine (SVM) containing the SnapVault secondary volume must have one or more LIFs with the desired SAN protocol that are accessible from the host used to access the LUN copy.
-
The igroups must already exist on the SnapVault SVM.
The process includes creating a read-write volume clone from a snapshot in the SnapVault secondary volume. You can use the LUN directly from the clone, or you can optionally copy the LUN contents back to the original LUN location.
The LUN in the clone has a different path and serial number from the original LUN. Persistent reservations are not retained.
-
Verify the secondary volume that contains the SnapVault backup.
snapmirror showcluster::> snapmirror show Source Dest Mirror Relation Total Last Path Type Path State Status Progress Healthy Updated -------- ---- --------- ------- --------- --------- ------- ------- vserverA:srcvolA XDP vserverB:dstvolB Snapmirrored Idle - true - -
Identify the snapshot that you want to restore the LUN from.
volume snapshot showcluster::> volume snapshot show Vserver Volume Snapshot State Size Total% Used% -------- ------- ---------------------- ----- ------ ------ ----- vserverB dstvolB snap2.2013-02-10_0010 valid 124KB 0% 0% snap1.2013-02-10_0015 valid 112KB 0% 0% snap2.2013-02-11_0010 valid 164KB 0% 0% -
Create a read-write clone from the desired snapshot
volume clone create -vserver <SVM_name> -flexclone <flexclone_name> -type <type> -parent-volume <parent_volume_name> -parent-snapshot <snapshot_name>The volume clone is created in the same aggregate as the SnapVault backup. There must be enough space in the aggregate to store the clone.
cluster::> volume clone create -vserver vserverB -flexclone dstvolB_clone -type RW -parent-volume dstvolB -parent-snapshot daily.2013-02-10_0010 [Job 108] Job succeeded: Successful
-
List the LUNs in the volume clone.
lun show -vserver <SVM_name> -volume <flexclone_volume_name>cluster::> lun show -vserver vserverB -volume dstvolB_clone Vserver Path State Mapped Type --------- ------------------------ ------- -------- -------- vserverB /vol/dstvolB_clone/lun_A online unmapped windows vserverB /vol/dstvolB_clone/lun_B online unmapped windows vserverB /vol/dstvolB_clone/lun_C online unmapped windows 3 entries were displayed.
Learn more about
lun showin the ONTAP command reference. -
If the igroup for the desired host does not already exist on the SVM containing the SnapVault backup, create an igroup.
igroup create -vserver <SVM_name> -igroup <igroup_name> -protocol <protocol> -ostype <os_type> -initiator <initiator_name>This example creates an igroup for a Windows host that uses the iSCSI protocol:
cluster::> igroup create -vserver vserverB -igroup temp_igroup -protocol iscsi -ostype windows -initiator iqn.1991-05.com.microsoft:hostA
-
Map the desired LUN copy to the igroup.
lun mapping create -vserver <SVM_name> -path <lun_path> -igroup <igroup_name>cluster::> lun mapping create -vserver vserverB -path /vol/dstvolB_clone/lun_C -igroup temp_igroup
Learn more about
lun mapping createin the ONTAP command reference. -
Connect the host to the LUN and access the contents of the LUN, as desired.
The LUN is read-write and can be used in place of the original LUN. Because the LUN serial number is different, the host interprets it as a different LUN from the original.
-
Use a copy program on the host to copy the LUN contents back to the original LUN.