Azure File Service
Mount Azure File Share
Windows
Connect to and mount an Azure File Share (Windows File Explorer)
- Right-click on This PC
- Click Map Network Drive option
- Specify drive letter to be used
- Specify folder:
\\<storageAccount>.files.core.windows.net\<shareName>
- Click Finish
- In the dialog box that opens login with the username:
AZURE\<storageName>
- Password should be access key for the storage account
net use x \\erstandard01.file.core.windows.net\logs /u:AZURE\erstandard01 <accessKey>
cmdkey /add:storageAccountName.file.core.windows.net /user:AZURE\storageAccountName /pass:storageAccountKey
$storageKey = (Get-AzStorageAccountKey -ResourceGroupName $g -Name $storageNAme).Value[0]
$acctKey = ConvertTo-SecureString -String $storageKey -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential -ArgumentList "Azure\$storageName", $acctKey
New-PSDrive -Name "Z" -PSProvider FileSystem -Root "\\$storageName.file.core.windows.net\$shareName" -Credential $credential
Linux
Mounting to /logs
sudo mount -t cifs //$storageAccount.file.core.windows.net/logs /logs -o "vers=3.0,username=$storageAccount,password=$storageAccountKey,dir_mode=0777,file_mode=0777,sec=ntlmssp"
Sources:
- Deploy Azure File Sync
- AZ-103: p. 148