Azure File Storage offers fully managed file shares in the cloud using the Server Message Block (SMB) protocol, which is the predominantly used file share protocol for on-premises Windows use cases. Azure Files can be mounted from any client OS that implements the SMB versions supported by Azure Files. Today, we are introducing AzFileDiagnostics to help first time Azure Files file share users ensure that the Windows client environment has the correct prerequisites. AzFileDiagnostics automates detection of most of the symptoms mentioned in the troubleshooting Azure Files article and helps set up your environment and receive optimal performance.
In general, mounting a file share can be simply achieved on Windows using a standard “net use” command. When you create a share, Azure Portal automatically generates a “net use” command and makes it available for copy and pasting. One can simply click on the “Connect” button, copy the command for mounting this file share on your client, paste it and you have a drive with mounted file share. What could go wrong? Well, as it turns out, use of different clients, SMB versions, firewall rules, ISPs, or IT policies can affect connectivity to Azure Files. Good news is AzFileDiagnostics isolates and examines each source of possible issues and in turn provides you with advice or workarounds to correct the problem.
As an example, Azure Files supports SMB protocol version 2.1 and 3.0. To ensure secure connectivity, Azure Files requires communication from another region or from on premises to be encrypted. Thus, requiring SMB 3.0 channel encryption for those use-cases. AzFileDiagnostics detects the SMB version on the client and determines whether the client meets the necessary encryption requirement automatically.
How to use AzFileDiagnostics
You can download AzFileDiagnostics from Script center today and simply run:
PowerShell Command:
AzFileDiagnostics.ps1 [-StorageAccountName <storage account name>] [-FileShareName <share name>] [-EnvironmentName <AzureCloud| AzureChinaCloud| AzureGermanCloud| AzureUSGovernment>]
Usage Examples:
AzFileDiagnostics.ps1
AzFileDiagnostics.ps1 -UncPath \storageaccountname.file.core.windows.netsharename
AzFileDiagnostics.ps1 -StorageAccountName storageaccountname –FileShareName sharename –Environment AzureCloud
In addition to diagnosing issues, it will present you with an option to mount the file share when the checks have successfully completed.
Learn more about Azure Files
- Get started with Azure Files
- Use Azure Files with Linux
- Troubleshoot Azure Files on Windows
- Troubleshoot Azure File on Linux
Feedback
We hope that AzFileDiagnostics will make your getting started experience smoother. We love to hear your feedback. If there are additional troubleshooting topics for Azure Files that you would like to see, please leave a comment below. In addition to this, if you have any feature request, we are always listening to your feedback on our User Voice. Thanks!