ONTAP Tip – Convert Existing Volume Mirrors to SVM-DR

The ability to convert existing volume SnapMirror relationships to SVM-DR allows you to preserve all source settings without having to rebaseline existing mirrors. The steps below were completed in the VSIM with a complete setup of new SVMs and volume mirrors to demonstrate the end-to-end method. The source cluster is named “code-prod” and the destination cluster is named “cmode-single”. Cluster peering is already completed, so SVM (vserver) peering is setup in the example.

1.1      Convert Existing Volume Mirrors to SVM-DR (Information)

Procedure from NetApp docs

  1. Rename destination volumes to match source volume names if they do not match
    1. For example if vol1 is vol1_dr, “volume rename” vol1_dr to vol1
    1. The vsroot volume must also be the same name, even if the destination SVM is a different name.  
    1. A different SVM name is supported
  2. Snapmirror resync the volume relationships
  3. Create a new snapmirror relationship SVM: to SVM: (identity-preserve true is required)
  4. Stop the destination SVM:
  5. Snapmirror resync the SVM:

1.2      Create a Source SVM with 2x Volumes

cmode-prod (copy paste to setup nfs and cifs with some local unix users)

vserver create -vserver source_test -subtype default -rootvolume source_test_root -rootvolume-security-style unix -language C.UTF-8 -snapshot-policy default -data-services data-iscsi,data-nfs,data-cifs,data-flexcache -foreground true -aggregate cmode_prod_01_aggr2_FP

route create -vserver source_test -destination -gateway

network interface create -vserver source_test -lif lif1 -role data -home-node cmode-prod-01 -home-port e0c -address -netmask

dns create -vserver source_test -domains lab2.local -name-servers -skip-config-validation true

volume create -vserver source_test -volume apps -aggregate cmode_prod_01_aggr3_SSD -size 1GB -percent-snapshot-space 10 -snapshot-policy default -space-guarantee none -policy default -junction-path /apps

volume create -vserver source_test -volume home -aggregate cmode_prod_02_aggr3_SSD -size 1GB -percent-snapshot-space 10 -snapshot-policy default -space-guarantee none -policy default -junction-path /home

nfs create -vserver source_test -v3 enabled -udp disabled -showmount enabled -access true

vserver services unix-group create -name scottgelb -id 501 -vserver source_test

vserver services unix-user create -user scottgelb -id 501 -vserver source_test -primary-gid 501

vserver export-policy rule create -vserver source_test -policyname default -ruleindex 1 -protocol nfs -clientmatch -rorule any -rwrule never -superuser none

export-policy create -vserver source_test -policyname data

export-policy rule create -vserver source_test -policyname data -clientmatch -rorule sys -rwrule sys -superuser sys -allow-suid true

export-policy rule create -vserver source_test -policyname data -clientmatch -rorule sys -rwrule none

volume modify -vserver source_test -volume apps -policy data

volume modify -vserver source_test -volume home -policy data 

vserver cifs create -vserver source_test -cifs-server source_test -workgroup workgroup

vserver cifs users-and-groups local-user create -vserver source_test -user-name scott

            # enter “p@ssw0rd” twice

1.3      Create a Destination SVM and volume for Volume SnapMirror


vserver create -vserver dest_test -subtype default -rootvolume dest_test_root -rootvolume-security-style unix -language C.UTF-8 -snapshot-policy default -data-services data-iscsi,data-nfs,data-cifs,data-flexcache -foreground true -aggregate cmode_single_01_aggr2_mir

volume create -vserver dest_test -volume apps_dr -aggregate cmode_single_01_aggr2_mir -size 1GB -percent-snapshot-space 10 -space-guarantee none -policy default -type DP

1.4      Peer the SVMs


vserver peer create -vserver source_test -peer-vserver dest_test -applications snapmirror -peer-cluster cmode-single

vserver peer show


vserver peer show

vserver peer accept -vserver dest_test -peer-vserver source_test

vserver peer show


vserver peer show

1.5      Create and Initialize the Volume SnapMirror


snapmirror create -source-path source_test:apps -destination-path dest_test:apps_dr -vserver dest_test -schedule hourly -policy MirrorAllSnapshots

snapmirror initialize -destination-path dest_test:apps_dr

snapmirror show         # wait until “Snapmirrored Idle”

1.6      Rename the Destination Volumes to Match the Source

  • All source volumes MUST be the SAME name on the destination 
  • The SVM name can be different, but not the SVM vsroot volume


volume rename -vserver dest_test -volume apps_dr -newname apps

volume rename -vserver dest_test -volume dest_test_root -newname source_test_root

1.7      Resync the Volume Mirrors


snapmirror resync -destination-path dest_test:apps

snapmirror show         # wait until “Snapmirrored Idle”

1.8      SnapMirror Volume any Missing Volumes Source to Destination

  • You MUST mirror all volumes prior to the SVM-DR resync


volume create -vserver dest_test -volume home -aggregate cmode_single_01_aggr2_mir -size 1GB -percent-snapshot-space 10 -space-guarantee none -policy default -type DP

snapmirror create -source-path source_test:home -destination-path dest_test:home -vserver dest_test -policy MirrorAllSnapshots          # no schedule needed since we will pick it up SVM-DR next

snapmirror initialize -destination-path dest_test:home

snapmirror show         # wait until “Snapmirrored Idle”

1.9      Create the SVM-DR Relationship

  • The policy used MUST match the policy of the volumes, so all volumes must be using the same policy


snapmirror create -source-path source_test: -destination-path dest_test: -throttle unlimited -policy MirrorAllSnapshots -schedule hourly -identity-preserve true

snapmirror show         # SVM-DR shows “Broken-off”

1.10   Stop the Destination SVM


vserver stop -vserver dest_test

1.11   SnapMirror Resync the SVM-DR

  • The volume mirrors will be picked up by the SVM mirror and the volume mirrors will no longer be seen after, but will be part of the SVM mirror relationship
  • The volumes do not re-initialize, they are picked up in the resync


snapmirror resync -source-path source_test: -destination-path dest_test:

This Vserver has volumes which are the destination of FlexVol SnapMirror relationships. A resync on the Vserver SnapMirror relationship will cause disruptions in data access. It

will also convert the relationship-group-type of the FlexVol SnapMirror relationships to “Vserver”. Do you want to continue? {y|n}: y

snapmirror show         # shows transferring.  Wait until completion THIS WILL TAKE SOME TIME

snapmirror show-history

snapmirror show -fields unhealthy-reason

snapmirror show -fields last-transfer-error

vserver show                                        # note the dest_test SVM is now a “dp-destination” subtype

volume show

volume show -vserver dest_test           # note the MDV_CRS volumes for the cluster replication service 


snapmirror list-destinations

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s