Lesson 08 — Azure Files & Azure File Sync
Why Azure Files Deserves Serious Attention
Every enterprise has legacy workloads built around shared file systems — SMB shares, home drives, departmental file servers, application configuration mounts. Azure Files is Microsoft's answer to lifting those workloads to the cloud without re-architecting them. It is not just "storage you can mount"; it is a fully managed file service with enterprise-grade identity integration, snapshot capabilities, and a hybrid synchronisation agent (Azure File Sync) that makes on-premises-to-cloud migration genuinely practical.
For the AZ-104 exam, Azure Files is tested primarily on: authentication models (especially the differences between AD DS, Entra Domain Services, and Entra Kerberos), protocol requirements (SMB vs NFS), Azure File Sync architecture, and the gotchas around large file shares and port 445. Get these right and this section is easy marks.
Azure Files Overview & Protocol Support
Azure Files provides fully managed cloud file shares that are accessible via industry-standard protocols. You access them the same way you would a traditional file server — with a drive letter on Windows or a mount point on Linux — but all the infrastructure is managed by Azure.
| Protocol | Supported Versions | OS Support | Identity Auth | Notes |
|---|---|---|---|---|
| SMB | 2.1, 3.0, 3.1.1 | Windows & Linux | Yes (AD DS, Entra DS, Entra Kerberos) | Requires port 445 outbound. SMB 3.0+ adds encryption in transit. |
| NFS | 4.1 | Linux only | No (network-level only) | Premium tier only. No public endpoint — requires VNet integration (private endpoint or service endpoint). HNS must be disabled. |
| REST API | — | Any | Storage account key / SAS | Used for management operations, AzCopy, Azure portal. Not a mount protocol. |
Storage Account Requirements
The storage account type you choose determines the performance tier available for your Azure file shares. This is a critical architecture decision because changing tier later is disruptive.
| Account Type | Performance Tier | Media | Use Case | Max Share Size |
|---|---|---|---|---|
| Standard GPv2 | Standard | HDD (magnetic) | General purpose, less latency-sensitive workloads | 5 TiB by default; 100 TiB with large file shares enabled |
| Premium File Shares | Premium | SSD (NVMe) | Low-latency, high-IOPS workloads; NFS 4.1 | 100 TiB |
Large File Shares on Standard GPv2
By default, Standard GPv2 file shares are capped at 5 TiB. You can enable large file shares at the storage account level to increase this to 100 TiB.
Share Quotas: Soft vs. Hard Limits
Each Azure file share has a configurable quota. Understand the difference between how quotas work for billing vs. enforcement:
- Soft limit (Standard tier): The quota is a warning threshold. When reached, you receive alerts, but writes are not blocked. You are billed for actual usage.
- Hard limit (Premium tier): The quota is enforced — once the share reaches the quota size, writes are refused. You are billed for the provisioned quota, not actual usage.
Authentication for Azure Files (SMB)
Azure Files supports four authentication methods for SMB. Choosing the wrong one for your environment is a common architectural mistake — the right answer depends on your identity topology.
| Authentication Method | Identity Source | Best For | Requires |
|---|---|---|---|
| Storage Account Key | None (key-based) | Emergency access, service accounts with no AD | Nothing extra |
| On-premises AD DS (Kerberos) | On-prem Active Directory | Enterprises with on-prem AD and domain-joined machines | Storage account joined to on-prem AD domain; line-of-sight or DC sync |
| Microsoft Entra Domain Services | Azure-managed AD (cloud) | Cloud-only environments; Azure VMs not joined to on-prem AD | Entra DS tenant deployed; VMs domain-joined to Entra DS |
| Microsoft Entra Kerberos | Microsoft Entra ID (hybrid/cloud-native) | Hybrid-joined or Entra-joined Windows 10/11 devices (newest, preferred) | Windows 10 21H1+ or Windows 11; Entra ID; no on-prem AD required |
Microsoft Entra Kerberos — The Modern Choice
Microsoft Entra Kerberos is the newest and preferred authentication path for Azure Files. It works with:
- Hybrid Azure AD-joined devices (joined to both on-prem AD and Entra ID)
- Entra ID-joined devices (cloud-native, no on-prem AD needed)
- It does not require deploying or managing Entra Domain Services or maintaining on-prem AD connectivity
The key technical distinction: Entra Kerberos uses Entra ID identities and issues Kerberos tickets via Entra ID itself, eliminating the dependency on a traditional domain controller for the ticket-granting process.
Share-Level Permissions vs. File/Directory ACLs
Azure Files uses a two-layer permissions model when identity-based authentication is configured. Both layers must grant access for a user to read or write a file.
Mounting Azure File Shares
Windows
Azure file shares are mounted on Windows using standard net use commands or the persistent drive mapping via File Explorer. The Azure portal provides a ready-made PowerShell script under each share's "Connect" blade.
# Mount using storage account key (for testing — use identity auth in production)
net use Z: \\storageaccountname.file.core.windows.net\sharename /user:Azure\storageaccountname storageaccountkey
# Persistent mount — survives reboot
cmdkey /add:storageaccountname.file.core.windows.net /user:Azure\storageaccountname /pass:storageaccountkey
net use Z: \\storageaccountname.file.core.windows.net\sharename /persistent:yes
Linux
Linux mounts use the cifs-utils package to mount SMB shares. NFS 4.1 shares use standard NFS mount tooling.
# Install cifs-utils
sudo apt-get install cifs-utils
# Mount SMB share
sudo mount -t cifs //storageaccountname.file.core.windows.net/sharename /mnt/azurefiles \
-o vers=3.0,username=storageaccountname,password=<key>,dir_mode=0777,file_mode=0777
Azure File Sync
Azure File Sync is a service that caches Azure file shares on one or more Windows Server machines — either on-premises or in Azure VMs. It solves the port 445 problem, enables multi-site file sharing, and provides a migration path for retiring physical file servers while keeping users' drive-letter access.
Architecture Components
| Component | Role | Cardinality per Sync Group |
|---|---|---|
| Storage Sync Service | Top-level Azure resource. Registers servers and owns sync groups. | 1 per deployment (can span multiple sync groups) |
| Sync Group | Defines a synchronisation topology — which servers sync with which cloud share. | Multiple per Storage Sync Service |
| Cloud Endpoint | The Azure file share that is the source of truth for the sync group. | Exactly 1 per sync group |
| Server Endpoint | A path on a registered Windows Server that participates in sync. | Multiple per sync group |
| Registered Server | A Windows Server (2012 R2+) with the AFS agent installed and registered. | Multiple per Storage Sync Service |
Synchronisation Behaviour
Sync is bidirectional. Changes made in Azure (directly to the cloud endpoint) propagate to all server endpoints in the sync group. Changes made on any server endpoint propagate to the cloud endpoint and from there to all other server endpoints. This makes Azure File Sync a practical replacement for DFS-R (Distributed File System Replication) in multi-site scenarios.
Cloud Tiering
Cloud tiering is one of the most powerful — and most misunderstood — features of Azure File Sync. When enabled on a server endpoint, files that have not been accessed recently are replaced on the local server with a reparse point (a tiny pointer file). The actual file data remains in the Azure file share. When a user or application opens the tiered file, the Azure File Sync agent transparently recalls it from Azure on demand.
| Tiering Policy | What it controls | Example |
|---|---|---|
| Volume free space policy | Ensures the server volume maintains a minimum percentage of free space. Azure File Sync tiers oldest files first to maintain this free space percentage. | Keep 20% free on D: — when D: hits 80% capacity, start tiering |
| Date policy | Files not accessed within N days are tiered, regardless of disk space. | Tier any file not opened in the last 30 days |
Pre-Seeding with Robocopy
When migrating large datasets to Azure File Sync, uploading all data from scratch over the internet is impractical. The recommended approach is pre-seeding:
- Use Robocopy (or AzCopy) to copy data directly to the Azure file share — often via ExpressRoute or Azure Data Box for large datasets.
- After data is in Azure, create the sync group and add server endpoints.
- Azure File Sync performs a namespace reconciliation — it matches what's on the server against what's in Azure and syncs only the differences. This is far faster than re-uploading everything.
Snapshots and Azure Backup for Azure Files
Share Snapshots
Azure file shares support point-in-time share snapshots. A snapshot captures the state of the entire file share at the moment it is taken. Snapshots are incremental — only the changes since the last snapshot are stored — but from the user's perspective each snapshot appears as a full copy.
- Snapshots are read-only and are stored within the same storage account as the file share.
- You can restore individual files from a snapshot (via the "Previous Versions" tab in Windows, or via portal/CLI) or restore the entire share.
- Snapshots do not protect against accidental deletion of the storage account itself — that requires soft delete or Azure Backup.
- Maximum 200 snapshots per share.
Azure Backup for Azure Files
Azure Backup integrates with Azure Files to create scheduled snapshots via a Recovery Services Vault. This provides:
- Policy-driven snapshot schedules (daily, weekly, monthly, yearly retention)
- Centralised management across all file shares in a subscription
- Integration with soft delete — deleted snapshots are retained for a configurable period before being permanently removed
- Instant restore — individual files can be restored in seconds from any snapshot
Check Your Understanding
Click any option to see immediate feedback. Answers represent correct behaviour in a real Azure environment.
1. Your organisation cannot open TCP port 445 outbound from the corporate network to the internet. You need on-premises users to access an Azure file share using their normal drive-letter mapping. What is the correct architectural solution?
2. Your organisation is deploying cloud-native Windows 11 devices that are Entra ID-joined only (no on-premises AD). You want users to authenticate to Azure Files using their Entra ID credentials (Kerberos). Which authentication method should you configure?
3. A Windows Server participating in Azure File Sync has cloud tiering enabled. A user opens a file that has been tiered. What happens on the server?
4. You need to replicate a single Azure file share to three Windows Server locations in different offices, so that all three offices can read and write the same files. How does Azure File Sync handle this topology?
5. You need to store files larger than 5 TiB in an Azure Files standard (HDD) share. You enable large file shares on the storage account. What constraint must you accept?
6. A user is a member of the Storage File Data SMB Share Contributor RBAC role on an Azure file share. However, the user reports they cannot write to a specific folder within the share. Assuming the share is using AD DS Kerberos authentication, what is the most likely cause?
Read the full introduction and follow the linked articles on identity-based authentication, Azure File Sync deployment, and cloud tiering. The Azure File Sync deployment guide is especially important for exam scenarios involving hybrid file sharing.
This lesson covered Azure Files architecture and Azure File Sync. Go deeper on any of these:
- Walk me through setting up Azure File Sync from scratch, including registering a Windows Server and configuring cloud tiering.
- How do you migrate an existing on-premises file server to Azure Files using the Azure File Sync pre-seeding workflow?
- What are the exact steps to configure AD DS Kerberos authentication for Azure Files — what gets created in Active Directory?
- How does Azure Files pricing work for Premium vs Standard, and when does the IOPS-to-cost ratio favour Premium over Standard?