Azure File Storage

Azure Files provides fully managed cloud file shares that are accessible via the industry-standard Server Message Block (SMB) protocol and Network File System (NFS) protocol. This means you can "lift and shift" legacy applications that rely on file shares to Azure without requiring extensive code changes.

Key Features

Use Cases

Getting Started

To get started with Azure File Storage, you need an Azure subscription. You can then create a storage account and within it, create file shares.

Creating a Storage Account

You can create a storage account using the Azure portal, Azure CLI, PowerShell, or ARM templates.

Using Azure CLI:

az storage account create \
    --name mystorageaccount \
    --resource-group myresourcegroup \
    --location eastus \
    --sku Standard_LRS \
    --kind StorageV2
            

Creating a File Share

Once you have a storage account, you can create a file share:

az storage share create \
    --name myfileshare \
    --account-name mystorageaccount \
    --quota 1024 \
    --output table
            

This command creates a file share named myfileshare with a quota of 1024 GiB in the mystorageaccount storage account.

Mounting Azure File Shares

Azure File shares can be mounted to various operating systems:

Mounting on Windows

Use the net use command with your storage account name and access key:

net use Z: \\mystorageaccount.file.core.windows.net\myfileshare /user:Azure\mystorageaccount YOUR_STORAGE_ACCOUNT_KEY
            

Mounting on Linux

You can use the mount command:

sudo mount -t cifs //mystorageaccount.file.core.windows.net/myfileshare /mnt/myazurefile \
    -o vers=3.0,username=mystorageaccount,password=YOUR_STORAGE_ACCOUNT_KEY,dir_mode=0777,file_mode=0777,serverino
            

Mounting on macOS

Use Finder's "Connect to Server" option or the mount command.

Pricing and Tiers

Azure File Storage offers different tiers to optimize costs:

Refer to the Azure Files pricing page for detailed information.

Learn More