Cloud Institution

Mounting Azure File Storage

By Pooja | 9th July 2025

Introduction

In today’s hybrid and cloud-first environments, businesses need scalable, shared, and easy-to-integrate file systems that work across different platforms and networks. Microsoft Azure File Storage delivers precisely that—a fully managed cloud file share service built on the familiar SMB (Server Message Block) and NFS protocols.

Azure Files can be easily mounted on Windows, Linux, and macOS, allowing seamless integration with on-premises or cloud-based systems. This article dives deep into mounting Azure File Storage, step-by-step setup, access methods, and best practices for performance and security.

What is Azure File Storage?

Azure File Storage is a service that allows you to create cloud-based file shares accessible through SMB or NFS protocols. It supports standard file operations like create, read, write, and delete, making it an ideal replacement or extension of on-premises file servers.

Key Features:

  • Fully managed and highly available
  • Compatible with Windows, Linux, and macOS
  • Mountable via SMB or NFS
  • Supports Active Directory authentication
  • Built-in encryption, snapshot, and backup options

Why Mount Azure File Storage?

Mounting Azure Files offers several benefits:

  • Hybrid connectivity: Share files between on-prem and cloud environments
  • Cross-platform support: Mount on Windows, Linux, macOS
  • Application compatibility: Use with legacy and modern apps
  • Scalability: Scale from GBs to 100 TB+ seamlessly
  • Availability: High availability with regional redundancy options

Azure File Storage Use Cases

  • Hosting user profile data for VDI environments (FSLogix)
  • Storing application logs or configurations shared across services
  • Replacing or extending on-prem file servers
  • Web content hosting
  • Shared development and build artifacts
  • File-based workloads requiring persistent storage

Types of Azure File Shares

Share Type

Protocol

Use Case

Standard SMB

SMB 3.0

General-purpose file shares

Premium SMB

SMB 3.1.1

High-performance workloads

Standard NFS

NFS 4.1

Linux-based workloads, analytics

SMB-based shares are best for mounting on Windows, while NFS is preferred for Unix/Linux systems.

Prerequisites for Mounting

Before you mount Azure File Storage, you need:

  • An Azure Subscription
  • A Storage Account with Azure File Share
  • Proper network access (public endpoint or VNet)
  • Authentication credentials:
    • Storage account key
    • Azure AD Identity (for domain-joined machines)
  • Appropriate client software (e.g., SMB client)

How to Create Azure File Storage

Step-by-Step via Azure Portal:

  1. Navigate to Azure Portal.
  2. Click on Storage accounts > Create.
  3. Choose subscription, resource group, region, and performance tier.
  4. Once created, go to the storage account > File shares > + File Share.
  5. Name the file share and set quota (size in GBs).
  6. Click Create.

You now have an Azure File Share ready to be mounted.

Mounting Azure File Storage on Windows

Option 1: Using File Explorer

  1. Go to your Azure File Share in the portal.
  2. Click Connect > Windows.
  3. Copy the provided PowerShell script or use manually:

powershell

CopyEdit

net use Z: \\<storageaccountname>.file.core.windows.net\<sharename> /u:<storageaccountname> <storagekey>

  1. Replace placeholders and run in PowerShell.
  2. The share is now accessible as Z:\.

Option 2: Persistent Mount at Boot

  1. Open Notepad and write:

cmd

CopyEdit

net use Z: \\yourstorageaccount.file.core.windows.net\yourshare /u:yourstorageaccount yourkey /persistent:yes

  1. Save as a .bat file and add to Startup folder or use Group Policy for domain machines.

Mounting Azure File Storage on Linux

Requirements:

  • SMB client (cifs-utils)

Steps:

  1. Install SMB support:

bash

CopyEdit

sudo apt-get install cifs-utils

  1. Create a mount directory:

bash

CopyEdit

sudo mkdir /mnt/azurefiles

  1. Mount using:

bash

CopyEdit

sudo mount -t cifs //yourstorageaccount.file.core.windows.net/yourshare /mnt/azurefiles -o vers=3.0,username=yourstorageaccount,password=yourkey,dir_mode=0777,file_mode=0777,serverino

Persistent Mount (via /etc/fstab):

Add the following line:

bash

CopyEdit

//yourstorageaccount.file.core.windows.net/yourshare /mnt/azurefiles cifs vers=3.0,username=yourstorageaccount,password=yourkey,dir_mode=0777,file_mode

=0777,serverino 0 0

Store secrets securely using a credentials file or use a key vault with managed identity for automation.

Mounting Azure File Storage on macOS

macOS does not natively support mounting Azure Files over SMB 3.0 with authentication headers. Workarounds may include:

  • Using third-party SMB clients
  • Mounting through a Linux proxy VM
  • Using SFTP (preview) with Azure Storage if file access is needed

Mounting with Azure AD and Identity-based Access

You can replace key-based access with Azure Active Directory (AD):

  • Join VMs to a domain or Azure AD DS
  • Enable Azure AD Kerberos authentication
  • Grant RBAC roles like Storage File Data SMB Share Contributor
  • Mount using:

powershell

CopyEdit

net use Z: \\yourstorageaccount.file.core.windows.net\yourshare

No credentials are needed if the user or VM is domain-joined and has access.

Persistent Mounting in VMs and Containers

For VMs:

  • Use startup scripts, /etc/fstab, or custom images with mount scripts pre-configured.

For Containers (Kubernetes):

  • Use CSI drivers for Azure Files.
  • Sample Kubernetes manifest:

yaml

CopyEdit

volumeMounts:

  – name: azure

    mountPath: “/mnt/data”

volumes:

  – name: azure

    azureFile:

      secretName: azure-secret

      shareName: yourshare

      readOnly: false

Performance Considerations

Tier

Throughput

IOPS

Standard

Up to 60 MB/s/share

1000–3000 IOPS

Premium

Up to 100 MB/s per TB

100,000+ (provisioned)

Performance is affected by:

  • Number of open handles
  • File size and operation type
  • SMB vs NFS (NFS has lower latency)

Use Premium File Shares for latency-sensitive workloads.

Security and Encryption

  • Encryption at rest: AES-256 enabled by default
  • In-transit encryption: Enforced via SMB 3.0+ and TLS
  • Private Endpoints: Access over a private IP in VNet
  • RBAC with Azure AD: Identity-based permissions
  • Advanced Threat Protection: Alerts on suspicious access

You can also use Azure Defender for Storage for real-time anomaly detection.

Monitoring and Troubleshooting

    • Azure Monitor: Track IOPS, latency, capacity
    • Storage Logs: Log file operations, success/failure
    • Metrics Explorer: Create dashboards
    • Network Watcher: Diagnose connectivity issues

    Common issues:

    • Incorrect SMB version (default to 3.0+)
    • Missing firewall or network rules
    • DNS resolution issues with *.file.core.windows.net

Best Practices

  • Use Azure AD Authentication over keys
  • Mount with Private Endpoints for sensitive workloads
  • Set appropriate NTFS and POSIX permissions
  • Use Premium Files for high IOPS needs
  • Avoid mounting Azure Files directly from the public internet
  • Rotate access keys regularly
  • Back up with Azure Backup for File Shares
  •  

Conclusion

  • Mounting Azure File Storage is a foundational skill for cloud architects, system admins, and DevOps engineers. Whether you’re deploying hybrid apps, lifting and shifting legacy workloads, or building a distributed environment, Azure Files provides the shared, scalable, and secure foundation needed.

    With support for multiple platforms, integration with Active Directory, enterprise-grade encryption, and simple mounting procedures, Azure Files is not just a storage service—it’s an enabler for modern cloud architectures.

Leave a Comment

Your email address will not be published. Required fields are marked *

Explore Our Recent Blogs

Scroll to Top