On-premises NAS migration to Azure File Sync
Summary β Migrate from NAS to a hybrid cloud deployment with Azure File Sync
What this guide covers
Scenario: Migrate SMB file shares from Network Attached Storage (NAS) to a Windows Server, then use Azure File Sync to sync those folders to Azure file share(s) (hybrid cloud with on-premises caching).
Key constraint: Azure File Sync works only with Direct Attached Storage (DAS) on Windows Server β it cannot sync directly from NAS. You must copy NAS data to a Windows Server first (for example, using Robocopy).
Target outcome: Keep production data integrity and minimize downtime while enabling cloud tiering (local cache) via Azure File Sync.
Applies to
SMB file shares on standard and premium Azure file shares (NFS is not supported in this scenario).
High-level migration overview
Plan mapping & capacity (Phase 1)
Determine how many Azure file shares you need (one Windows Server can sync up to 30 Azure file shares).
Options if >30 shares: group related shares under a common root folder, sync volume roots, or add more Windows Servers.
Keep items per Azure file share well below absolute limits (recommended <20β30M items for performance).
Create a mapping table (namespace mapping) to record which on-prem folders map to which Azure file shares.
Deploy cloud resources (Phases 3β4)
Create a Storage Sync Service in the Azure region that matches your resources.
Provision storage accounts and Azure file shares per your mapping. Best practice: consider one file share per storage account for high-activity shares; low-activity shares can share accounts.
Ensure redundancy and file share size settings meet your needs (100 TiB shares have limitations).
Install agent & register server (Phase 5)
Install Azure File Sync agent on the Windows Server and register the server to the Storage Sync Service.
Install required PowerShell modules (Install-Module -Name Az; Install-Module -Name Az.StorageSync).
Configure proxy/firewall access if needed (see provided networking guidance).
Configure sync groups & server endpoints (Phase 6)
Create a sync group per Azure file share; the Azure file share is the cloud endpoint.
Add a server endpoint for each local folder you want to sync.
Enable cloud tiering if local capacity < data size (set high temporarily during migration, e.g., 99% free space).
Copy data with Robocopy (Phase 7)
Use Robocopy from NAS β Windows Server target folders that are server endpoints.
Example command provided in the original article. Recommended switches and meanings are explained (e.g., /MT, /MIR, /B, /LFSM).
Beware Robocopy can outpace cloud-tiering and fail with "volume full" β plan copies in batches or use /LFSM for tiered targets (with compatibility caveats).
Cut over users (Phase 8)
Run initial RoboCopy, then repeat to catch deltas until a final acceptable downtime window.
Quiesce users (prevent changes on NAS), run final Robocopy, create SMB shares on the Windows Server, and point clients/DFS to the new shares.
After migration, reduce cloud tiering free-space policy to a long-term value (for example ~20%) across all sync groups.
Key considerations, tips, and troubleshooting
Scale vector: number of items (files/folders) per share matters most β try to stay below recommended item counts for performance and management.
Use namespace mapping and grouping to manage limits (30 shares per server, storage account performance limits).
If Robocopy errors with "volume full", allow Azure File Sync cloud tiering to free space (it runs hourly), then resume the copy.
Prefer Windows Server 2022; if using 2019, ensure patch KB5005103 or latest updates are applied for Robocopy fixes.
After migration, verify cloud tiering settings across all sync groups to avoid unintended high free-space policies.
Helpful links (from the original article)
Mapping/template download: https://download.microsoft.com/download/1/8/D/18DC8184-E7E2-45EF-823F-F8A36B9FF240/Azure%20File%20Sync%20-%20Namespace%20Mapping.xlsx
Azure File Sync agent download: https://aka.ms/AFS/agent
Azure File Sync planning and deployment docs (links preserved in original article)
Last updated in the source: 02/23/2024.
Was this helpful?