0

I'm trying to mount an Azure Files storage account as a shared drive on Debian virtual machines (VMs).

uname -v
#1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02)

I installed cifs-utils

sudo /sbin/mount.cifs -V
mount.cifs version: 6.4

sudo smbd -V
Version 4.1.17-Debian

and samba is running

ps aux | grep smbd
root      2442  0.0  0.3 270248 12516 ?        Ss   12:54   0:00/usr/sbin/smbd -D
root      2566  0.0  0.1 270248  6840 ?        S    12:54   0:00 /usr/sbin/smbd -D

Now, according to the documentation, one should just go with:

sudo mount -t cifs //whatever.file.core.windows.net/shared /mnt/shared --verbose -o -vers=3.0,username=whatever,password=MyKeyEndingIn==,dir_mode=0777,file_mode=0777

The trouble is that this yields without more information.

mount.cifs kernel mount options: ip=40.118.73.220,unc=\\whatever.file.core.windows.net\shared,-vers=3.0,dir_mode=0777,file_mode=0777,user=whatever,pass=********
mount error(22): Invalid argument

Checking the man page did not give more information except that "user=" is an alias for "username=" parameter. Whichever I use gives the same result.

Help is very appreciated.

muichkine
  • 2,890
  • 2
  • 26
  • 36

2 Answers2

1
  1. Check your error logs and remove invalid argument if exists.

    tail -f  /var/log/kern.log 
    
  2. you could refer to Debian 7, fstab, mount.cifs Invalid argument, this maybe help.

Community
  • 1
  • 1
Steven
  • 804
  • 4
  • 12
0

Thanks to Steven for pointing me to the log where things were pretty explicit:

$tail -f /var/log/kern.log
[ 1331.068538] CIFS: Unknown mount option "-vers=3.0"

so the (ridiculous) answer is the argument should be vers=3.0 and not -vers=3.0. The dash makes all the difference.

muichkine
  • 2,890
  • 2
  • 26
  • 36