@kumar kaushal Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused.
Azure File Sync works on Direct Attached Storage (DAS) locations and does not support sync to Network Attached Storage (NAS) locations. This fact makes a migration of your files necessary and this article guides you through the planning and execution of such a migration.
I would recommended to follow-up this article to migrate NAS data to Azure File Share: https://learn.microsoft.com/en-us/azure/storage/files/storage-files-migration-nas-hybrid
RoboCopy in the same mode a backup application would use. It allows RoboCopy to move files that the current user does not have permissions to.
Additional information: You cannot use a mapped drive as the AFS local cache.
On the Azure File Sync server map the NAS drive and then use robocopy to copy from the NAS to the local virtual disk used as the AFS cache.
Robocopy <source> <target> /mir /copyall /mt:16 /DCOPY:DAT
You could set your free space policy on the local drive to be pretty low, say 80%. This way Azure File Sync will tier out the data and free up more space as data is moved over to it. You could then start you migration to Azure File Sync in batches. Be careful that you have enough free space on the Azure File Sync cache and then copy some folders in. Wait for them to tier out and then move the next folder. You could use Robocopy -mir and make multiple passes so you can keep the original location online and minimize downtime. When your migration is over you can resize the local cache drive and update your free space policy to something lower, like 20%.
If you still find any difficulties. I wish to engage with you offline for a closer look and provide a quick and specialized assistance, please send an email with subject line “Attn:subm” to AzCommunity[at]Microsoft[dot]com referencing this thread and the Azure subscription ID, I will follow-up with you. Once again, apologies for any inconvenience with this issue. Thanks for your patience and co-operation.
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
---------------------------------------------------------------------------------------------------------------------------------------
Please don’t forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.