Restore all LUNs in a volume from an ONTAP snapshot
You can use volume snapshot restore
command to restore all the LUNs in a specified volume from a snapshot.
Steps
-
From the host, stop all host access to the LUNs.
Using SnapRestore without stopping all host access to LUNs in the volume can cause data corruption and system errors.
-
Unmount the LUNs on that host so that the host cannot access the LUNs.
-
Unmap your LUNs:
lun mapping delete -vserver <SVM_name> -volume <volume_name> -lun <lun_name> -igroup <igroup_name>
-
Determine the snapshot to which you want to restore your volume:
volume snapshot show -vserver <SVM_name> -volume <volume_name>
-
Change your privilege setting to advanced:
set -privilege advanced
-
Restore your data:
volume snapshot restore -vserver <SVM_name> -volume <volume_name> -snapshot <snapshot_name>
-
Follow the instructions on the screen.
-
Remap your LUNs:
lun mapping create -vserver <SVM_name> -volume <volume_name> -lun <lun_name> -igroup <igroup_name>
-
Verify that your LUNs are online:
lun show -vserver <SVM_name> -path <lun_path> -fields state
-
If your LUNs are not online, bring them online:
lun modify -vserver <SVM_name> -path <lun_path> -state online
-
Change your privilege setting to admin:
set -privilege admin
-
From the host, remount your LUNs.
-
From the host, restart access to your LUNs.