Restore a single LUN from a SnapVault backup
You can restore a single LUN to a new location or to the original location. You can restore from any Snapshot copy 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 copy 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 copy 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.
-
Run the
snapmirror show
command to verify the secondary volume that contains the SnapVault backup.cluster::> snapmirror show Source Dest Mirror Relation Total Last Path Type Path State Status Progress Healthy Updated -------- ---- --------- ------- --------- --------- ------- ------- vserverA:srcvolA XDP vserverB:dstvolB Snapmirrored Idle - true -
-
Run the
volume snapshot show
command to identify the Snapshot copy that you want to restore the LUN from.cluster::> 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%
-
Run the
volume clone create
command to create a read-write clone from the desired Snapshot copy.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
-
Run the
lun show
command to list the LUNs in the volume clone.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.
-
If the igroup for the desired host does not already exist on the SVM containing the SnapVault backup, run the
igroup create
command to create an igroup.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
-
Run the
lun mapping create
command to map the desired LUN copy to the igroup.cluster::> lun mapping create -vserver vserverB -path /vol/dstvolB_clone/lun_C -igroup temp_igroup
-
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.