Welcome to Azure Files! This guide will walk you through the essential steps to get started with Azure Files, a fully managed cloud file share service that is accessible via the industry-standard Server Message Block (SMB) protocol.
Azure Files provides fully managed cloud file shares that are accessible from multiple clients, including on-premises Windows, macOS, and Linux operating systems, as well as cloud-based or dedicated Windows, macOS, and Linux deployments.
Key features include:
Before you begin, ensure you have the following:
A file share is the fundamental building block of Azure Files. You can create a file share using the Azure portal, Azure CLI, PowerShell, or SDKs.
myshare). Names must be lowercase letters and numbers.
Once your file share is created, you can mount it to your client machines. The process varies slightly depending on your operating system.
net use Z: \\storageaccountname.file.core.windows.net\myshare /user:Azure\storageaccountname STORAGEKEY
You'll need to install the necessary CIFS utilities:
sudo apt-get update && sudo apt-get install cifs-utils
Create a mount point and then mount the share:
sudo mkdir /mnt/mymountpoint
sudo mount -t cifs //storageaccountname.file.core.windows.net/myshare /mnt/mymountpoint -o vers=3.0,username=storageaccountname,password=STORAGEKEY,dir_mode=0777,file_mode=0777,serverino
Replace placeholders with your actual credentials.
Open Finder, go to Go > Connect to Server. Enter the server address in the format:
smb://storageaccountname.file.core.windows.net/myshare
Click Connect and you will be prompted for your username and password. Use storageaccountname as the username and your storage account key as the password.
Security Note: For production environments, it is highly recommended to use Azure Key Vault to manage your storage account keys instead of embedding them directly in scripts or command lines.
Once the file share is mounted, you can interact with it like any other local drive or directory. You can create, delete, copy, and move files and folders within the mounted share.
Congratulations! You have successfully created and mounted your first Azure File share.
Here are some resources to help you further explore Azure Files: