Netapp iscsi DR example

 

In this example we will create two SVMs. The source_svm has a source_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 source_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.

# create source_svm
cl1::> vserver create -vserver source_svm -rootvolume rv -aggregate n1_aggr1 \
-rootvolume-security-style unix

# create source_volume
cl1::> vol create -vserver source_svm -volume source_volume -aggregate n1_aggr2 \
-size 2g -state online -policy default -junction-path /source_volume

# create lun
cl1::> lun create -vserver sourc_svm -path /vol/source_volume/lun -size 1g \
-ostype windows

# create iscsi service in the svm
cl1::> iscsi create -vserver source_svm -target-alias source_svm

# create a lif in the source_svm
cl1::> net int create -vserver source_svm -lif lif1 -role data -data-protocol iscsi \
-home-node cl1-01 -home-port e0d -address 192.168.0.222 -netmask 255.255.255.0 \
-status-admin up

# Login from windows to source_svm using iscsi-initiator.

# get the windows iqn number
cl1::> iscsi initiator show
(output will be something like)
iqn.1991-05.com.microsoft:win-dhn5u460s93

# create an igroup in source_svm
cl1::> igroup create -vserver source_svm -igroup win -protocol mixed -ostype windows \
-initiator iqn.1991-05.com.microsoft:win-dhn5u460s93

cl1::> lun map -vserver source_svm -path /vol/source_volume/lun -igroup win

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

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

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

# peer the vservers
cl2::> vserver peer create -vserver dest_svm -peer-vserver source_svm -applications snapmirror \
-peer-cluster cl1

# accept the peering relationship
cl1::> vserver peer accept -vserver source_svm -peer-vserver dest_svm
# setup snapmirror
cl2::> snapmirror create -source-path source_svm:source_volume -destination-path dest_svm:dest_volume \
-type DP

# initialize snapmirror
cl2::> snapmirror initialize -destination-path dest_svm:dest_volume

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

# 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 192.168.0.223 -netmask 255.255.255.0

# create the iscsi service in the svm
cl2::> vserver iscsi create -vserver dest_svm
# create an igroup in dest_svm
cl2::> igroup create -vserver dest_svm -igroup win -protocol mixed -ostype windows \
-initiator iqn.1991-05.com.microsoft:win-dhn5u460s93

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

# offline the source lun
cl1::> lun offline -vserver source_svm -path /vol/source_volume/lun

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

# Login from windows to source_svm using iscsi-initiator.
# Access the lun on cl2 (maybe offline and online)

 

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Comments are closed.