Mount an NFS Azure file share on Linux
Brief overview
Azure file shares on Linux can be mounted using SMB or NFS. This article focuses on mounting with NFS (NFSv4.1).
NFSv4.1 shares require access from trusted networks (virtual network recommended). Account keys, Microsoft Entra, and ACLs cannot be used to authorize NFSv4.1 requests.
You can mount using the AZNFS mount helper, native NFS client commands, or configure /etc/fstab for automatic mounts.
Use the nconnect mount option (recommended nconnect=4) to improve performance at scale.
NFS file shares support snapshots for rollbacks and recovery.
Applies to
Only certain combinations of storage type and redundancy support NFS (see original table for details and exact support rows).
Prerequisite β network security
NFSv4.1 file shares must be accessed from trusted networks. For setup guidance, see: https://docs.azure.cn/en-us/storage/files/create-classic-file-share
Mounting β quick steps
Options:
Use AZNFS mount helper (portal provides a tailored install+mount script).
Use native NFS mount command.
Add an /etc/fstab entry for automatic mounting.
Mount helper (portal)
Use portal "Connect from Linux"
In the Azure portal, after creating the file share, choose the share β "Connect from Linux".
Enter the desired mount path and copy the provided script. Run the script on the client to install the AZNFS mount helper and mount the share.
Portal script includes required mount options; you can add other recommended options (see Mount options).
Mount commands (by distribution)
/etc/fstab configuration
To auto-mount at boot, add an fstab entry. Check if AZNFS Mount Helper is installed:
Example fstab entries (replace placeholders):
Using AZNFS mount helper: .file.core.chinacloudapi.cn:// /media// aznfs defaults,sec=sys,vers=4.1,nolock,proto=tcp,nofail,_netdev,notls 0 2
Using native NFS mount: .file.core.chinacloudapi.cn:// /media// nfs vers=4,minorversion=1,_netdev,nofail,sec=sys 0 0
Recommended mount options (high level)
Required: vers=4 and minorversion=1 (use vers=4,minorversion=1), sec=sys.
Recommended for performance: rsize=1048576, wsize=1048576, nconnect=4, actimeo=30-60.
For kernels < 5.18: consider noresvport.
AZNFS-specific: clean option can clear stale entries from prior TLS mounts.
Troubleshooting and next steps
If mount fails, verify private endpoint and networking: https://docs.azure.cn/en-us/storage/files/storage-files-networking-endpoints#verify-connectivity
Troubleshoot: https://learn.microsoft.com/troubleshoot/azure/azure-storage/files-troubleshoot-linux-nfs?toc=/storage/files/toc.json
Snapshots: Azure Files supports snapshots for NFS shares β see: https://docs.azure.cn/en-us/storage/files/storage-snapshots-files#nfs-file-share-snapshots
Last update (per original): 09/19/2025
If you want, I can produce a one-line quick checklist, convert the full mount options table into a copyable fstab example, or extract only portal vs CLI steps. Which would you prefer?
Was this helpful?