Cross-region data replication using rsync

Published Jun 30 2021 02:43 PM 2,263 Views
Microsoft

Introduction

In this blog post, we will present a customer's challenge in configuring data replication between Azure regions for disaster recovery, and how we solved the scenario.  In this example we are using rsync to replicate data on ANF to a different region, but other configurations are possible.

 

Customer Challenge

The customer wanted to use Azure NetApp Files (ANF) for their SAP app-tier shared storage (i.e. /sapmnt, /usr/sap/SID/SYS, etc.) but not for HANA database data. They have their primary instances in US East, and their disaster recovery environment in US West 2. Normally we would use ANF cross-region-replication (CRR) to replicate between these regions; unfortunately ANF CRR doesn’t support replication between two different subscriptions at this time – this customer is using a different subscription in each region.

 

Potential Solutions

There are several potential solutions for this, including NetApp CloudSync and Linux rsync; the solution we decided on is to use rsync since it is included with Linux, and we were on a very short timeframe for this project. rsync is a very versatile file copying tool that can copy between directories or volumes on a single host, between two hosts over ssh, or to a remote rsync daemon. It uses a "delta-transfer" algorithm that sends only the differences between the source files and the files in the destination.

 

One downside of the configuration described below is that we need a VM in each region to run and receive the rsync replication data, since ANF does not support mounting volumes located in one region from VMs in another region. The two machines need to be able to communicate over the network – in this case the two regional vnets were connected via Azure global vnet peering. If the volumes were in the same region, we would be able to mount the volumes to a single VM and use rsync for the data transfer.

 

We considered using one of the existing machines in the architecture (eg. the ERS machine) to do the replication, but that would increase complexity on those machines. We decided to use a dedicated virtual machine in each region to support this replication. Each VM mounts the ANF volume(s) in their own region, and use the rsync command between the VMs to do the actual data replication.

 

There are two ways that rsync can actually replicate the data in this scenario:

  • Over the ssh protocol. This requires setting up ssh keys so that the replication user can ssh between the machines without a linux password.
  • By connecting to a remote rsync daemon (i.e. Linux system process). This requires setting up & managing the rsync system service daemon.

We decided on the first option, since ssh was already set up for their configuration management system (eg. chef).

 

Solution Caveats

  • rsync is a file-level copy/replication solution (as opposed to real-time block level replication) and operates periodically - it will traverse through all of the files in the replicated directories or volume and copy the different or new files to the destination volume. Due to this process, there will clearly be some time delay between the time a file is written and when the file appears on the destination volume.

  • rsync is single threaded - this will limit the overall throughput between the two different volumes/VMs. This wasn't a concern for this particular application, but it would be wise to test throughput in your own scenario. A very simple way to address this limitation would be to configure rsync to run on specific subdirectories of the volume, rather than the root directory. This would allow those rsync processes to run in parallel.

  • The first time rsync is run on the volume will take significantly longer than subsequent runs, due to the initial data transfer.

Solution Configuration

In our case, here are the mounts that we set up (for initial testing of the solution):

Region Virtual machine Mount on virtual machine
US West 2 anf-client-west2 (primary) /vol-west2
US East anf-client-east (replica) /vol-east

 

To actually copy the data, we used this command on the primary anf-client-west2 machine:

rsync -azP --delete --exclude=.snapshot --log-file=/var/log/rsync.log  /vol-west2/ root@anf-client-east:/vol-east

The options we used above are these:

option description
-a Archive mode – rsync will do a recursive copy, and preserve modification times, links, file ownership and permissions.
-z Compress data over the network
-P keep partially transferred files, and show the progress during transfer
--exclude=.snapshot Exclude the ANF .snapshot directory
--log-file=/var/log/rsync.log Create log file in /var/log/rsync.log

 

To schedule rsync via chron, we put this in the root cron configuration using the sudo crontab -e command, which lets you edit the root crontab:

* * * * * rsync -azP --delete --exclude=.snapshot --log-file=/var/log/rsync.log /vol-west2/ root@anf-client-east:/vol-east

The initial asterisks tell cron to run this every minute – this may be excessive depending on requirements.

To run every 5 minutes, this would be the configuration:

*/5 * * * * rsync -azP --delete --exclude=.snapshot --log-file=/var/log/rsync.log /vol-west2/ root@anf-client-east:/vol-east

For a more complete solution, it is recommended to run rsync from a shell script that checks whether rsync is running already, for example:

#!/bin/bash
lockfile=/var/anf-sync/lockfile
mkdir -p /var/anf-sync
if test -f "$lockfile";
then
       echo "rsync currently running, exiting"
       exit
else
       touch "$lockfile"
       rsync -azP --delete --exclude=.snapshot --log-file=/var/log/rsync.log /vol-west2/ root@anf-client-east:/vol-east
       rm "$lockfile"
fi

Of course in an actual DR event, the replication would have to be stopped, and (presumably) resumed in the other direction. This should be included in the DR runbook.

NFS Volume Consolidation

When using the ANF for NFS volumes, the customer wanted to optimize the volume size, performance and the overall cost. For this scenario, we had less than 100GB (the minimum volume size) for each SAP SID. For that reason we suggested consolidation in the manner documented here.

 

The ANF volume path is <IP Address>:/vol-west2. In that volume we will create a directory for each SID (in this example, QAS and NW1) , and under each of those there will be an ASCS, ERS, sapmnt and SYS directory. These directories have to be created via a VM, after the volume is created. Here are the sample directories that we created:

<IP>:/vol-west2/usrsapQAS/sapmntQAS
<IP>:/vol-west2/usrsapQAS/sapmntQASascs
<IP>:/vol-west2/usrsapQAS/sapmntQASsys
<IP>:/vol-west2/usrsapQAS/sapmntQASers
 
<IP>:/vol-west2/usrsapNW1/sapmntNW1
<IP>:/vol-west2/usrsapNW1/sapmntNW1ascs
<IP>:/vol-west2/usrsapNW1/sapmntNW1sys
<IP>:/vol-west2/usrsapNW1/sapmntNW1ers

These directories would be mounted either by the mount command, automounter configuration or the cluster filesystem resource configuration. There are really three differences (that I can think of) between this and having a separate volume for each mount:

  • The export policy would be for the volume as a whole, so all of the VMs for all SIDs using the volume would need access. There was some concern that this reduces security across SIDs somewhat. However, the root user is the one that can mount volumes, and root should be trusted.
  • If one of the SIDs were to fill up the volume, it could impact the others. It would be wise to put in monitoring or processes to grow the volume when needed.
  • The performance tier/quality of service will be for the consolidated volume. Since these aren’t used all that much this should give better performance overall, but it would be possible for one SID to consume all of the IOPS/throughput, causing impacts on the others.

This is an example for the QAS instance – replace with the actual ip address for your volume, in the /etc/auto.direct file:

/sapmnt/QAS -nfsvers=3,nobind <anf-vol-ip addr>:/vol-west2/usrsapQAS/sapmntQAS
/sapmnt/QAS/SYS -nfsvers=3,nobind <anf-vol-ip addr>:/vol-west2/usrsapQAS/sapmntQASsys

Single region configuration

For scenarios that are within a single region, the configurations above will work fine - however it's also possible to mount both the source and replica volumes from a single Azure VM, and use rsync on that VM to replicate the data between the two volumes.

Mounting Options

For mounting NFS volumes on Linux VMs, it is preferred to use either the Linux automounter, or to use cluster FS resources (when applicable). This is recommended because there is a timing issue in the Linux boot process where the /etc/fstab can sometimes be processed before the network stack is fully available. If the /etc/fstab is used to mount the NFS volumes on boot, it is possible for the boot to hang, or for the VM to boot and have the NFS mounts fail. This happens intermittenly, and it isn’t a customer specific situation.

For systems in a cluster, there are two advantages to having the volumes be cluster filesystem resources:

  • The fstab and network availability issue discussed above is resolved, because cluster resources would always be started after cluster communications have been established.
  • The resource agent for a cluster filesystem resource agent monitors the availability of the mounted volume.

However, for systems that are not in a cluster, the automounter will mount the desired volumes on demand, rather than at boot time.

 

Also, when preparing the mount point directories, it's important to use the chattr +i <mountpoint> command - this will make the actual mount point immutable, so that any attempted writes to the mountpoint will fail if the NFS volume is not mounted on top of it.

%3CLINGO-SUB%20id%3D%22lingo-sub-2503081%22%20slang%3D%22en-US%22%3ECross-region%20data%20replication%20using%20rsync%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2503081%22%20slang%3D%22en-US%22%3E%3CH2%20id%3D%22toc-hId--414347790%22%20id%3D%22toc-hId--414347793%22%3EIntroduction%3C%2FH2%3E%0A%3CP%3E%3CSPAN%3EIn%20this%20blog%20post%2C%20we%20will%20present%20a%20customer's%20challenge%20in%20configuring%20data%20replication%20between%20Azure%20regions%20for%20disaster%20recovery%2C%20and%20how%20we%20solved%20the%20scenario.%26nbsp%3B%20In%20this%20example%20we%20are%20using%20rsync%20to%20replicate%20data%20on%20ANF%20to%20a%20different%20region%2C%20but%20other%20configurations%20are%20possible.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc_2%22%20id%3D%22toc-hId-2073165043%22%20id%3D%22toc-hId-2073165040%22%3ECustomer%20Challenge%3C%2FH2%3E%0A%3CP%3EThe%20customer%20wanted%20to%20use%20Azure%20NetApp%20Files%20(ANF)%20for%20their%20SAP%20app-tier%20shared%20storage%20(i.e.%20%2Fsapmnt%2C%20%2Fusr%2Fsap%2FSID%2FSYS%2C%20etc.)%20but%20not%20for%20HANA%20database%20data.%20They%20have%20their%20primary%20instances%20in%20US%20East%2C%20and%20their%20disaster%20recovery%20environment%20in%20US%20West%202.%20Normally%20we%20would%20use%20ANF%20cross-region-replication%20(CRR)%20to%20replicate%20between%20these%20regions%3B%20unfortunately%20ANF%20CRR%20doesn%E2%80%99t%20support%20replication%20between%20two%20different%20subscriptions%20at%20this%20time%20%E2%80%93%20this%20customer%20is%20using%20a%20different%20subscription%20in%20each%20region.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc_3%22%20id%3D%22toc-hId-265710580%22%20id%3D%22toc-hId-265710577%22%3EPotential%20Solutions%3C%2FH2%3E%0A%3CP%3EThere%20are%20several%20potential%20solutions%20for%20this%2C%20including%20NetApp%20CloudSync%20and%20Linux%20rsync%3B%20the%20solution%20we%20decided%20on%20is%20to%20use%20rsync%20since%20it%20is%20included%20with%20Linux%2C%20and%20we%20were%20on%20a%20very%20short%20timeframe%20for%20this%20project.%20rsync%20is%20a%20very%20versatile%20file%20copying%20tool%20that%20can%20copy%20between%20directories%20or%20volumes%20on%20a%20single%20host%2C%20between%20two%20hosts%20over%20ssh%2C%20or%20to%20a%20remote%20rsync%20daemon.%20It%20uses%20a%20%22delta-transfer%22%20algorithm%20that%20sends%20only%20the%20differences%20between%20the%20source%20files%20and%20the%20files%20in%20the%20destination.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20downside%20of%20the%20configuration%20described%20below%20is%20that%20we%20need%20a%20VM%20in%20each%20region%20to%20run%20and%20receive%20the%20rsync%20replication%20data%2C%20since%20ANF%20does%20not%20support%20mounting%20volumes%20located%20in%20one%20region%20from%20VMs%20in%20another%20region.%20The%20two%20machines%20need%20to%20be%20able%20to%20communicate%20over%20the%20network%20%E2%80%93%20in%20this%20case%20the%20two%20regional%20vnets%20were%20connected%20via%20Azure%20global%20vnet%20peering.%20If%20the%20volumes%20were%20in%20the%20same%20region%2C%20we%20would%20be%20able%20to%20mount%20the%20volumes%20to%20a%20single%20VM%20and%20use%20rsync%20for%20the%20data%20transfer.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWe%20considered%20using%20one%20of%20the%20existing%20machines%20in%20the%20architecture%20(eg.%20the%20ERS%20machine)%20to%20do%20the%20replication%2C%20but%20that%20would%20increase%20complexity%20on%20those%20machines.%20We%20decided%20to%20use%20a%20dedicated%20virtual%20machine%20in%20each%20region%20to%20support%20this%20replication.%20Each%20VM%20mounts%20the%20ANF%20volume(s)%20in%20their%20own%20region%2C%20and%20use%20the%20rsync%20command%20between%20the%20VMs%20to%20do%20the%20actual%20data%20replication.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20ways%20that%20rsync%20can%20actually%20replicate%20the%20data%20in%20this%20scenario%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EOver%20the%20ssh%20protocol.%20This%20requires%20setting%20up%20ssh%20keys%20so%20that%20the%20replication%20user%20can%20ssh%20between%20the%20machines%20without%20a%20linux%20password.%3C%2FLI%3E%0A%3CLI%3EBy%20connecting%20to%20a%20remote%20rsync%20daemon%20(i.e.%20Linux%20system%20process).%20This%20requires%20setting%20up%20%26amp%3B%20managing%20the%20rsync%20system%20service%20daemon.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWe%20decided%20on%20the%20first%20option%2C%20since%20ssh%20was%20already%20set%20up%20for%20their%20configuration%20management%20system%20(eg.%20chef).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc_4%22%20id%3D%22toc-hId--1541743883%22%20id%3D%22toc-hId--1541743886%22%3ESolution%20Caveats%3C%2FH2%3E%0A%3CUL%3E%0A%3CLI%3E%3CP%3Ersync%20is%20a%20file-level%20copy%2Freplication%20solution%20(as%20opposed%20to%20real-time%20block%20level%20replication)%20and%20operates%20periodically%20-%20it%20will%20traverse%20through%20all%20of%20the%20files%20in%20the%20replicated%20directories%20or%20volume%20and%20copy%20the%20different%20or%20new%20files%20to%20the%20destination%20volume.%20Due%20to%20this%20process%2C%20there%20will%20clearly%20be%20some%20time%20delay%20between%20the%20time%20a%20file%20is%20written%20and%20when%20the%20file%20appears%20on%20the%20destination%20volume.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3Ersync%20is%20single%20threaded%20-%20this%20will%20limit%20the%20overall%20throughput%20between%20the%20two%20different%20volumes%2FVMs.%20This%20wasn't%20a%20concern%20for%20this%20particular%20application%2C%20but%20it%20would%20be%20wise%20to%20test%20throughput%20in%20your%20own%20scenario.%20A%20very%20simple%20way%20to%20address%20this%20limitation%20would%20be%20to%20configure%20rsync%20to%20run%20on%20specific%20subdirectories%20of%20the%20volume%2C%20rather%20than%20the%20root%20directory.%20This%20would%20allow%20those%20rsync%20processes%20to%20run%20in%20parallel.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CP%3EThe%20first%20time%20rsync%20is%20run%20on%20the%20volume%20will%20take%20significantly%20longer%20than%20subsequent%20runs%2C%20due%20to%20the%20initial%20data%20transfer.%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CH2%20id%3D%22toc_5%22%20id%3D%22toc-hId-945768950%22%20id%3D%22toc-hId-945768947%22%3ESolution%20Configuration%3C%2FH2%3E%0A%3CP%3EIn%20our%20case%2C%20here%20are%20the%20mounts%20that%20we%20set%20up%20(for%20initial%20testing%20of%20the%20solution)%3A%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTH%3ERegion%3C%2FTH%3E%0A%3CTH%3EVirtual%20machine%3C%2FTH%3E%0A%3CTH%3EMount%20on%20virtual%20machine%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3EUS%20West%202%3C%2FTD%3E%0A%3CTD%3Eanf-client-west2%20(primary)%3C%2FTD%3E%0A%3CTD%3E%2Fvol-west2%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3EUS%20East%3C%2FTD%3E%0A%3CTD%3Eanf-client-east%20(replica)%3C%2FTD%3E%0A%3CTD%3E%2Fvol-east%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20actually%20copy%20the%20data%2C%20we%20used%20this%20command%20on%20the%20primary%20anf-client-west2%20machine%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-bash%22%3Ersync%20-azP%20--delete%20--exclude%3D.snapshot%20--log-file%3D%2Fvar%2Flog%2Frsync.log%20%20%2Fvol-west2%2F%20root%40anf-client-east%3A%2Fvol-east%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThe%20options%20we%20used%20above%20are%20these%3A%3C%2FP%3E%0A%3CTABLE%3E%0A%3CTHEAD%3E%0A%3CTR%3E%0A%3CTH%3Eoption%3C%2FTH%3E%0A%3CTH%3Edescription%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3C%2FTHEAD%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%3E-a%3C%2FTD%3E%0A%3CTD%3EArchive%20mode%20%E2%80%93%20rsync%20will%20do%20a%20recursive%20copy%2C%20and%20preserve%20modification%20times%2C%20links%2C%20file%20ownership%20and%20permissions.%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E-z%3C%2FTD%3E%0A%3CTD%3ECompress%20data%20over%20the%20network%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E-P%3C%2FTD%3E%0A%3CTD%3Ekeep%20partially%20transferred%20files%2C%20and%20show%20the%20progress%20during%20transfer%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E--exclude%3D.snapshot%3C%2FTD%3E%0A%3CTD%3EExclude%20the%20ANF%20.snapshot%20directory%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%3E--log-file%3D%2Fvar%2Flog%2Frsync.log%3C%2FTD%3E%0A%3CTD%3ECreate%20log%20file%20in%20%2Fvar%2Flog%2Frsync.log%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20schedule%20rsync%20via%20chron%2C%20we%20put%20this%20in%20the%20root%20cron%20configuration%20using%20the%3CCODE%3Esudo%20crontab%20-e%3C%2FCODE%3Ecommand%2C%20which%20lets%20you%20edit%20the%20root%20crontab%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-bash%22%3E*%20*%20*%20*%20*%20rsync%20-azP%20--delete%20--exclude%3D.snapshot%20--log-file%3D%2Fvar%2Flog%2Frsync.log%20%2Fvol-west2%2F%20root%40anf-client-east%3A%2Fvol-east%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThe%20initial%20asterisks%20tell%20cron%20to%20run%20this%20every%20minute%20%E2%80%93%20this%20may%20be%20excessive%20depending%20on%20requirements.%3C%2FP%3E%0A%3CP%3ETo%20run%20every%205%20minutes%2C%20this%20would%20be%20the%20configuration%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-bash%22%3E*%2F5%20*%20*%20*%20*%20rsync%20-azP%20--delete%20--exclude%3D.snapshot%20--log-file%3D%2Fvar%2Flog%2Frsync.log%20%2Fvol-west2%2F%20root%40anf-client-east%3A%2Fvol-east%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CP%3EFor%20a%20more%20complete%20solution%2C%20it%20is%20recommended%20to%20run%20rsync%20from%20a%20shell%20script%20that%20checks%20whether%20rsync%20is%20running%20already%2C%20for%20example%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-bash%22%3E%23!%2Fbin%2Fbash%0Alockfile%3D%2Fvar%2Fanf-sync%2Flockfile%0Amkdir%20-p%20%2Fvar%2Fanf-sync%0Aif%20test%20-f%20%22%24lockfile%22%3B%0Athen%0A%20%20%20%20%20%20%20echo%20%22rsync%20currently%20running%2C%20exiting%22%0A%20%20%20%20%20%20%20exit%0Aelse%0A%20%20%20%20%20%20%20touch%20%22%24lockfile%22%0A%20%20%20%20%20%20%20rsync%20-azP%20--delete%20--exclude%3D.snapshot%20--log-file%3D%2Fvar%2Flog%2Frsync.log%20%2Fvol-west2%2F%20root%40anf-client-east%3A%2Fvol-east%0A%20%20%20%20%20%20%20rm%20%22%24lockfile%22%0Afi%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CP%3EOf%20course%20in%20an%20actual%20DR%20event%2C%20the%20replication%20would%20have%20to%20be%20stopped%2C%20and%20(presumably)%20resumed%20in%20the%20other%20direction.%20This%20should%20be%20included%20in%20the%20DR%20runbook.%3C%2FP%3E%0A%3CH2%20id%3D%22toc_6%22%20id%3D%22toc-hId--861685513%22%20id%3D%22toc-hId--861685516%22%3ENFS%20Volume%20Consolidation%3C%2FH2%3E%0A%3CP%3EWhen%20using%20the%20ANF%20for%20NFS%20volumes%2C%20the%20customer%20wanted%20to%20optimize%20the%20volume%20size%2C%20performance%20and%20the%20overall%20cost.%20For%20this%20scenario%2C%20we%20had%20less%20than%20100GB%20(the%20minimum%20volume%20size)%20for%20each%20SAP%20SID.%20For%20that%20reason%20we%20suggested%20consolidation%20in%20the%20manner%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fvirtual-machines%2Fworkloads%2Fsap%2Fhigh-availability-guide-suse-netapp-files%23sap-netweaver-application-server-installation%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edocumented%20here%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20ANF%20volume%20path%20is%20%3CIP%20address%3D%22%22%3E%3A%2Fvol-west2.%20In%20that%20volume%20we%20will%20create%20a%20directory%20for%20each%20SID%20(in%20this%20example%2C%20QAS%20and%20NW1)%20%2C%20and%20under%20each%20of%20those%20there%20will%20be%20an%20ASCS%2C%20ERS%2C%20sapmnt%20and%20SYS%20directory.%20These%20directories%20have%20to%20be%20created%20via%20a%20VM%2C%20after%20the%20volume%20is%20created.%20Here%20are%20the%20sample%20directories%20that%20we%20created%3A%3C%2FIP%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-none%22%3E%3CIP%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQAS%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQASascs%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQASsys%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQASers%0A%20%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapNW1%2FsapmntNW1%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapNW1%2FsapmntNW1ascs%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapNW1%2FsapmntNW1sys%0A%3CIP%3E%3A%2Fvol-west2%2FusrsapNW1%2FsapmntNW1ers%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FIP%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CP%3EThese%20directories%20would%20be%20mounted%20either%20by%20the%20mount%20command%2C%20automounter%20configuration%20or%20the%20cluster%20filesystem%20resource%20configuration.%20There%20are%20really%20three%20differences%20(that%20I%20can%20think%20of)%20between%20this%20and%20having%20a%20separate%20volume%20for%20each%20mount%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20export%20policy%20would%20be%20for%20the%20volume%20as%20a%20whole%2C%20so%20all%20of%20the%20VMs%20for%20all%20SIDs%20using%20the%20volume%20would%20need%20access.%20There%20was%20some%20concern%20that%20this%20reduces%20security%20across%20SIDs%20somewhat.%20However%2C%20the%20root%20user%20is%20the%20one%20that%20can%20mount%20volumes%2C%20and%20root%20should%20be%20trusted.%3C%2FLI%3E%0A%3CLI%3EIf%20one%20of%20the%20SIDs%20were%20to%20fill%20up%20the%20volume%2C%20it%20could%20impact%20the%20others.%20It%20would%20be%20wise%20to%20put%20in%20monitoring%20or%20processes%20to%20grow%20the%20volume%20when%20needed.%3C%2FLI%3E%0A%3CLI%3EThe%20performance%20tier%2Fquality%20of%20service%20will%20be%20for%20the%20consolidated%20volume.%20Since%20these%20aren%E2%80%99t%20used%20all%20that%20much%20this%20should%20give%20better%20performance%20overall%2C%20but%20it%20would%20be%20possible%20for%20one%20SID%20to%20consume%20all%20of%20the%20IOPS%2Fthroughput%2C%20causing%20impacts%20on%20the%20others.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EThis%20is%20an%20example%20for%20the%20QAS%20instance%20%E2%80%93%20replace%20with%20the%20actual%20ip%20address%20for%20your%20volume%2C%20in%20the%20%2Fetc%2Fauto.direct%20file%3A%3C%2FP%3E%0A%3CDIV%3E%0A%3CPRE%3E%3CCODE%20class%3D%22language-none%22%3E%2Fsapmnt%2FQAS%20-nfsvers%3D3%2Cnobind%20%3CANF-VOL-IP%20addr%3D%22%22%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQAS%0A%2Fsapmnt%2FQAS%2FSYS%20-nfsvers%3D3%2Cnobind%20%3CANF-VOL-IP%20addr%3D%22%22%3E%3A%2Fvol-west2%2FusrsapQAS%2FsapmntQASsys%3C%2FANF-VOL-IP%3E%3C%2FANF-VOL-IP%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3C%2FDIV%3E%0A%3CH2%20id%3D%22toc_7%22%20id%3D%22toc-hId-1625827320%22%20id%3D%22toc-hId-1625827317%22%3ESingle%20region%20configuration%3C%2FH2%3E%0A%3CP%3EFor%20scenarios%20that%20are%20within%20a%20single%20region%2C%20the%20configurations%20above%20will%20work%20fine%20-%20however%20it's%20also%20possible%20to%20mount%20both%20the%20source%20and%20replica%20volumes%20from%20a%20single%20Azure%20VM%2C%20and%20use%20rsync%20on%20that%20VM%20to%20replicate%20the%20data%20between%20the%20two%20volumes.%3C%2FP%3E%0A%3CH2%20id%3D%22toc_8%22%20id%3D%22toc-hId--181627143%22%20id%3D%22toc-hId--181627146%22%3EMounting%20Options%3C%2FH2%3E%0A%3CP%3EFor%20mounting%20NFS%20volumes%20on%20Linux%20VMs%2C%20it%20is%20preferred%20to%20use%20either%20the%20Linux%20automounter%2C%20or%20to%20use%20cluster%20FS%20resources%20(when%20applicable).%20This%20is%20recommended%20because%20there%20is%20a%20timing%20issue%20in%20the%20Linux%20boot%20process%20where%20the%20%2Fetc%2Ffstab%20can%20sometimes%20be%20processed%20before%20the%20network%20stack%20is%20fully%20available.%20If%20the%20%2Fetc%2Ffstab%20is%20used%20to%20mount%20the%20NFS%20volumes%20on%20boot%2C%20it%20is%20possible%20for%20the%20boot%20to%20hang%2C%20or%20for%20the%20VM%20to%20boot%20and%20have%20the%20NFS%20mounts%20fail.%20This%20happens%20intermittenly%2C%20and%20it%20isn%E2%80%99t%20a%20customer%20specific%20situation.%3C%2FP%3E%0A%3CP%3EFor%20systems%20in%20a%20cluster%2C%20there%20are%20two%20advantages%20to%20having%20the%20volumes%20be%20cluster%20filesystem%20resources%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EThe%20fstab%20and%20network%20availability%20issue%20discussed%20above%20is%20resolved%2C%20because%20cluster%20resources%20would%20always%20be%20started%20after%20cluster%20communications%20have%20been%20established.%3C%2FLI%3E%0A%3CLI%3EThe%20resource%20agent%20for%20a%20cluster%20filesystem%20resource%20agent%20monitors%20the%20availability%20of%20the%20mounted%20volume.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHowever%2C%20for%20systems%20that%20are%20not%20in%20a%20cluster%2C%20the%20automounter%20will%20mount%20the%20desired%20volumes%20on%20demand%2C%20rather%20than%20at%20boot%20time.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAlso%2C%20when%20preparing%20the%20mount%20point%20directories%2C%20it's%20important%20to%20use%20the%3CCODE%3Echattr%20%2Bi%20%3CMOUNTPOINT%3E%3C%2FMOUNTPOINT%3E%3C%2FCODE%3Ecommand%20-%20this%20will%20make%20the%20actual%20mount%20point%20immutable%2C%20so%20that%20any%20attempted%20writes%20to%20the%20mountpoint%20will%20fail%20if%20the%20NFS%20volume%20is%20not%20mounted%20on%20top%20of%20it.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2503081%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EIn%20this%20blog%20post%2C%20we%20will%20present%20a%20customer's%20challenge%20in%20configuring%20data%20replication%20between%20Azure%20regions%20for%20disaster%20recovery%2C%20and%20how%20we%20solved%20the%20scenario.%26nbsp%3B%20In%20this%20example%20we%20are%20using%20rsync%20to%20replicate%20data%20on%20ANF%20to%20a%20different%20region%2C%20but%20other%20configurations%20are%20possible.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2503081%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EANF%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EAzure%20Netapp%20Files%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Elinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESAP%20on%20Azure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Co-Authors
Version history
Last update:
‎Jun 30 2021 02:47 PM
Updated by: