netapp snapmirror dr with lun example

Snapmirror DR in a SAN environment.

In this example you will create two SVMs. The src_svm has a src_volume,

the dest_svm will have a dest_volume of the type DP.

The two SVMs will be peered. The cluster cl1 and cl2 are already peered.

We will create a lun in the src_svm and the volume will be snapmirrored to the dest_volume.

The lun will be mapped to a windows machine from both SVMs. DR will be tested.

1. create src_svm

cl1::> vserver create -vserver src_svm -rootvolume rv -aggregate n1_aggr1 -rootvolume-security-style unix

cl1::> vserver create -vserver src_svm -rootvolume rv -aggregate n1_aggr1 -rootvolume-security-style unix

2. create src_volume

cl1::> vol create -vserver src_svm -volume src_volume -aggregate n1_aggr2  -size 2g -state online -policy default -junction-path /src_volume

3. create lun

cl1::> lun create -vserver src_svm  -path /vol/src_volume/lun -size 1g  -ostype windows

4. create iscsi service in the svm

cl1::> iscsi create -vserver src_svm -target-alias src_svm

5. create a lif in the src_svm

cl1::> net int create -vserver src_svm -lif lif1 -role data -data-protocol iscsi -home-node cl1-01 -home-port e0d -address -netmask -status-admin up

6. Login from windows to src_svm using iscsi-initiator.
7. get the windows iqn number

cl1::> iscsi initiator show

(output will be something like)

8. create an igroup in src_svm

cl1::> igroup create -vserver src_svm -igroup win -protocol mixed -ostype windows -initiator

cl1::> lun map -vserver src_svm -path /vol/src_volume/lun -igroup win

On windows, rescan disks.

On windows, create a new simple volume in the lun and put some data in it.

9. create destination svm

cl2::> vserver create -vserver dest_svm -subtype default -rootvolume rv -aggregate aggr1 -rootvolume-security-style unix

10. create destination volume

cl2::> vol create -vserver dest_svm -volume dest_volume -aggregate aggr1 -size 2g -state online -type DP

11. peer the vservers
cl2::> vserver peer create -vserver dest_svm -peer-vserver src_svm -applications snapmirror -peer-cluster cl1

12. accept the peering relationship
cl1::> vserver peer accept -vserver src_svm -peer-vserver dest_svm

13. setup snapmirror
cl2::> snapmirror create -source-path src_svm:src_volume -destination-path dest_svm:dest_volume -type DP

14. initialize snapmirror
cl2::> snapmirror initialize -destination-path dest_svm:dest_volume

15. check for the snapmirrored lun
cl2::> lun show -vserver dest_svm

16. create a lif on the dest svm
cl2::> net int create -vserver dest_svm -lif lif1 -role data -data-protocol iscsi -home-node cl2_1 -home-port e0c -address -netmask

17. create the iscsi service in the svm
cl2::> vserver iscsi create -vserver dest_svm
18. create an igroup in dest_svm
cl2::> igroup create -vserver dest_svm -igroup win -protocol mixed -ostype windows -initiator

19. map the lun
cl2::> lun map -vserver dest_svm -path /vol/dest_volume/lun
-igroup win

20. offline the source lun
cl1::> lun offline -vserver src_svm -path /vol/src_volume/lun

21. break the relationship
cl2::> snapmirror break -destination-path dest_svm:dest_volume

Login from windows to dest_svm using iscsi-initiator.
Access the lun on cl2. If the disk is still read-only, offline it and online it again.

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.