Azure, Technology

11. Configure Azure Files

Contents

Create Azure File Share

Blobs aren’t made for sharing files in a “file share”, so for this we use Azure files.

To do this:

  • create a Storage Account of the “General Purpose V2” type
  • Go to the Storage Account and select “file shares”
  • Click on the + icon to create a File Share
  • Give it a name and set a quota (optional)
  • Once File Share is created you can go into it and create directories, upload files etc…

Map This File Share to your computer

  • From within the File Share in Azure, click on Connect
  • Here you can select which drive letter to use, then copy the code Azure gives you to mount this file share on your computer

NOTE: a lot of ISPs block port 445 so you may not be able to mount this on your home network.

Azure File Sync

Azure File sync allows us to sync files from our local servers to the cloud or other servers. It’s like replication for shared files for offices in different locations.

https://docs.microsoft.com/en-us/azure/storage/file-sync/file-sync-deployment-guide?tabs=azure-portal%2Cproactive-portal

  1. Azure File Sync Service

This is a service from within the Azure Portal. You need to create an instance of “Azure File Sync” service before using. When creating it you choose which Resource Group to create it in.

  1. Sync Group

Once you have created the service, you create the sync group within that service. This is basically the group of files you want to keep synced across servers.

When creating the sync group you select:

Storage account to use

The file share within the storage account where the files will be replicated to

  1. Azure File Sync Agent

This is the agent you install on your local server that you want to sync the files from to the cloud. You can download this from Microsoft. Once you install this on your server the “Server Registration” config will pop up. This is where you select the “Sync service” created in step 1 above.

Registering your Windows Server with a Storage Sync Service establishes a trust relationship between your server (or cluster) and the Storage Sync Service. A server can only be registered to one Storage Sync Service and can sync with other servers and Azure file shares associated with the same Storage Sync Service.

Troubleshoot Azure Sync

Microsoft article on this: https://docs.microsoft.com/en-us/azure/storage/file-sync/file-sync-troubleshoot?tabs=portal1%2Cazure-portal

Troubleshooting tip:

  • Turn on verbose logging
  • Monitor sync health from within the Sync Group

Should I remove and recreate my server endpoint?

No: removing a server endpoint isn’t like rebooting a server! Removing and recreating the server endpoint is almost never an appropriate solution to fixing issues with sync, cloud tiering, or other aspects of Azure File Sync. Removing a server endpoint is a destructive operation. It may result in data loss

Leave a Reply

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