ONTAP Discussions

Specify specific interface for snapmirror replication

allblacknz
19,426 Views

Hi there,

I was wondering how I go about specifying what interface snapmirror has to use?

The replication link (1Gb dedicated) should go over interface destination_filer-rep and source_filer-rep

The hostname is in the destination_filer and source_filer format

On my source I specify in /etc/snapmirror.allow:

destination_filer-rep

On my destination I specify in /etc/snapmirror.allow:

source_filer-rep

On my destination under snapmirror.conf I have

source_filer-rep:vol1 destination_filer-rep:vol1 ,restart=always 15 * * 1,2,3,4,5

When I do an initialize with snapmirror initialize -S source_filer-rep:vol1 destination_filer-rep:vol1 I get an error

saying

Illegal destination filer specification: destination_filer-rep.
Destination filer, if specified, must match the local host: destination_filer

I can get snapmirror to go over the hostname interfaces but obviously we want to make use of dedicated link.
We don't have a need for multipath at this stage

15 REPLIES 15

adamfox
19,377 Views

Hello again!

You need to set up a named path in /etc/snapmirror.conf and then use that named path as the source.  The man page for snapmirror.conf (find it in section 5.  FilerView has a nice way to view man pages) explains this pretty well.  You can set up a 'multi' type even if you have 1 IP pair.

Feel free to post follow-ups here.  I'll be glad to help.

allblacknz
19,377 Views

Hi Adam,

Not sure if I am looking at the right section but I think this is relevant

       The  following  snapmirror.conf  entry indi-
       cates that filer myfiler1's volume home_mir-
       ror   will   mirror   volume  home  via  the
       myfiler0-gig interface.   (The  myfiler0-gig
       interface  is  whatever  IP address myfiler1
       can resolve that name to.  In this case,  it
       might  be  a  gigabit ethernet link on filer
       myfiler0.)  The mirror is  updated  at  9:30
       a.m.,  1:30  p.m.,  and  7:30  p.m.,  Monday
       through Friday.  The asterisk means that the
       data replication schedule is not affected by
       the day of month; it is the same as entering
       numbers  1  through  31 (comma-separated) in
       that space.  The dash in the arguments field
       indicates  that  both  the  kbs  and restart
       arguments are set to default.

       myfiler0-gig:home myfiler1:home_mirror - 30 9,13,19 * 1,2,3,4,5

I tried this but I get the following errors:

On destination: SnapMirror: destination transfer from source-rep:vol1 to sm_vol1 : could not read from socket.
Transfer aborted: could not read from socket.

I noticed that the destination filer does not appear in error, just its volume

On source:  snapmirror.src.sockErr:error]: Cannot accept SnapMirror destination requests: Access denied for SnapMirror/SnapVault destination.

Excuse my ignorance but how would I use filerview to view manpages? I could not see so used CLI

Cheers

adamfox
19,377 Views

Here are some relevant sections:

The other type of line allowed in this file is a connec_tion definition line. These lines define an alternate name for the source filer that can be used as the source host in the relationship lines. They are used to describe more specifically the parameters for the connection(s) to the source filer. SnapMirror supports the multi path specification for both asynchronous and synchronous mirrors.

Each connection definition is a single line giving a name to one or two pairs of IP addresses along with a mode of operation for the connection. The lines are specified in the following format:

name = mode( source_ip_addr1 , dest_ip_addr1 ) ( source_ip_addr2 , dest_ip_addr2 )

name This is the name of the connection you would like to define. This name is to be used as the source filer in relationship definitions.

mode The mode is optional and specifies the mode in which two IP address pairs will be used. Two modes are allowed multiplexing and failover mode and are specified by using the multi and failover keywords. If not specified, multiplexing mode is used.

The multiplexing mode causes snapmirror to use both paths at the same time. If one should fail, it will switch to use the remaining path only and use both again should the failing path be repaired.

Failover mode causes snapmirror to use the first path as the desired path and only use the second path should problems arise with the first path.

So you can create a multi type connection:

mypath = multi(src,dest)

mypath:<srdvol> dest:<dest_vol> ...... < insert schedule here.

Right after you login, you'll see a list of links. The first enters FilerView, but down below should be a link for man pages.  That's a pretty good man page viewer in my opinion.  It's probably what I use FilerView for the most.

allblacknz
19,377 Views

Hi Adam,

Still no luck.

My snapmirror.conf looks like this

mypath = multi(source-rep,destination-rep)

mypath:vol1 destination:vol1 ,restart=always 15 * * 1,2,3,4,5

I still get the same errors.

I can ping all the interfaces involved from both filers. However, they are returned with their interface name.
Could my order in the hosts file have anything to do with problems?


10.92.96.12          source-e2d source-rep


192.168.1.32        source-vif1_ag-200 source

Cheers

adamfox
19,378 Views

Order of the host file shouldn't matter.  This is looking more like a snapmirror access issue on the source.  You may want to open a case to get someone to work on it directly with you, but it's looking like either the service is not turned on, or more likely the access is not set up correctly.

BHARNER80
19,377 Views

If the destination is not instantiating the snapmirror from the right interface you can try to add a route on the destination to the source filer by pointing to the gateway of the interface you want it to go out of.  Also check the option snapmirror.access.  In order to use snapmirror.allow you have to set it to legacy.

allblacknz
19,378 Views

Hi guys,

One of my filer's did not have legacy so that could explain it. I will need to test it again.

I did try it with two different filer's and that seemed to work over the dedicated link. A few more questions though

In my snapmirror.conf I have

mypath = multi(source-rep,dest-rep)

mypath:vol1 dest:sm_vol1 ,restart=always 15 * * 1,2,3,4,5

Earlier on I ran a manual update

snapmirror update -S mypath:vol1 dest:sm_vol1

I get the message it cannot connect to the source. When I replace mypath with source-rep it works.

Is that the behaviour you would expect?

The schedule does not seem to work anymore either after I changed to the replication link.

Is this because I specified source when I originally initialized it?

When I looked at the lag time it was nearly two hours.

It is my understandig lag is the time passed since last execution?

Here is some output of my log.

dst Tue Mar 23 14:31:42 NZD source:vol dest:sm_vol1 Request (Initialize)
dst Tue Mar 23 14:31:46 NZD source:vol dest:sm_vol1 Start
dst Tue Mar 23 15:44:44 NZD source:vol dest:sm_vol1 End (216835208 KB)
dst Wed Mar 24 10:15:00 NZD source:vol dest:sm_vol1 Request (Scheduled)
dst Wed Mar 24 10:15:02 NZD source:vol dest:sm_vol1 Start
dst Wed Mar 24 10:15:31 NZD source:vol dest:sm_vol1 End (715040 KB)
dst Wed Mar 24 11:15:00 NZD source:vol dest:sm_vol1 Request (Scheduled)
dst Wed Mar 24 11:15:05 NZD source:vol dest:sm_vol1 Start
dst Wed Mar 24 11:15:32 NZD source:vol dest:sm_vol1 End (733704 KB)
sys Wed Mar 24 12:04:11 NZD SnapMirror_off (registry)
sys Thu Mar 25 09:50:29 NZD SnapMirror_on (registry)
dst Thu Mar 25 10:02:46 NZD mypath:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 10:02:46 NZD mypath:vol dest:sm_vol1 Abort (cannot connect to source filer)
dst Thu Mar 25 10:05:32 NZD mypath:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 10:05:32 NZD mypath:vol dest:sm_vol1 Abort (cannot connect to source filer)
dst Thu Mar 25 10:21:17 NZD mypath:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 10:21:17 NZD mypath:vol dest:sm_vol1 Abort (cannot connect to source filer)
dst Thu Mar 25 10:23:54 NZD source-rep:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 10:23:56 NZD source-rep:vol dest:sm_vol1 Start
dst Thu Mar 25 10:35:40 NZD source-rep:vol dest:sm_vol1 End (6309552 KB)
dst Thu Mar 25 12:17:53 NZD mypath:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 12:17:53 NZD mypath:vol dest:sm_vol1(cannot connect to source filer)
dst Thu Mar 25 12:18:56 NZD source-rep:vol dest:sm_vol1 Request (Update)
dst Thu Mar 25 12:18:59 NZD source-rep:vol dest:sm_vol1 Start
dst Thu Mar 25 12:20:42 NZD source-rep:vol dest:sm_vol1End (1105456 KB)
d

adamfox
19,378 Views

Yeah, here's the trick on that.  The command line doesn't accept the named connections.  However, since you have a snapmirror entry already in snapmirror.conf, just drop the -S flag and only specify the destination volume and it should read the file and do the right thing.

So it would look more like this:

snapmirror update sm_vol1

Hope this helps.

allblacknz
19,378 Views

Thanks Adam,

I get this when specifying snapmirror update sm_vol1


Source not set on command line or in /etc/snapmirror.conf file.


dest> rdfile /etc/snapmirror.conf
mypath = multi(source-rep,dest-rep)
mypath:vol1 dest-rep:sm_vol1 ,restart=always 15 * * 1,2,3,4,5

Sebastian_Goetze
9,754 Views

Keep in mind, not to put hostnames into the connection definition line. Just IP-addresses or interface names.

From cmdref2:

E.g. (Note that fridge-gig is just a network interface name. In this case, it could be a gigabit ethernet link on fridge.)
  fridge-gig:db icebox:db - 0-55/5 * * *


This can be extended to use the multiple path options and synchronous mirroring.
  fridge-con = failover(fridge-gig,icebox-gig)(fridge-slow,icebox-slow)
  fridge-con:db icebox:db - sync

I have a feeling source-rep and dest-rep are hostnames.

Perfectly fine in a 'relationship line', but not in a 'connection line'.

HTH

Sebastian

iestyn
9,754 Views

Just be mindful of the formatting, i noticed the the connection name and the "=" and then the connection entry needed spaces eg:

myconnection = (1.1.1.1,2.2.2.2)

Hope that helps.

Cheers

baijulal
9,753 Views

If this helps

In the options snapmirror.access

You can include like

snapmirror.access "host=filer-a,filer-b AND if=e0a"

or if !=e0a

I have not tested it myself, but hopefully it works for you.

shaunjurr
9,753 Views

Hi,

Basically, you really don't need any of the fancy configuration options everyone is so eager to get you to use here.  I use all sorts of dedicated nets, etc, and never needed any of this. 

The first error you received was simply because you didn't use the destination hostname that the filer uses.  Basically, you just need to use the normal hostname on the destination and the "rep" hostname on the source.  If your routing is correct (i.e. they are on the same subnet or other "net" routes are setup correctly) it will use the correct interface to contact the source filer. This is just how routing works. This should work with the nets you want:

source_filer-rep:vol1 destination_filer:vol1 - 15 * * 1,2,3,4,5

No other complicated magic is needed.  Just set the correct source filer hostname and make sure that the routing causes the destination filer to use your "*_rep" interface to setup the connection.  No complicated configuration necessary.  Sorry you had to witness so much guessing.

josm
9,753 Views

You can try specifying by IP address in the snapmirror.conf file:

*> rdfile /etc/snapmirror.conf

10.61.76.141:testsmsrc 10.61.76.146:testsmdst - - - - -

Of course you will need to make sure that if your snapmirror.access is set to legacy that you have that in the snapmirror.allow file.

You can also try adding an entry in the /etc/hosts directory.

*> rdfile /etc/hosts

#Auto-generated by setup Wed Mar 28 10:38:10 EST 2012

......

10.61.76.141 testsmdst

Just some thoughts

aborzenkov
9,753 Views

SnapMirror.conf must contain filer names, it is not possible to use IP here. To specify IP you need to use multipath syntax.

Public