I have File share in Azure and I want to mount one of its snapshots. I am using following command:
sudo /bin/mount -t cifs //storageAccountName.file.core.windows.net/fileShareName /home/userName/mount -o vers=3.0,credentials=/home/userName/cred,dir_mode=0444,file_mode=0444,serverino,snapshot=132888855100000000
and it fails with
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
I can get slightly more info with sudo tail -f /var/log/kern.log
Feb 9 18:16:58 VmName kernel: [ 3963.812792] cifs: Bad value for 'snapshot'
If I don't use the snapshot option then everythig works as expected (but then I have current File share not snapshot)
sudo /bin/mount -t cifs //storageAccountName.file.core.windows.net/fileShareName /home/userName/mount -o vers=3.0,credentials=/home/userName/cred,dir_mode=0444,file_mode=0444,serverino
I use Ubuntu 20.04* in Azure, the strange thing is that in Ubuntu 18.04** it works just fine! Unfortunately I am forced to use 20.04.
*Ubuntu 20.04:
>hostnamectl
Icon name: computer-vm
Chassis: vm
Virtualization: microsoft
Operating System: Ubuntu 20.04.3 LTS
Kernel: Linux 5.11.0-1028-azure
Architecture: x86-64
>apt list --installed | grep cifs
cifs-utils/focal-updates,now 2:6.9-1ubuntu0.1 amd64 [installed]
**Ubuntu 18.04:
>hostnamectl
Icon name: computer-vm
Chassis: vm
Virtualization: microsoft
Operating System: Ubuntu 18.04.6 LTS
Kernel: Linux 5.4.0-1067-azure
Architecture: x86-64
>apt list --installed | grep cifs
cifs-utils/bionic-updates,now 2:6.8-1ubuntu1.1 amd64 [installed]
I was even able to update cifs-utils in Ubuntu 18.04 to version 6.9 (the same as in 20.04) and it still worked just fine so I don't think cifs-utils is the problem.
Any help appreciated.