Azure File Storage

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

Note: Azure Files is a service that offers file shares in the cloud. It is distinct from Azure Blob Storage and Azure Queue Storage, though all fall under the broader Azure Storage umbrella.

Key Features

Use Cases

Getting Started

1. Creating an Azure File Share

You can create an Azure File Share using the Azure portal, Azure CLI, PowerShell, or REST API. Here's an example using Azure CLI:


az storage share create \
    --name mystorageaccount \
    --account-name myshare \
    --resource-group myresourcegroup \
    --quota 1024 \
    --output table
        

2. Mounting an Azure File Share

Mounting the share allows your client machines to access it like a local drive.

On Windows:

Use the net use command. You'll need your storage account name and access key (or use Azure AD credentials for supported scenarios).


net use Z: \\mystorageaccount.file.core.windows.net\myshare /u:mystorageaccount [YourStorageAccountAccessKey]
        

On Linux:

Install the cifs-utils package and use the mount command.


sudo apt-get update && sudo apt-get install cifs-utils
sudo mount -t cifs //mystorageaccount.file.core.windows.net/myshare /mnt/myshare -o vers=3.0,username=mystorageaccount,password=[YourStorageAccountAccessKey],dir_mode=0777,file_mode=0777,serverino
        

On macOS:

Use the mount command with the smb type.


mkdir ~/myfileshare
mount -t smbfs //mystorageaccount.file.core.windows.net/myshare ~/myfileshare -o usernam=mystorageaccount,password=[YourStorageAccountAccessKey]
        
Tip: For enhanced security, consider using Azure AD DS authentication or Azure AD Kerberos for domain-joined machines instead of relying solely on storage account access keys.

Performance Tiers

Azure Files offers two performance tiers:

Pricing

Pricing is based on the performance tier, capacity used, and transactions. You can find detailed pricing information on the Azure Pricing page.

Next Steps