Azure Storage Files
Azure Files is a fully managed cloud file share service that is 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 significant code changes. Azure Files also offers managed NFS shares for Linux workloads.
Key Features
- SMB and NFS Protocol Support: Mount shares directly from Windows, macOS, and Linux clients.
- Managed Cloud Service: No need to manage hardware or operating systems.
- Elastic Scalability: Scales automatically to meet your storage needs.
- Data Redundancy: Choose from LRS, ZRS, GRS, and RA-GRS options.
- Security: Supports Azure AD Domain Services authentication and shared key authentication.
- Azure File Sync: Enables cloud caching of on-premises file shares.
Use Cases
- Lift and shift applications that require shared storage.
- Development and testing environments.
- Shared configuration files for applications.
- Disaster recovery and backup.
Getting Started
Creating an Azure File Share
You can create an Azure File share using the Azure portal, Azure CLI, or PowerShell.
Using Azure CLI:
az storage account create --name mystorageaccount --resource-group myresourcegroup --sku Standard_LRS --kind StorageV2
az storage share create --account-name mystorageaccount --name myshare --quota 5120 --output table
Mounting an Azure File Share
Mounting instructions vary by operating system.
Windows:
Use the net use command with your storage account name and key, or mount using Azure AD credentials.
net use Z: \\mystorageaccount.file.core.windows.net\myshare /user:Azure\mystorageaccount YOUR_STORAGE_ACCOUNT_KEY
Linux:
Install the necessary CIFS utilities and use the mount command.
sudo apt-get update
sudo apt-get install cifs-utils -y
sudo mount -t cifs //mystorageaccount.file.core.windows.net/myshare /mnt/myshare -o vers=3.0,username=mystorageaccount,password=YOUR_STORAGE_ACCOUNT_KEY,dir_mode=0777,file_mode=0777,serverino
/etc/fstab on Linux or a scheduled task on Windows.
Pricing
Pricing for Azure Files is based on the amount of data stored, the number of transactions, and the data redundancy option chosen. For detailed pricing information, please visit the Azure Storage Pricing page.