Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we mount azure blob storage as a network drive in windows?

How can i add azure blob storage as a network drive in my local windows. Is there any way to mount azure blob as drive?

like image 602
Akhil Pathania Avatar asked May 06 '19 18:05

Akhil Pathania


People also ask

Can I mount Azure Blob storage as network drive?

There is no official way to map azure blob storage as network drive. But you can use some third-party tool like CloudBerry Drive for Microsoft Azure (it needs a license, but you can use the free trial version).

How do I access Azure blob storage in Windows Explorer?

Use Azure Storage Explorer Launch Microsoft Azure Storage Explorer. To bring up the Sign in to your account... wizard, select Azure account settings icon, then Add an account and enter you credentials. To bring up the Connect to Azure Storage wizard, select the Connect to Azure Storage icon.


4 Answers

Azure Files has support for mapping drives to both local and azure hosted systems as long as a few pre-reqs are met.

Take a look at the instructions in the documentation: https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows

like image 108
Mike Oryszak Avatar answered Jan 02 '23 02:01

Mike Oryszak


Using Powershell the script below will map a blob storage to Z: with the drive label "Azure Blob Storage" You will need the location, the storage account name and access key.

$connectTestResult = Test-NetConnection -ComputerName "BLOB STORAGE LOCATION HERE" -Port 445
if ($connectTestResult.TcpTestSucceeded) {
    # Save the password so the drive will persist on reboot
    cmd.exe /C "cmdkey /add:`"BLOB STORAGE LOCATION HERE`" /user:`"STORAGE ACCOUNT NAME HERE`" /pass:`"ACCESS KEY HERE`""
    # Mount the drive
    New-PSDrive -Name Z -PSProvider FileSystem -Root "\\BLOB STORAGE LOCATION HERE\FOLDER TO MAP" -Persist
} else {
    Write-Error -Message "Unable to reach the Azure storage account via port 445. Check to make sure your organization or ISP is not blocking port 445, or use Azure P2S VPN, Azure S2S VPN, or Express Route to tunnel SMB traffic over a different port."
} 
(New-Object -ComObject Shell.Application).NameSpace('Z:').Self.Name = 'Azure Blob Storage'
like image 41
Harry Avatar answered Jan 02 '23 02:01

Harry


There is no official way to map azure blob storage as network drive. But you can use some third-party tool like CloudBerry Drive for Microsoft Azure (it needs a license, but you can use the free trial version). Here is a doc on how to configure it, I tried and it works well for mapping azure blob storage as network drive.

enter image description here

The other option is to use azure file storage instead of blob storage, since azure file storage does support mapping as network drive.

like image 32
Ivan Yang Avatar answered Jan 02 '23 01:01

Ivan Yang


By now, Blob storage mounting as a file system is available as a preview in some sites: https://docs.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support-how-to?tabs=windows

like image 35
Tsahi Asher Avatar answered Jan 02 '23 00:01

Tsahi Asher