What’s the (SnapMirror) syntax, Kenneth?


I had the opportunity to configure SnapMirror for a client today and it gave me a bit of a headache.  I did what I thought was my due diligence: reading the relevant vendor documentation for SnapMirorr for each version of Data ONTAP, 7.3.2 and 8.0.3P3.  What I failed to do was read a few lines further than I actually did – I missed a simple piece of syntax that turned a 30 minute WebEx into a 2 hour ordeal. I learned a good lesson about SnapMirror during this engagement, though, and I’d like to share it.

The SnapMirror of these three volumes were actually for a data migration because the source filer is being decommissioned.  The general steps required in the engagement today were as follows:

    <> Run a cable between what will be the dedicated replication links on each filer

    <> Configure each interface with IP settings

    <> Ensure SnapMirror is licensed and enabled on each filer

    <> Configure /etc/hosts and /etc/snapmirror.allow files on source filer

    <> Configure /etc/hosts and /etc/snapmirror.conf files on destination filer

    <> Initialize the baseline replicaction

The destination volumes had already been created, though I needed to restrict them as well as grow one by a couple hundred GB when the initialization failed.

I created a text file with these steps enumerated with an understanding I would fill in the missing specifics once I had access to the client systems.  Here’s what I had:

#==============================
#Check network connectivity first using the dedicated
#replication link
#==============================
netapp2-e4a - 192.168.10.100
netapp5-e0M - 192.168.10.102

After the interface configuration,

I was told there were, indeed, open interfaces on each filer for a dedicated replication link.  When I found out what had been cabled, I learned that the “open” interface on one filer was the management interface, e0M.  Well, I figured this would work (remember it’s temporary) but warned that e0M is limited to 100Mbps and essentially multiplies our calculated transfer times by 10. We have a baseline of 2TB with an unknown daily change rate, though it’s likely in the single digit GB.  So now we’re looking at over 40 hours to baseline the SnapMirror instead of 5 hours over a 1Gbps link.  This is not so bad because 1) it’s over a dedicated replication link, 2) both filers are in the same data center and 3) we have about a month before we’re scheduled to cutover the SnapMirrored volumes. This leaves time for the baseline and even replicating the daily change just before we cut over.

 #==============================
#To be configured on BOTH source and destination
#filers, netapp2 and netapp5
#==============================
#Add the names and IP addresses of each filer's replication link
#to their respective /etc/hosts files
rdfile /etc/hosts
...
...
#copy the current /etc/hosts and append the replication link info
wrfile /etc/hosts
...
...
<netapp2_replication_ip_address> <netapp2-replication-name>
<netapp5_replication_ip_address> <netapp5-replication-name>

#Is SnapMirror licensed?
license
#If not, then
#license add XXXXXXX

#Is SnapMirror enabled?
options snapmirror #looking for snapmirror.enable on
#If not, then
#options snapmirror.enable on

So far so good. No problems seen.

#==============================
#To be applied on source system, netapp2
#==============================
options snapmirror.access legacy
#this option allows literal IP addresses to be used in snapmirror.allow file
options snapmirror.checkip.enable on
rdfile /etc/snapmirror.allow

#Be sure to make a copy of the current snapmirror.allow file
wrfile /etc/snapmirror.allow
<netapp5_replication_ip_address>

Awesome. Still doing good.

 
#==============================
#To be applied on the destination system, netapp5
#==============================
#Ensure the same vol types are created on the destination
#system, i.e. FlexVols or TradVols
#The volumes must be as large or larger than the source vols
#Restrict the volumes
vol restrict volume2
vol restrict volume3
vol restrict volume4

No problems so far.

 
rdfile /etc/snapmirror.conf
#Be sure to make a copy of the current snapmirror.conf file
wrfile /etc/snapmirror.conf
netapp2-e4a:/vol/volume2 netapp5-e0M:/vol/volume2 - 0 23 * * 
netapp2-e4a:/vol/volume3 netapp5-e0M:/vol/volume3 - 0 23 * * 
netapp2-e4a:/vol/volume4 netapp5-e0M:/vol/volume4 - 0 23 * * 

Ah, yes. There’s a problem. I received this error a few seconds after writing to the snapmirror.conf file

netapp5*> /etc/snapmirror.conf: line 1 Invalid destination: /vol/volume2: The argument must be a volume name or a qtree path. Please specify either "volname" or "/vol/volname/qtreename"., ignoring line
/etc/snapmirror.conf: line 2 Invalid destination: /vol/volume3 : The argument must be a volume name or a qtree path. Please specify either "volname" or "/vol/volname/qtreename"., ignoring line
/etc/snapmirror.conf: line 3 Invalid destination: /vol/volume4 : The argument must be a volume name or a qtree path. Please specify either "volname" or "/vol/volname/qtreename"., ignoring line

So the short of it is that when using VSM, you simply use the volume names, not the path to the volumes.  Use pathnames when using QSM.  Innocent enough, right? So the following is correct.

wrfile /etc/snapmirror.conf
netapp2-e4a:volume2 netapp5-e0M:volume2 - 0 23 * * 
netapp2-e4a:volume3 netapp5-e0M:volume3 - 0 23 * * 
netapp2-e4a:volume4 netapp5-e0M:volume4 - 0 23 * *
</blockquote> 

<p>But then I get this error:</p> 


netapp5*> /etc/snapmirror.conf: line 1 destination filer "netapp5-e0M" does not match hostname "netapp5", ignoring line
/etc/snapmirror.conf: line 2 destination filer "netapp5-e0M" does not match hostname "netapp5", ignoring line
/etc/snapmirror.conf: line 3 destination filer "netapp5-e0M" does not match hostname "netapp5", ignoring line

Turns out this is the bit where I didn’t quite read far enough.  There’s a difference in the format of the source and destination systems in the snapmirror.conf file.  From the Data ONTAP 7.3 Data Protection Online Backup and Recovery Guide (also the same in newer versions of ONTAP!)

Did you catch that?  Yeah, if you’re using specific replication links, you only specify the source replication link name and the destination hostname. I had specified netapp2-e4a as well as netapp5-e0M.  This is not correct.  The correct format of the snapmirror.conf file is

wrfile /etc/snapmirror.conf
netapp2-e4a:volume2 netapp5:volume2 - 0 23 * * 
netapp2-e4a:volume3 netapp5:volume3 - 0 23 * * 
netapp2-e4a:volume4 netapp5:volume4 - 0 23 * * 

Finally, once these things were squared away, I received this gem when I tried to initialize one particularly large volume.

<p>netapp5*> snapmirror initialize -S netapp2-e4a:volume3 netapp5:volume3 Tue Feb 19 16:10:27 CST [netapp5: replication.dst.err:error]: SnapMirror: destination transfer from netapp2-e4a:volume3 to volume3: destination volume too small; it must be equal to or larger than the source volume.
Transfer aborted: destination volume too small; it must be equal to or larger than the source volume.

Too easy.  The fella who created the destination volumes mentioned he tried to size them based on how much data was actually used but he made them a bit too small.  I resized the volume a bit and I was golden.

So this wasn’t too bad, but I did have to take time to re-read the vendor docs during the setup  and while the client was waiting.  We were recording the WebEx session, too, so it ended up being close to two hours long.  I know I wouldn’t want to sit there and watch two hours worth of configs.  I guess I’ll know better for next time.

Cheers,

 

Mike

Google


One Comment on “What’s the (SnapMirror) syntax, Kenneth?”

  1. vps says:

    I really like this site. You write about very interesting things. Thanks for all your tips and information


Leave a comment

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |