In my testing of Azure File Sync, I have encountered some issues. I have been able to get to the bottom of the issues, sometimes with support, by using a few sources of information. In this post I will share some tips on how to troubleshoot issues with Azure File Sync.
From an operational point of view, the first port of call will be the Azure Portal. In the Sync Service you can view each of the sycn groups and server registrations.
The first thing you should do is check the registered file servers:
Next you should open the sync groups. Any sync groups with a problem will be highlighted by the sync service. Inside, you can see the synchronization status with each server endpoint (a synchronized folder on a file server). If there are any files that aren’t synchronization, you will see a count of failing files, and you can click this number to investigate more.
If you have any setup or upgrade issues with the sync service agent then you should check the following log file locations on the affected file server:
Sometimes the easiest solution for an agent issue is to uninstall the agent and to reinstall it.
The focus point of most issues that I have seen is the StorageSync filter driver which is used whenever tiering is enabled for a server endpoint. Issues with the filter driver can cause:
A requirement of StorageSync is that your file server has 2 GB of assigned RAM available to it. If you are using a Hyper-V-based file server with Dynamic Memory then make sure the memory is at least as follows:
You can check the status of StorageSync by running fltmc instances to see if the driver has attached itself to the data volumes that contain any tiered server endpoints.
Sometimes problems can be pretty simple. You will require free space on your file server to synchronize your files. If you see 0x8e5e0211 and/or 0x80c8031a then there isn’t enough space to synchronize your files.
If files are not synchronizing then you can query what is happening on a file-by-file basis by running a script that is included with the sync agent installation called FileSyncErrorsReport.ps1.
If you want to dig deep under the covers of Azure File Sync then you can run the AFS-DIAG command. This requires that you import an Azure File Sync PowerShell module. The command will then produce a set of traces/logs into a pre-existing folder of your choosing:
cd "c:\Program Files\Azure\StorageSyncAgent" Import-Module .\afsdiag.ps1 Debug-Afs c:\traces
The above will help you to solve most issues, but your issue might be quite detailed. Luckily, the Azure File Sync documentation goes into quite a lot of detail on how to solve problems.