What causes the error -2147024894 ERROR_FILE_NOT_FOUND

mpls 80 Reputation points
2024-03-17T15:48:03.3533333+00:00

We have some on prem file servers syncing to Azure File Shares via Azure File Sync. Everything seems to be healthy, but we are seeing quite a few (around 80 files on one server) with the 0x80070002 -2147024894 ERROR_FILE_NOT_FOUND .

There is tiering turned on for this, but is the cause of this that the file or folder was deleted in the on prem share but that information did not sync? Or is is the symptom of some bad health. In the portal everything looks healthy but it is showing a persistent error in relation to those files "not found". Here is what the error looks like in the Sync Group

0x80070002 Persistent sync error Sync failed

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,169 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,715 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anand Prakash Yadav 6,085 Reputation points Microsoft Vendor
    2024-03-18T11:49:13.2166667+00:00

    Hello mpls,

    Thank you for posting your query here!

    The error code 0x80070002 -2147024894 ERROR_FILE_NOT_FOUND typically indicates that a file or folder expected by the system cannot be found.

    However, in the context of Azure File Sync, this could happen due to several reasons:

    If a file or folder was deleted in the on-premises share, it might take some time for Azure File Sync to detect this change.

    Azure File Sync uses a scheduled job called a change detection job to identify modifications in the Azure file share. This job compares the files in the share with their sync versions. The change detection job runs every 24 hours, but for larger namespaces, it might take longer to determine which files have changed.

    To immediately sync files that are changed in the Azure file share, you can manually initiate change detection using the Invoke-AzStorageSyncChangeDetection PowerShell cmdlet. This is useful for scenarios where automated processes or administrators make changes to the share.

    As per this troubleshooting article: https://learn.microsoft.com/en-us/troubleshoot/azure/azure-storage/file-sync-troubleshoot-sync-errors?tabs=portal1%2Cazure-portal the error implies that the file has been deleted and sync isn't aware of the change, in that case Azure File Sync will stop logging this error once change detection detects that the file was deleted.


    Do let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    0 comments No comments