Mounting cifs drive gives: mount error(22): Invalid argument
Solution 1:
maybe this helps with this, mount error(22): Invalid argument
... possible error is the
argument/s (mode) on mount command.
-
check your logs on the errors encountered.
tail -f /var/log/kern.log
remove the invalid argument
Solution 2:
Another possible cause is the presence of sec=ntlm
in /etc/fstab
and it's incompatibility with newer SMB protocols like SMB3.
While not the OP's case, this can also cause mount error(22): Invalid argument
errors, as it did for me after upgrading an old server.
Even though kern.log
includes a suggestion to specify vers=1.0 on mount
, it may be safer to remove or change sec=ntlm
instead. Perhaps use the defaults to allow automatic negotiation of the SMB version and security, or specify compatible options such as vers=3.0,sec=ntlmssp
.
Obviously this depends on your SMB server's features, but I would try and avoid vers=1.0
unless necessary.