Author : MD TAREQ HASSAN | Updated : 2021/01/23
Points to be noted
- Using NFS 3.0 (Network File System) protocal (as of January 2021, it’s in preview mode)
- In the preview release of this feature, NFS 3.0 protocol is supported in BlockBlobStorage and general-purpose V2 accounts
- Security: access is only protected by vNet (configure storage account to allow access from specific subnet of you vNet i.e. the subnet where VMs belongs)
Register NFS to subscription
Open cloud shell, select PowerShell and register NFS to subscription
Register-AzProviderFeature -FeatureName AllowNFSV3 -ProviderNamespace Microsoft.Storage
Register-AzResourceProvider -ProviderNamespace Microsoft.Storage
Verify that NFS is registered
Get-AzProviderFeature -ProviderNamespace Microsoft.Storage -FeatureName AllowNFSV3
Creating block blob storage accoount for vm
- Crerate Storage Account
- enable NFS 3.0 while creating storage account
- In networking tab
- connectivity method: public endpoint (selected network)
- select your target vNet and subnet (where target VMs belong)
- In order to enable NFS 3.0
- Basic: Locally-redundant storage (LRS)
- data protection: disable all settings
- advanced tab:
- disable ‘secure transfer required’
- enable Hierarchical namespace
- Create storage account
- Create blob container
Check Storage Account Networking
- Resource group > Select storage account
- Settings: Networking
- Allow access from: Selected netwok
- Check the subnet where Azure VM belongs is added
- Add Azure VM subnet if needed > Save (don’t forget to save)
- After creating container
- Check container access
- If container access is private, then mounting to VM might not work
Mounting to VM
- In taskbar, search “windows features”
- Enable “Client for NFS”
- Windows 10 : Services for NFS > “Client for NFS”
- Windows Server : Features > “Client for NFS”
- Restart
Open CMD and execute following command
mount -o nolock <storage-account-name>.blob.core.windows.net:/<storage-account-name>/<container-name> *
Example:
mount -o nolock foosa.blob.core.windows.net:/foosa/bar-container *