Mounting Azure File share to Azure batch nodes is failing.

Vamsiramrajesh Pothireddy 6 Reputation points
2022-08-09T11:15:16.457+00:00

Hi Team,

I am trying to mount azure file share on linux. Running below commands from azure fileshare connect section.
Getting below error while running. Please help.
Code:

sudo mkdir /mnt/aipdheastusdevfs
if [ ! -d "/etc/smbcredentials" ]; then
sudo mkdir /etc/smbcredentials
fi
if [ ! -f "/etc/smbcredentials/aipdheastusdevstracc.cred" ]; then
sudo bash -c 'echo "username=aipdheastusdevstracc" >> /etc/smbcredentials/aipdheastusdevstracc.cred'
sudo bash -c 'echo "password=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" >> /etc/smbcredentials/aipdheastusdevstracc.cred'
fi
sudo chmod 600 /etc/smbcredentials/aipdheastusdevstracc.cred

sudo bash -c 'echo "//aipdheastusdevstracc.file.core.windows.net/aipdheastusdevfs /mnt/aipdheastusdevfs cifs nofail,credentials=/etc/smbcredentials/aipdheastusdevstracc.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30" >> /etc/fstab'
sudo mount -t cifs //aipdheastusdevstracc.file.core.windows.net/aipdheastusdevfs /mnt/aipdheastusdevfs -o credentials=/etc/smbcredentials/aipdheastusdevstracc.cred,dir_mode=0777,file_mode=0777,serverino,nosharesock,actimeo=30

Error:

[1017358.004382] CIFS: Attempting to mount \aipdheastusdevstracc.file.core.windows.net\aipdheastusdevfs
[1017358.013923] CIFS: Status code returned 0xc0000022 STATUS_ACCESS_DENIED
[1017358.013938] CIFS: VFS: \aipdheastusdevstracc.file.core.windows.net Send error in SessSetup = -13
[1017358.021560] CIFS: VFS: cifs_mount failed w/return code = -13

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
374 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.