What is Azure File Storage?
Azure File Storage provides cloud file shares that can be accessed and mounted by multiple machines simultaneously — just like a traditional on-premises file server, but fully managed in Azure. No hardware to provision, no OS to patch, no storage to manage.
Key Features
- Fully managed — no file servers to maintain
- Accessible via SMB 3.x and NFS 4.1 protocols
- Multiple machines can mount the same share simultaneously
- Accessible from Azure VMs, on-premises servers, and Windows/Mac/Linux machines
- Up to 100 TB per file share
- Integrated backup via Azure Backup
SMB vs NFS
| SMB (Server Message Block) | NFS (Network File System) | |
|---|---|---|
| Best for | Windows workloads | Linux workloads |
| Supported OS | Windows, Linux, macOS | Linux only |
| Authentication | Azure AD, storage account key | Network-based (VNet) |
| Internet access | Yes (over TLS) | No — VNet only |
| Storage tier | Standard and Premium | Premium only |
Creating a File Share
# Create a file share (100 GB quota)
az storage share create \
--name myfileshare \
--account-name mystorageaccount2026 \
--quota 100 \
--auth-mode login
# List file shares
az storage share list \
--account-name mystorageaccount2026 \
--output table \
--auth-mode login
Mounting on Windows
The Azure Portal provides a ready-to-use PowerShell script for mounting the file share on Windows. Here's how:
- Go to your Storage Account → File shares → select your share
- Click Connect
- Select Windows
- Choose a drive letter (e.g., Z:)
- Copy and run the provided PowerShell script on your Windows machine
# The Portal generates this script automatically
$connectTestResult = Test-NetConnection -ComputerName mystorageaccount2026.file.core.windows.net -Port 445
if ($connectTestResult.TcpTestSucceeded) {
# Mount the share
cmd.exe /C "cmdkey /add:`"mystorageaccount2026.file.core.windows.net`" /user:`"localhost\mystorageaccount2026`" /pass:`"[storage-account-key]`""
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\mystorageaccount2026.file.core.windows.net\myfileshare" -Persist
} else {
Write-Error "Unable to reach storage account — check port 445 is open"
}
Mounting on Linux
# Install CIFS utilities (for SMB)
sudo apt-get install cifs-utils -y
# Create mount point
sudo mkdir /mnt/myfileshare
# Mount the share
sudo mount -t cifs \
//mystorageaccount2026.file.core.windows.net/myfileshare \
/mnt/myfileshare \
-o vers=3.0,username=mystorageaccount2026,password=[storage-account-key],dir_mode=0777,file_mode=0777
# Make it persistent (add to /etc/fstab)
echo "//mystorageaccount2026.file.core.windows.net/myfileshare /mnt/myfileshare cifs nofail,vers=3.0,username=mystorageaccount2026,password=[key],dir_mode=0777,file_mode=0777 0 0" | sudo tee -a /etc/fstab
Azure File Sync
Azure File Sync transforms your Windows Server into a cache for an Azure file share. It replicates files between on-premises Windows Server and Azure Files — giving you fast local access with cloud-based centralised storage.
How It Works
- Install the Azure File Sync agent on your Windows Server
- Register the server with a Storage Sync Service in Azure
- Create a sync group linking a server endpoint (on-premises folder) to a cloud endpoint (Azure file share)
- Files are synchronised bidirectionally
- With cloud tiering enabled: rarely accessed files are replaced with pointers on the local server, while the full file stays in Azure. When accessed, it's transparently downloaded.
Performance Tiers
| Tier | Storage | IOPS | Best For |
|---|---|---|---|
| Standard (Transaction Optimised) | HDD-backed | Up to 1,000 | General file sharing, moderate workloads |
| Standard (Hot) | HDD-backed | Up to 1,000 | Frequently accessed shares |
| Standard (Cool) | HDD-backed | Up to 1,000 | Infrequently accessed archives |
| Premium | SSD-backed | Up to 100,000+ | Databases, high-performance applications |
Share Snapshots
Azure File shares support point-in-time snapshots — read-only copies of the entire file share at a specific moment. Useful for:
- Recovering accidentally deleted or modified files
- Backing up before major changes
- Compliance and audit requirements
# Create a snapshot
az storage share snapshot \
--name myfileshare \
--account-name mystorageaccount2026 \
--auth-mode login
File Storage vs Blob Storage
| Factor | File Storage | Blob Storage |
|---|---|---|
| Access protocol | SMB, NFS (mountable) | HTTP/REST API |
| Mount as drive? | Yes — like a network drive | No |
| Best for | Shared files between VMs/servers | Storing files accessed via URL/API |
| Max file size | 4 TB per file | 190.7 TB (block blob) |
| Access tiers | Standard Hot/Cool, Premium | Hot, Cool, Cold, Archive |
| Use case | Replacing file servers, shared config | Web assets, backups, data lakes |