Monday, 5 May 2014

7 to C Migration Methods for SnapMirrored 7-Mode Volumes: Part 7/7


Part 7) Method 4: Using 7-Mode CLI and Clustershell to Migrate Our 7 to 7 SnapMirror Relationship

We revert the lab to the state at the end of Part 3.

Here we don’t use the 7MTT and instead use CLI commands in the 7-Mode CLI, and C-Mode Clustershell.

Note: If you’re considering this, I’d highly recommend running the 7MTT for the pre-checks at least.

In this lab, the SnapMirrors from NAFAS1 to NAFAS2 run every 15 minutes as below:

NAFAS2> rdfile /etc/snapmirror.conf
NAFAS1:vol1 NAFAS2:vol1 - 0,15,30,45 * * *
NAFAS1:vol2 NAFAS2:vol2 - 0,15,30,45 * * *
NAFAS1:vol3 NAFAS2:vol3 - 0,15,30,45 * * *

7.1) 7 to C SnapMirror Setup

NACLU1: Create DP Volumes

vol create -vserver NASVM1 -volume vol1 -aggregate aggr1 -size 2g -type DP
vol create -vserver NASVM1 -volume vol2 -aggregate aggr1 -size 2g -type DP
vol create -vserver NASVM1 -volume vol3 -aggregate aggr1 -size 2g -type DP

NACLU2: Create DP Volumes

vol create -vserver NASVM2 -volume vol1 -aggregate aggr1 -size 2g -type DP
vol create -vserver NASVM2 -volume vol2 -aggregate aggr1 -size 2g -type DP
vol create -vserver NASVM2 -volume vol3 -aggregate aggr1 -size 2g -type DP

NACLU1:  SnapMirror Setup from NAFAS1

vserver peer transition create -local-vserver NASVM1 -src-filer-name NAFAS1
job schedule cron create -name at7past -minute 7
snapmirror create -source-path NAFAS1:vol1 -destination-path NASVM1:vol1 -type TDP -schedule at7past -policy DPDefault
snapmirror create -source-path NAFAS1:vol2 -destination-path NASVM1:vol2 -type TDP -schedule at7past -policy DPDefault
snapmirror create -source-path NAFAS1:vol3 -destination-path NASVM1:vol3 -type TDP -schedule at7past -policy DPDefault
snapmirror initialize NASVM1:vol1
snapmirror initialize NASVM1:vol2
snapmirror initialize NASVM1:vol3

NACLU2: SnapMirror Setup NAFAS2

vserver peer transition create -local-vserver NASVM2 -src-filer-name NAFAS2
job schedule cron create -name at7past -minute 7
snapmirror create -source-path NAFAS2:vol1 -destination-path NASVM2:vol1 -type TDP -schedule at7past -policy DPDefault
snapmirror create -source-path NAFAS2:vol2 -destination-path NASVM2:vol2 -type TDP -schedule at7past -policy DPDefault
snapmirror create -source-path NAFAS2:vol3 -destination-path NASVM2:vol3 -type TDP -schedule at7past -policy DPDefault
snapmirror initialize NASVM2:vol1
snapmirror initialize NASVM2:vol2
snapmirror initialize NASVM2:vol3

NACLU1:  Pre-Creating the Shares

vol mount vol1 -junction-path /vol1
vol mount vol2 -junction-path /vol2
vol mount vol3 -junction-path /vol3
cifs share create share1 /vol1
cifs share create share2 /vol2
cifs share create share3 /vol3

NACLU2:  Pre-Creating the Shares

vol mount vol1 -junction-path /vol1
vol mount vol2 -junction-path /vol2
vol mount vol3 -junction-path /vol3
cifs share create share1 /vol1
cifs share create share2 /vol2
cifs share create share3 /vol3

7.2) Pre-configure Cluster and Vserver Peering

NACLU1: Cluster Peer Create

cluster peer create -peer-addrs 10.10.10.221 -username admin

NACLU1: Vserver Peer Initialize

vserver peer create -vserver NASVM1 -peer-cluster NACLU2 -peer-vserver NASVM2 -applications snapmirror

NACLU2: Accept the Vserver Peer

vserver peer accept -vserver NASVM2 -peer-vserver NASVM1

7.3) Cutover

NACLU2: SnapMirror Cutover

snapmirror update NASVM2:vol1
snapmirror update NASVM2:vol2
snapmirror update NASVM2:vol3

snapmirror break NASVM2:vol1
snapmirror break NASVM2:vol2
snapmirror break NASVM2:vol3

snapmirror delete NASVM2:vol1
snapmirror delete NASVM2:vol2
snapmirror delete NASVM2:vol3

NAFAS2: SnapMirror Tidy Up

snapmirror release vol1 NASVM2:vol1
snapmirror release vol2 NASVM2:vol2
snapmirror release vol3 NASVM2:vol3

MSADM1: Disconnect from Shares

net use U: /delete
net use U: /delete
net use U: /delete

NAFAS1: Terminate Client Access to Shares

priv set advanced
cifs terminate -v vol1
cifs terminate -v vol2
cifs terminate -v vol3

NACLU1: SnapMirror Cutover

snapmirror update NASVM1:vol1
snapmirror update NASVM1:vol2
snapmirror update NASVM1:vol3

snapmirror break NASVM1:vol1
snapmirror break NASVM1:vol2
snapmirror break NASVM1:vol3

snapmirror delete NASVM1:vol1
snapmirror delete NASVM1:vol2
snapmirror delete NASVM1:vol3

NAFAS1: SnapMirror Tidy Up

snapmirror release vol1 NASVM1:vol1
snapmirror release vol2 NASVM1:vol2
snapmirror release vol3 NASVM1:vol3

MSDMC1: Update CNAME

Update the CNAME FS1 (which pointed to NANAS1.lab.priv) to point to NASVM1.lab.priv.

MSADM1: Reconnect to Shares

ipconfig /flushdns
net use U: \\FS1\share1 /persistent:yes
net use V: \\FS1\share2 /persistent:yes
net use W: \\FS1\share3 /persistent:yes

And verify data availability.

7.4) Creating the C to C SnapMirror Relationship

Note: It is essential for the resync that there is an in-common snapshot on both sides of the C to C relationship. At step 7.3, you may want to trigger an update to NASVM1, then NAFAS2 and NASVM2 to ensure there is an up to date in-common snapshot  (7MTT actually sets up a relationship from the secondary cluster to the primary 7-Mode system and runs an update prior to the cutover.) The TDP SnapMirror snapshots don’t get deleted on the 7-Mode systems (something to keep an eye on), so there’ll usually be a fair few in-common snapshots for the resync.

NACLU2: SnapMirror Setup

snapmirror create -source-path NASVM1:vol1 -destination-path NASVM2:vol1 -type DP -schedule hourly -policy DPDefault
snapmirror create -source-path NASVM1:vol2 -destination-path NASVM2:vol2 -type DP -schedule hourly -policy DPDefault
snapmirror create -source-path NASVM1:vol3 -destination-path NASVM2:vol3 -type DP -schedule hourly -policy DPDefault

snapmirror initialize NASVM2:vol1
snapmirror initialize NASVM2:vol2
snapmirror initialize NASVM2:vol3

snapmirror resync -destination-path NASVM2:vol1
snapmirror resync -destination-path NASVM2:vol2
snapmirror resync -destination-path NASVM2:vol3

JOB DONE!

No comments:

Post a Comment