Mounting Azure File Shares to Linux machines

1.Login to Azure portal and your vm
ssh azureuser@(public_ip_adress)

2. Install cifs-utils
sudo apt-get install cifs-utils

3.  Create directory same as your file share in Azure portal “linuxshare02”
sudo mkdir /mnt/linuxshare02

4. Make a link to our “linuxshare02”
go to storage account and copy the URL from propertiies
sudo mount-t cifs (link without https://) /mnt/linuxshare02 -o ver=3.0,username(storageaccount name),password=( storage account key),dir_mode=0777,file_mode=0777,serverino

example in my case:
sudo mount -t cifs // /mnt/linuxshare02 -o vers=3.0,username=storagecli777,password=WnyV7MN7ECkijf79O7SqjIRoeTHIu8vXMvzvnrtj4JewFhGaeK4ncZ6RjFaOjqEJdGNPpaIEFiDZF/ZlK27/Ng==,dir_mode=0777,file_mode=0777,serverino

5. Check
df -h

6. Create test files
cd /mnt/linuxshare01
touch testfile.txt




Please Comment and Subscribe

 697 total views,  2 views today

Leave a Reply

Your email address will not be published.