Mount NFS Azure file share on Linux
Azure file shares can be mounted in Linux distributions using either the Server Message Block (SMB) protocol or the Network File System (NFS) protocol. This article is focused on mounting with NFS. For details on mounting SMB Azure file shares, see Use Azure Files with Linux. For details on each of the available protocols, see Azure file share protocols.
Currently, only NFS version 4.1 is supported. NFS 4.1 shares are only supported within the FileStorage storage account type (premium file shares only).
NFS Azure file shares support most features from the 4.1 protocol specification. Some features such as delegations and callback of all kinds, Kerberos authentication, and encryption-in-transit aren't supported.
The nconnect mount option is currently in preview and isn't recommended for production use.
Azure NFS file shares is supported in all the same regions that support premium file storage.
For the most up-to-date list, see the Premium Files Storage entry on the Azure Products available by region page.
Open port 2049 on the client you want to mount your NFS share to.
NFS shares can only be accessed from trusted networks.
To enable hybrid access to an NFS Azure file share, use one of the following networking solutions:
Disable secure transfer
Sign in to the Azure portal and access the storage account containing the NFS share you created.
Select Disabled for Secure transfer required.
Mount an NFS share using the Azure portal
Once the file share is created, select the share and select Connect from Linux.
Enter the mount path you'd like to use, then copy the script.
Connect to your client and use the provided mounting script.
You have now mounted your NFS share.
Mount an NFS share using /etc/fstab
If you want the NFS file share to automatically mount every time the Linux server or VM boots, create a record in the /etc/fstab file for your Azure file share. Replace
FileShareName with your information.
<YourStorageAccountName>.file.core.windows.net:/<YourStorageAccountName>/<FileShareName> /mount/<YourStorageAccountName>/<FileShareName> nfs vers=4,minorversion=1,sec=sys 0 0
For more information, enter the command
man fstab from the Linux command line.
If your mount failed, it's possible that your private endpoint wasn't set up correctly or isn't accessible. For details on confirming connectivity, see Verify connectivity.