Hello,
I'm not sure if this question should be posted here but can you please tell me how I can mount an Azure File Service snapshot on Linux with CIFS?
Thanks very much
Hello @williexu ,
Thanks for the info. I already can use cifs to connect to my Azure container but I would like to mount the snapshot of the container with cifs. Do you know how to do this?
By Azure container do you mean instead Azure Fileshare?
If so, you can use:
sudo mount -t cifs //myaccountname.file.core.windows.net/mysharename /mymountpoint -o vers=3.0,username=myaccountname,password=StorageAccountKeyEndingIn==,dir_mode=0777,file_mode=0777
Taken from: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/mount-azure-file-storage-on-linux-using-smb#mount-the-file-storage-smb-share-to-the-mount-point
Hello @williexu ,
Thanks again. Yes I can do this no problem and connect successfully. However a FileShare can have a snapshot and I want to mount that snapshot using cifs on linux. Do you know how to do that?
Thanks
Oh sorry, I now understand your question.
I do not believe mounting of fileshare snapshots is currently supported, @seguler to confirm.
On that note, what are you trying to achieve by doing so? A snapshot's content is read-only and cannot be mutated. A folder where a snapshot would be mounted would also share the same read-only qualities.
According to the documentation; you can mount it: "you can mount a specific version directly as a drive. "
See the doc here: https://docs.microsoft.com/en-us/azure/storage/files/storage-snapshots-files
@wmgries - wouldn't it be good if we had an inline sample of how to mount a share snapshot in this doc ?
Hi @chanaka-jostle,
Today, it is not possible to mount an Azure file share snapshot on Linux. This is because the Linux SMB client does not support mounting snapshots like Windows does. We would like to contribute this feature to Linux in the future, so your question is very helpful for us in prioritizing this work.
To address @seguler's question, 1) I will update the doc he references to mention this only currently works on Windows, and 2) I already have documentation updates in PR review for navigating share snapshots via the Azure CLI and the AzureRM PowerShell module. Sorry we don't have stellar documentation on this yet - it's in review and will hopefully be released shortly!
Thanks,
Will
Hello @wmgries @seguler @williexu
Thanks very much for getting back to me. Adding this feature and updating the documentation will be very helpful. I look forward to seeing this functionality in the future.
Chanaka
Closing this issue as the question has been answered and this functionality lies at the service level rather than the CLI.
Just to be clear, in this case the functionality requested lies in the Linux client, rather than in the CLI or the Azure Files service :p
Most helpful comment
Hi @chanaka-jostle,
Today, it is not possible to mount an Azure file share snapshot on Linux. This is because the Linux SMB client does not support mounting snapshots like Windows does. We would like to contribute this feature to Linux in the future, so your question is very helpful for us in prioritizing this work.
To address @seguler's question, 1) I will update the doc he references to mention this only currently works on Windows, and 2) I already have documentation updates in PR review for navigating share snapshots via the Azure CLI and the AzureRM PowerShell module. Sorry we don't have stellar documentation on this yet - it's in review and will hopefully be released shortly!
Thanks,
Will