Deploy and access SMB shares for your cloud applications
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 offers several benefits, including:
Navigate to the Azure portal, click "Create a resource", search for "Storage account", and follow the prompts. Ensure you select a Standard_LRS or Standard_GRS replication option for Azure Files.
Open your Azure Cloud Shell or a local terminal with Azure CLI installed and run the following commands:
Replace mystorageaccountname with a unique name for your storage account.
In your storage account's overview page, select "File shares" under "Data storage" and click "+ File share". Enter a name for your share (e.g., myshare) and set a quota.
Use the following command, replacing placeholders as needed:
You can mount your Azure File share using SMB on various operating systems. Here's how to mount it on Windows and Linux.
You'll need your storage account name and a storage account key. You can find these in the Azure portal under your storage account's "Access keys" section.
Open File Explorer, right-click "This PC", and select "Map network drive...".
\\mystorageaccountname.file.core.windows.net\myshare
When prompted for credentials, enter:
You can mount temporarily or add to /etc/fstab
for persistent mounting. For temporary mounting:
Replace YOUR_STORAGE_ACCOUNT_KEY with your actual storage account key. For better security, consider using a credentials file with /etc/fstab
.
For more detailed information, please refer to the official Azure Files documentation.