Azure File Storage
File Storage
What is Azure File Storage?
Azure Files offers a fully managed cloud file share accessible via the industry-standard Server Message Block (SMB) protocol. This means you can lift and shift your on-premises file shares to the cloud without significant code changes. Azure Files is also accessible via the Network File System (NFS) protocol, enabling Linux and macOS clients to mount shares.
Key Features
- Fully Managed: No need to manage hardware or operating systems.
- SMB & NFS Support: Compatible with a wide range of clients and applications.
- Elastic Scalability: Scales automatically to accommodate your storage needs.
- Durability & Availability: Designed for high durability and availability.
- Security: Supports Azure Active Directory (Azure AD) domain authentication for SMB shares, as well as anonymous access.
- Performance Tiers: Choose between Premium and Standard tiers to optimize cost and performance.
Use Cases
- Application Development: Shared configuration files, diagnostic logs, and application data.
- Development and Debugging: Easily share tools and scripts across multiple development machines or VMs.
- Cloud Migration: Lift and shift existing file-based applications to Azure.
- Software as a Service (SaaS): Provide shared file storage for multi-tenant applications.
- Content Distribution: Serve static content or media files.
Getting Started with Azure File Storage
To start using Azure File Storage, you need an Azure Storage account. You can then create a file share within that account.
Creating a File Share
You can create a file share using the Azure portal, Azure CLI, Azure PowerShell, or client libraries.
Mounting a File Share
Once created, you can mount the file share to your on-premises servers or Azure virtual machines using the SMB or NFS protocol. The Azure portal provides the necessary connection strings or mount commands.
Example: Mounting with SMB (Windows)
net use Z: \\yourstorageaccount.file.core.windows.net\yourfileshare /u:AZURE\yourstorageaccount yourstorageaccountkey
Example: Mounting with SMB (Linux)
sudo mount -o vers=3.0 //yourstorageaccount.file.core.windows.net/yourfileshare /mnt/yourshare -o dir_mode=0777,file_mode=0777,cache=none,username=yourstorageaccount,password=yourstorageaccountkey,sec=ntlm
Access Control
Azure File Storage supports several methods for controlling access:
- Shared Access Signatures (SAS): Granting delegated access to resources.
- Access Control Lists (ACLs): For granular permissions on files and directories (especially with NFS).
- Azure Active Directory (Azure AD) Integration: For SMB shares, allowing domain-joined machines and users to authenticate with their Azure AD credentials.
Performance Tiers
| Tier | Description | Use Cases |
|---|---|---|
| Standard | HDD-based, cost-effective for general-purpose file workloads. | General file sharing, dev/test environments, application settings. |
| Premium | SSD-based, high performance with low latency for demanding workloads. | Databases, I/O-intensive applications, high-performance computing. |