Ubuntu mount error 22 invalid argument

FIX: Unable to mount SQL Server FILESTREAM share from Linux with SMB 3.x protocol

SQL Server 2016 Service Pack 2 SQL Server 2016 Developer SQL Server 2016 Enterprise SQL Server 2016 Enterprise Core SQL Server 2016 Standard SQL Server 2017 on Windows (all editions) More…Less

Symptoms

Assume that you have a Microsoft SQL Server 2016 or 2017 database that has a FileTable. When you try to mount the SQL Server FILESTREAM share (or a sub-directory) from Linux by using the SMB 3.x protocol, you notice that the mounting fails and returns the following error message:

Error message from Linux :

[UserName ~]$ sudo mount -t cifs -o vers=3.0,sec=ntlmssp,username=Username,domain=DomainName  //sql_machine_name/filestream_share /mnt/mount_dir

[sudo] password for UserName:

Password for UserName@//sql_machine_name/filestream_share: ********

mount error(22): Invalid argument

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Resolution

This issue is fixed in the following cumulative updates for SQL Server:

  • Cumulative Update 17 for SQL Server 2017

  • Cumulative Update 10 for SQL Server 2016 SP2

About cumulative updates for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

  • Latest cumulative update for SQL Server 2017

  • Latest cumulative update for SQL Server 2016

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

BACKGROUND

I’m mounting some windows share directories to my linux box. I’m running Ubuntu 18.04. I have installed cifs-utils and keyutils to perform this task. However, I am running into this mount error (22) issue whenever I try to run the following command…

mount -t cifs -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000 //fs-01/Public /mnt/shares/public

TROUBLESHOOTING

I have verified that my machine can resolve the dns fs-01 which it can. However, I have went ahead and tried to use the ip address as well just to be sure…

mount -t cifs -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000 //1.2.3.4/Public /mnt/shares/public

This still doesn’t work. I have tried to raise the log level of cifs as such…

echo 7 > /proc/fs/cifs/cifsFYI

dmesg will then print the following…

[ 6483.223058] FS-Cache: Loaded
[ 6483.232090] FS-Cache: Netfs 'cifs' registered for caching
[ 6483.233765] Key type cifs.spnego registered
[ 6483.233768] Key type cifs.idmap registered
[ 6483.325252] CIFS: Attempting to mount //fs-01/public

this doesn’t really reveal anything. I have also verified /etc/request-key.conf reflects the following lines and it does…

create cifs.spnego * * /usr/sbin/cifs.upcall -c %k
create dns_resolver * * /usr/sbin/cifs.upcall %k

Some suggestions like this one have suggested installing the following package sudo apt-get install smbfs. However, smbfs is already covered by cifs-utils and so its not needed.

I have also tried several other permutations of the command as such but all of which still reflect the same exact error mount error (22)

sudo mount.cifs //fs-01/public /mnt/shares/public -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000

sudo mount.cifs //fs-01/public /mnt/shares/public -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000,sec=ntlmssp,nounix,vers=3.0

sudo mount -t cifs -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000 //fs-01/Public /mnt/shares/public

sudo mount -t cifs -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000 //1.2.3.4/Public /mnt/shares/public

sudo mount.cifs -o remount,soft,rw,_netdev,credentials=/home/shane/.mycreds,uid=1000,gid=1000 //1.2.3.4/Public /mnt/shares/public

Any ideas?

Hello all,

I’ve just tried my first install for 15.0 (clean build) using 64-bit binaries, and have observed a new error with a CIFS Mount being attempted from my /etc/fstab file. Using exactly the same connection string and parameters, I do not see this error with Mint 14.0, either with 32 or 64 bit editions. I have yet to try on 15.0/32-bit but I can if required.

The specific error message I see (when attempting: sudo mount -a) is the following:-

mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

but a broader search aided by Google unearthed the following Bug Report with respect to ubuntu 12.10:-

https://bugs.launchpad.net/ubuntu/+sour … bug/995535

In my specific case the target share is being hosted by an Apple Time Capsule, and CIFS has been the most reliable protocol for connection from my Linux environments. I have had this problem with previous releases of ubuntu, which is one of the reasons for my move to Mint!!! This report

https://bugzilla.redhat.com/show_bug.cgi?id=832741

on the Fedora forums suggests that this might actually be kernel related, which is why I have posted this entry. I wonder if it is possible for the 15.0 kernel to have been released with a different set of parameters that have introduced this problem. I would be grateful for suggestions, and am perfectly willing to experiment with either CIFS or other protocols (that work with a Time Capsule) to achieve a working connection. I am not wedded to use of CIFS… In the hope that it may provide further clarity, this is the fstab connection string that works with 14.0 but not 15.0.

================================================================================================================
//192.168.1.40/Data /media/capsule cifs user={myUserID},password={myPassword},rw,iocharset=utf8,file_mode=0777,dir_mode=0777
================================================================================================================

I will continue to experiment, but would be very grateful for suggestions towards fixes or further diagnosis.

Thanks in advance,

C

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Понравилась статья? Поделить с друзьями:
  • Udisks error quark 0 ubuntu
  • Udisk error quark 0 что делать
  • Ubuntu job for apache2 service failed because the control process exited with error code
  • Ubuntu initramfs ошибка
  • Ubuntu i2c error