Reputation: 752
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?
Upvotes: 15
Views: 70589
Reputation: 185
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'
Upvotes: 6
Reputation: 1812
By now, Blob storage mounting as a file system is available as a preview in some sites: https://learn.microsoft.com/en-us/azure/storage/blobs/network-file-system-protocol-support-how-to?tabs=windows
Upvotes: 9
Reputation:
According to your question for your use case I think you should you file share than blob. You will get the url and the key to connect the drive. then you can map that as network drive in your system.
Upvotes: 4
Reputation: 30025
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.
The other option is to use azure file storage instead of blob storage, since azure file storage does support mapping as network drive.
Upvotes: 4
Reputation: 304
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://learn.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-windows
Upvotes: 7