I'm trying to mount an Azure File Share on a Databricks cluster and get a 'permission denied' error. mount: /mnt/test: permission denied. Adding the --verbose flag doesn't provide any additional information. Can someone please help troubleshoot?
The error appears when the mount is executed. sudo mount -t cifs //<storage_account>.file.core.windows.net/test /mnt/test -o credentials=/etc/smbcredentials/<storage_account>.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30
sudo mkdir /mnt/test
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/<storage_account>.cred" ]; then
sudo bash -c 'echo "username=<storage_account>" >> /etc/smbcredentials/<storage_account>.cred'
sudo bash -c 'echo "password=<storage_account_key>" >> /etc/smbcredentials/<storage_account>.cred'
fi
sudo chmod 600 /etc/smbcredentials/<storage_account>.cred
sudo bash -c 'echo "//<storage_account>.file.core.windows.net/test /mnt/test cifs nofail,credentials=/etc/smbcredentials/<storage_account>.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30" >> /etc/fstab'
sudo mount -t cifs //<storage_account>.file.core.windows.net/test /mnt/test -o credentials=/etc/smbcredentials/<storage_account>.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30
Before you start loading Azure Files to Azure Databricks, make sure the Azure Storage File module is installed.
To install Azure Storage File module, you need to use:
pip install azure-storage-fileOnce module is installed you follow the stackoverflow thread to load the Azure Files to Azure Databricks.
For more details, please go through the link below and it has step by step instructions to set up the azure blob storage file share for your databricks cluster: https://pypi.org/project/azure-storage-file-share/