How to Make NetApp SnapMirror Use a Specific Interface
If you have two Netapp filers and want to use Snapmirror to replicate volumes or qtrees between the two, but want to force the replication traffic to traverse a specific network, there is a quick and easy way to do it.
You’ll need a few things to get started:
– SSH access to both filers
– Network configuration on and connectivity to both filers for the network you want to use for replication traffic
– System Manager 2.0 or later
- SSH to both filers and issue the command:
options snapmirror.access legacy
- Browse to the hidden etc share on the filer that will be the Snapmirror destination by browsing to
- Open snapmirror.conf in a text editor and on the first line after any comments (any line starting with a hash ‘#’) type:
connection_definition = multi(srcip,destip)
I’ll start at the end of this string and work back to the beginning. src and destip are the source and destination IPs of the filers that will form a Snapmirror relationship. Let’s call this a connection pair. Be sure to put the IPs that correspond to the network interfaces you want Snapmirror to use for replication.
multi is short for multiplexing. Snapmirror supports multiplexing replication jobs across multiple interfaces to enhance throughput. For now, just specify one connection pair. You can always go back and add more later.
connection_definition is a name of your choosing that will be used as a reference to tell Snapmirror which network(s) to use for each replication job.
For example, if your source filer is named srcfiler with an IP of 172.16.1.50/24 and your destination filer is named destfiler with an IP of 172.16.2.50/24, you would add:
filers-rep = multi(172.16.1.50,172.16.2.50)
When finished, save the file.
In System Manager, launch the Snapmirror relationship wizard (Filer Name -> Snapmirror -> Create)
Walk through the wizard as if you normally would to create a Snapmirror relationship, but do not click “Initialize SnapMirror relationship”
Edit snapmirror.conf on the destination filer and change the name of the source filer to the connection definition you specified in step 3.
For example, if the snapmirror.conf file shows:
srcfiler:volumeToReplicate destfiler:volumeToReplicate_SnapMirror - * * * *
You would change it to:
filers-rep:volumeToReplicate destfiler:volumeToReplicate_SnapMirror - * * * *
Save the file.
- SSH to the source and destination filers and issue the following two commands:
snapmirror off snapmirror on
This will force a re-read of the snapmirror.conf
Close out of System Manager completely, reopen it, and connect to the destination filer.
Select the Snapmirror relationship you just created and click SnapMirror -> Operations -> Initialize
Alternatively, you can SSH to the destination filer and issue the command:
snapmirror initialize -S filers-rep:volumeToReplicate destfiler:volumeToReplicate_SnapMirror
I have noticed that System Manager did not immediately understand the changes I had made to Snapmirror.conf. If you get an error in System Manager, close it out, wait several minutes, then try again. Once System Manager recognizes the changes, you can use it to schedule replication jobs.