Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
✔️ Applies to: Classic SMB and NFS file shares created with the Microsoft.Storage resource provider
✖️ Doesn't apply to: File shares created with the Microsoft.FileShares resource provider
Tip
Creating an NFS file share? Use Microsoft.FileShares. Classic file shares support NFS, but use the Microsoft.FileShares resource provider for new NFS deployments. To create an NFS file share with Microsoft.FileShares, see Create an Azure file share with Microsoft.FileShares. For the differences between the resource providers, see Azure Files management concepts.
This article describes how to create a storage account and a classic file share in it. Before you create a classic file share, decide on these properties:
- Media tier: SSD file shares provide consistent high performance and low latency. HDD file shares provide cost-effective storage for general-purpose use.
- Protocol: SMB file shares are available on both media tiers. NFS file shares require the SSD media tier.
- Redundancy: HDD file shares support locally redundant storage (LRS), zone-redundant storage (ZRS), geo-redundant storage (GRS), and geo-zone-redundant storage (GZRS). SSD file shares support LRS and ZRS. For more information, see Azure Files data redundancy.
For more information, see Plan an Azure Files deployment.
Prerequisites
- An Azure subscription. If you don't have an Azure subscription, create a free account.
- To use Azure PowerShell, install the latest version.
- To use Azure CLI, install the latest version.
Create a storage account for classic file shares
You deploy classic file shares into a storage account. A storage account is a top-level resource that represents a shared pool of storage, IOPS, and throughput. You can deploy multiple file shares in one storage account. If you already have a storage account that you want to use, go to Create a classic file share.
Two storage account properties, kind and SKU, determine the billing model, media tier, and redundancy of the file shares in the storage account. Azure Files supports these combinations:
| Media tier | Billing model | Storage account kind | Storage account SKUs |
|---|---|---|---|
| SSD and HDD | Provisioned v2 | FileStorage |
|
| SSD | Provisioned v1 | FileStorage |
|
| HDD | Pay-as-you-go | StorageV2 |
|
Use the provisioned v2 billing model for all new file share deployments. The provisioned v1 and pay-as-you-go billing models remain fully supported for new and existing deployments. Provisioned v2 file shares are available in most regions. For more information, see Provisioned v2 availability.
To create a storage account in the Azure portal, search for storage accounts in the search box at the top of the portal. Under Services, select Storage accounts.
Select + Create to open the Create a storage account page.
The Create a storage account page has a tab for each group of settings. The following sections describe the settings that apply to Azure Files.
Basics
The Basics tab contains the required settings for the storage account.
| Field | Values | Description |
|---|---|---|
| Subscription | Available Azure subscriptions | The subscription for the storage account. |
| Resource group | Resource groups in the subscription | The resource group for the storage account. |
| Storage account name | Text | A globally unique name for the storage account. The name must be 3 to 24 characters long and contain only numbers and lowercase letters. |
| Region | Available Azure regions | The region for the storage account. |
| Primary service |
|
Select Azure Files. The provisioned v2 billing model is available only when you select Azure Files. |
| Media tier |
|
The media tier for the file shares in the storage account. |
| File share billing |
|
We recommend Provisioned v2 for all new deployments. |
| Redundancy |
|
For more information, see Azure Files data redundancy. |
| Make read access to data available in the event of regional unavailability | Checkbox | Appears only for HDD pay-as-you-go storage accounts with GRS or GZRS. This setting doesn't apply to Azure Files. Azure Files doesn't support read access to the secondary region without a failover. |
| Zone options |
|
Appears for SSD storage accounts with LRS. To place the storage account in a specific availability zone, see Use zonal placement for Azure file shares. |
Advanced
The Advanced tab has a section for Azure Blob Storage and a section for Azure Files. Settings in the Azure Blob Storage section don't apply to Azure Files.
For SSD storage accounts, the portal enables SMB Multichannel by default. You can disable it after you create the storage account. For more information, see Improve performance for SMB Azure file shares.
| Field | Default | Description |
|---|---|---|
| Enable Managed Identity for SMB | Not selected | Lets applications and virtual machines access SMB file shares with a managed identity. For more information, see Access SMB Azure file shares by using managed identities with Microsoft Entra ID. |
| Require Encryption in Transit for SMB | Selected | Requires encryption for SMB access to the file shares in the storage account. |
| Require Encryption in Transit for NFS | Selected | Requires encryption for NFS access to the file shares in the storage account. Appears only for SSD storage accounts. |
The portal saves each Require Encryption in Transit setting as enabled or disabled, so these settings control SMB and NFS encryption whether or not you select them. The Require secure transfer for REST API operations setting on the Security tab applies only to FileREST (HTTPS) traffic. For more information, see Configure encryption in transit for Azure Files.
Networking
The networking settings are optional when you create the storage account. You can configure them later.
| Field | Default | Description |
|---|---|---|
| Public network access | Enable | Enable, Disable, or Secure by perimeter. Controls access to the storage account's public endpoint. |
| Public network access scope | Enable from all networks | To allow access only from specific networks, select Enable from selected virtual networks and IP addresses. |
| Virtual networks | None | Appears when you select Enable from selected virtual networks and IP addresses. Allows access from the selected subnets through the Microsoft.Storage service endpoint. |
| IPv4 Addresses | None | Appears when you select Enable from selected virtual networks and IP addresses. Allows access from public IPv4 addresses or ranges. IP address rules don't grant NFS access. |
For more information, see Azure Files networking considerations and Restrict access to the public endpoint to specific networks.
Data protection
The Data protection tab has a section for Azure Blob Storage and a section for Azure Files. Settings in the Azure Blob Storage section don't apply to Azure Files.
| Field | Default | Description |
|---|---|---|
| Enable soft delete for classic file shares | Selected | Protects file shares against accidental deletion. For more information, see Azure file share soft delete. |
| Days to retain deleted classic file shares | 7 | The number of days that Azure Files keeps a deleted file share before it purges the file share. You're billed for the used capacity of soft-deleted file shares, including provisioned file shares. A longer retention period can increase your costs. |
Security
The Security tab combines settings for all storage services. The following table shows which settings apply to Azure Files.
| Field | Applies to Azure Files | Description |
|---|---|---|
| Require secure transfer for REST API operations | Yes | Requires HTTPS for FileREST requests. The Require Encryption in Transit settings on the Advanced tab control SMB and NFS encryption. |
| Allow enabling anonymous access on individual containers | No | Applies only to Blob Storage. |
| Enable storage account key access | Yes | Controls whether clients can use the storage account keys to mount SMB file shares or to authorize FileREST requests. |
| Default to Microsoft Entra authorization in the Azure portal | Yes | Controls whether the Azure portal uses your Microsoft Entra identity, instead of the storage account key, when you browse file shares. |
| Minimum TLS version | Yes | The minimum TLS version for FileREST requests. SMB doesn't use TLS. For NFS, the AzNFS mount helper uses TLS 1.2 or TLS 1.3. For more information, see FileREST. |
| Permitted scope for copy operations (Preview) | Yes | Limits which storage accounts can be the source of FileREST copy operations into this storage account. Tools such as AzCopy use these operations. |
Encryption
The Encryption tab controls encryption at rest. For more information, see Encryption at rest for Azure Files.
| Field | Applies to Azure Files | Description |
|---|---|---|
| Encryption type | Yes | Microsoft-managed keys (MMK) or Customer-managed keys (CMK). For the steps to use customer-managed keys, see Configure encryption at rest with customer-managed keys for Azure Files. |
| Enable support for customer-managed keys | No | All classic file shares support customer-managed keys, regardless of this setting. |
| Enable infrastructure encryption | Yes | Adds a second layer of encryption. You can enable infrastructure encryption only when you create the storage account. For more information, see Infrastructure encryption. |
Tags
Tags are name/value pairs that you use to categorize resources and to view consolidated billing. Tags are optional, and you can add them after you create the storage account.
Review + create
- Select Review and create.
- Check the settings on the Review + create tab, and then select Create.
Create a classic file share
The steps to create a classic file share depend on the billing model of the storage account. Provisioned file shares require a FileStorage storage account. Pay-as-you-go file shares require a StorageV2 storage account.
To check the billing model of a storage account, go to the storage account's Overview page. Under Essentials, check Account kind and File share billing.
A file share name can contain only lowercase letters, numbers, and single hyphens. It must start and end with a lowercase letter or number, and it can't contain two consecutive hyphens. For more information, see Naming and referencing shares, directories, files, and metadata.
Create a provisioned v2 classic file share
For a provisioned v2 file share, you provision storage, IOPS, and throughput. Your bill depends on the amount of each that you provision. Azure Files recommends IOPS and throughput based on the provisioned storage. You can use the recommendation, or specify your own values. For more information, see Provisioned v2 model.
Go to your storage account. From the service menu, under Data storage, select Classic file shares.
Select + Classic file share.
On the Basics tab of the New classic file share page, complete these fields:
- Name: The name of the file share.
- Provisioned storage (GiB): The amount of storage to provision. You're billed for the provisioned storage, regardless of how much you use.
- Provisioned IOPS and throughput: Select Recommended provisioning to use the recommended IOPS and throughput, or select Manually specify IOPS and throughput. If you don't know your IOPS and throughput requirements, use the recommendation and adjust it later.
- IOPS and Throughput (MiB/sec): If you selected Manually specify IOPS and throughput, enter the values to provision. The range for each value appears under the field.
- Protocol: Select SMB or NFS. NFS is available only in SSD storage accounts. For an NFS file share, you can also set Root Squash. For more information, see Configure root squash for Azure Files.
Select the Backup tab. For an SMB file share, Azure Backup is enabled by default. To disable it, clear Enable backup. To keep it, use the default vault and policy, or create a new Recovery Services vault or backup policy. Azure Backup isn't available for NFS file shares.
Select Review + create, and then select Create.
Create an SSD provisioned v1 classic file share
For a provisioned v1 file share, you provision storage. Azure Files sets the IOPS and throughput based on the provisioned storage. To get more IOPS or throughput, provision more storage. For more information, see Provisioned v1 model.
Go to your storage account. From the service menu, under Data storage, select Classic file shares.
Select + Classic file share.
On the Basics tab of the New classic file share page, complete these fields:
- Name: The name of the file share.
- Provisioned storage (GiB): The amount of storage to provision. The minimum is 100 GiB. You're billed for the provisioned storage, regardless of how much you use. Under Performance, the page shows the IOPS, burst IOPS, and throughput for the provisioned storage.
- Protocol: Select SMB or NFS. For an NFS file share, you can also set Root Squash. For more information, see Configure root squash for Azure Files.
Select the Backup tab. For an SMB file share, Azure Backup is enabled by default. To disable it, clear Enable backup. To keep it, use the default vault and policy, or create a new Recovery Services vault or backup policy. Azure Backup isn't available for NFS file shares.
Select Review + create, and then select Create.
Create an HDD pay-as-you-go classic file share
Pay-as-you-go file shares support only SMB. Each pay-as-you-go file share has an access tier: transaction optimized, hot, or cool. All three access tiers use the same HDD hardware. Cooler tiers have lower storage prices and higher transaction prices. For more information, see Differences in access tiers.
Go to your storage account. From the service menu, under Data storage, select Classic file shares.
Select + Classic file share.
On the Basics tab of the New classic file share page, complete these fields:
- Name: The name of the file share.
- Access tier: The access tier of the file share. The default is Transaction optimized. During a migration, use the transaction optimized tier to minimize transaction costs. After the migration, you can change to a cooler tier.
Select the Backup tab. Azure Backup is enabled by default. To disable it, clear Enable backup. To keep it, use the default vault and policy, or create a new Recovery Services vault or backup policy.
Select Review + create, and then select Create.
Set up networking for classic file shares
SMB file shares don't require network configuration. NFS file shares require it, because NFS uses network-based access control. Clients can access an NFS file share only from a virtual network, through a private endpoint or a service endpoint.
- A private endpoint gives the storage account a private IP address in your virtual network. Clients in peered virtual networks and on-premises networks can use it. Data processing charges apply.
- A service endpoint lets clients in specific subnets use the public endpoint. The subnets can be in a different subscription or Microsoft Entra tenant. Service endpoints don't have extra charges.
For more information, see Azure Files networking considerations.
Important
NFS uses TCP port 2049. Ensure that your clients can send traffic on port 2049, and that the network security groups of the virtual network don't block inbound traffic on port 2049.
Set up a private endpoint or service endpoint
The following steps create a private endpoint for an NFS file share in the Azure portal. To configure a service endpoint, or to use PowerShell or Azure CLI, see Configure network endpoints for Azure file shares.
Go to your storage account. From the service menu, under Data storage, select Classic file shares, and then select your NFS file share.
On the Connect from Linux tab, under Network configuration, select Review options. The Configure network security tab opens.
Select Setup a private endpoint. The Private endpoint connections tab of the storage account's networking page opens.
Select + Private endpoint.
On the Basics tab, enter a Name for the private endpoint. The portal fills in Network Interface Name. Set Region to the region of your virtual network, and then select Next : Resource.
On the Resource tab, make sure that Target sub-resource is file, and then select Next : Virtual Network.
On the Virtual Network tab, select your Virtual network and Subnet. The portal might select a different virtual network by default. Leave Dynamically allocate IP address selected, and then select Next : DNS.
On the DNS tab, leave Integrate with private DNS zone set to Yes. Make sure that the subscription and resource group are correct, and then select Next : Tags.
Optionally, add tags, and then select Next : Review + create.
After validation passes, select Create.
Enable hybrid access through VPN or ExpressRoute (optional)
To access an NFS file share from an on-premises network, connect the network to your virtual network with a VPN or Azure ExpressRoute, and configure DNS for the private endpoint. For the steps, see Connect from on-premises.