Azure Storage Documentation

Comprehensive guides and API references for Azure Storage services.

Create an Azure Files Share

This article guides you through the process of creating a new Azure Files share, a fully managed cloud file share accessible via the industry-standard Server Message Block (SMB) protocol and Network File System (NFS) protocol.

Prerequisites

Before you begin, ensure you have the following:

Steps to Create an Azure Files Share

You can create an Azure Files share using the Azure portal, Azure CLI, PowerShell, or Azure Storage SDKs. This guide focuses on the Azure portal for ease of use.

Azure Portal
Azure CLI
Azure PowerShell

Using the Azure Portal

Step 1: Navigate to your Storage Account

Sign in to the Azure portal. In the search bar at the top, type "Storage accounts" and select it. Choose the storage account where you want to create the file share.

Navigate to Storage Account

Step 2: Access File Shares Blade

In your storage account's overview page, under the "Data storage" section in the left-hand menu, select File shares.

Step 3: Create a New File Share

Click the + File share button at the top of the File shares page.

Create New File Share Button

Step 4: Configure File Share Settings

A blade will appear to configure your new file share:

  • Name: Enter a unique name for your file share. Share names must be lowercase letters and numbers.
  • Tier: Select the appropriate performance tier:
    • Transaction optimized: Default, suitable for most workloads.
    • Hot: For frequently accessed data.
    • Cool: For infrequently accessed data.
  • Capacity: Specify the maximum size of the file share in GiB.
  • Enabled protocols: Choose between SMB and NFS. SMB is the default.

Click Create to provision your new file share.

Configure File Share Settings

Step 5: Verify Creation

Once the file share is created, it will appear in the list of file shares for your storage account. You can now proceed to mount or access it.

Using Azure CLI

Use the following Azure CLI command to create a file share:

az storage share create
az storage share create \ --name \ --account-name \ --account-key \ --quota \ --output table

Replace the placeholders with your actual values:

  • <YOUR_FILE_SHARE_NAME>: The desired name for your file share.
  • <YOUR_STORAGE_ACCOUNT_NAME>: The name of your Azure Storage account.
  • <YOUR_STORAGE_ACCOUNT_KEY>: The access key for your storage account. You can retrieve this from the storage account's "Access keys" blade in the Azure portal.
  • <SIZE_IN_GIB>: The desired capacity in GiB (e.g., 1024 for 1 TiB).

For more advanced options, including specifying the tier, refer to the Azure CLI documentation for az storage share create.

Using Azure PowerShell

Use the following Azure PowerShell command to create a file share:

New-AzStorageShare
New-AzStorageShare -Name "" -Context (Get-AzStorageAccount -ResourceGroupName "" -AccountName "").Context -CapacityGB

Replace the placeholders with your actual values:

  • <YOUR_FILE_SHARE_NAME>: The desired name for your file share.
  • <YOUR_RESOURCE_GROUP_NAME>: The resource group your storage account belongs to.
  • <YOUR_STORAGE_ACCOUNT_NAME>: The name of your Azure Storage account.
  • <SIZE_IN_GIB>: The desired capacity in GiB (e.g., 1024 for 1 TiB).

For more advanced options, including specifying the tier, refer to the Azure PowerShell documentation for New-AzStorageShare.

Next: Access Azure Files Share