afs

Azure File Sync & DFS Namespace

Azure File Sync & DFS Namespace

Azure File Sync is a new Azure feature, still in preview, that allows to sync a folder between your local file server and Azure Files. This way your files are accessible both locally at your file server and publicly at Azure Files using an SMB 3.0 client. Also the files can be protected online using Azure Backup.

The idea of this post is to have the files of two file servers to sync to Azure Files using Azure File Sync and in addition use the DFS Namespace feature to achieve common name and availability. This is not something officially supported, it is just an idea on using two different technologies to help for a service.

The requirement before starting the Azure File Sync is to create an Azure File share. We have covered this at a previews post, check here

Once the Azure Files share is ready, proceed with the Azure File Sync resource. At the Azure Portal press New and search for it and create it.

azure file sync

At the Deploy Storage Sync blade select a name for the Resource, subscription, resource group and location.

afs

When the Azure File Sync is ready we need to create a Sync group. Sync group is something like the DFS Replication Group. It is a group that consists of an Azure File Share and many local file servers that syncs a folder.

sync group

Press “+Sync group” it will open the new “Sync group” blade. There provide a name for the Sync group and select the storage account and the Azure File Share created before.

sync grfoup

The Sharegroup is ready with the cloud endpoint. The next step is to add the first local file server.

Register the local servers

Navigate to https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-server-registration for information on how to download the agent, install it and register the server. After that press “Add server endpoint”

azure file sync

At the “Add server endpoint” blade, select the registered server and add the path to the folder that has the data you want to sync. With Cloud Tiering you select a percent of the volume of the local server. When the capacity of the volume reaches this number then Azure File Share makes the files that are less frequently accessed cloud only. The file icon on the server get transparent and if anyone double clicks the file then it is downloaded instantly.

azure file sync

Register the second server the same way as the first and finally the share group will have two server endpoints. At my example the second server had no data, just the folder, and the Azure File Sync synced all files from server A.

azure file sync

Create a DFS Namespace

The next step is to create a DFS Namespace, just the namespace with the two local servers. Add the folders of both servers and you are ready.

dfs

Also if you browse the Azure File Share, all files are accessible

azure files

Notes from the field

Adding or changing a file at the first server, almost instantly replicates to Azure File Share and to the second server.

Altering a file at both servers instantly it will keep the last accessed by timestamp as is and the other file will be renamed by adding the server name at the file name, as the example “enaneoarxeio-AzureFS2.txt” where AzureFS2 is the server name.

You can add an Azure Backup and have a Cloud Backup of all your files.

Share

2 comments

  1. Hi, I have already DFS servers in my organization, I need to have Azure File sync as another DFS server in the cloud, I dont want my users to use anything new, I need them to use the old DFS share folders name. I can’t find any document how to do this, please help me. Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.