How to create an NFS share (preview)
Azure file shares are fully managed file shares that live in the cloud. This article covers creating a file share that uses the NFS protocol (preview).
|File share type||SMB||NFS|
|Standard file shares (GPv2), LRS/ZRS|
|Standard file shares (GPv2), GRS/GZRS|
|Premium file shares (FileStorage), LRS/ZRS|
While in preview, NFS Azure file shares have the following limitations:
- Only available for the premium tier.
- If a storage account was created before registering for the NFS feature, NFS file shares cannot be created in that storage account. NFS file shares can only be created in storage accounts that were created after registering for the NFS feature.
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.
NFS shares only accept numeric UID/GID. To avoid your clients sending alphanumeric UID/GID, disable ID mapping.
NFS shares can only be accessed from trusted networks. Connections to your NFS share must originate from one of the following sources:
If you intend to use the Azure CLI, install the latest version.
Register the NFS 4.1 protocol
You must first register for the feature in order to create NFS Azure file shares. You cannot create NFS shares in storage accounts that were created before registration.
If you're using the Azure PowerShell module or the Azure CLI, register your feature using the following commands:
Use either Azure PowerShell or Azure CLI to register the NFS 4.1 feature for Azure Files.
Registration approval can take up to an hour. To verify that the registration is complete, use the following commands:
Use either Azure PowerShell or Azure CLI to check on the registration of the NFS 4.1 feature for Azure Files.
Create a FileStorage storage account
Currently, NFS 4.1 shares are only available as premium file shares. To deploy a premium file share with NFS 4.1 protocol support, you must first create a FileStorage storage account. A storage account is a top-level object in Azure that represents a shared pool of storage which can be used to deploy multiple Azure file shares.
To create a FileStorage storage account, navigate to the Azure portal.
In the Azure portal, select Storage Accounts on the left menu.
On the Storage Accounts window that appears, choose Add.
Select the subscription in which to create the storage account.
Select the resource group in which to create the storage account
Next, enter a name for your storage account. The name you choose must be unique across Azure. The name also must be between 3 and 24 characters in length, and can include numbers and lowercase letters only.
Select a location for your storage account, or use the default location.
For Performance select Premium.
You must select Premium for Fileshares to be an available option in the Account kind dropdown.
For Premium account type choose Fileshares.
Leave Replication set to its default value of Locally-redundant storage (LRS).
Select Review + Create to review your storage account settings and create the account.
Once your storage account resource has been created, navigate to it.
Create an NFS share
Now that you have created a FileStorage account and configured the networking, you can create an NFS file share. The process is similar to creating an SMB share, you select NFS instead of SMB when creating the share.
Navigate to your storage account and select File shares.
Select + File share to create a new file share.
Name your file share, select a provisioned capacity.
For Protocol select NFS.
For Root Squash make a selection.
- Root squash (default) - Access for the remote superuser (root) is mapped to UID (65534) and GID (65534).
- No root squash - Remote superuser (root) receives access as root.
- All squash - All user access is mapped to UID (65534) and GID (65534).
Now that you've created an NFS share, to use it you have to mount it on your Linux client. For details, see How to mount an NFS share.
If you experience any issues, see Troubleshoot Azure NFS file shares.