I have all my data located on a Windows 10 box, and for years I’ve just been using a cifs mount via fstab successfully. Either OSMC or the Win10 box, or both updated and I can no longer mount via cifs. Turns out it’s because MS removed SMB1.0 recently, and a solution to that would be to add an option -o vers=2.0 (2.1,3.0), but whenever I try
sudo mount -t cifs //mintee-pc/Movies /mnt/Movies/ -o username=mintee,vers=2.0
it barks back…
mount error(22): Invalid argument
Looks like this issue is due to a newer version of the cifs kernel module either not being built or just not available. I assume I could grab a module from raspbian, but I’m not certain that would work.
Is this someone has a fix for, or something that can be rolled out soon?
Well, turns out it’s a little issue on both sides. I’m running Windows 10 Insider prerelease 170624-1334 and from a post here someone states…
it seems that a recent update to windows 10 pro insider preview build 16232.rs_prerelease.170624-1334 included a change that required me to add vers=3.0 to mount a share that was previously working without it.
For whatever reason, the current cifs module built in osmc’s version of raspbian doesn’t support the ‘vers’ flag, so I can’t get around the fix regardless. I was able to successfully browse the server using smbclient //mintee-pc/Movies -m SMB3 after adding the following fields to my smb.conf in the [global] section
client min protocol = SMB2
client max protocol = SMB3
I’m over it, and ended up mounting the shares with sshfs.
Attached image was about the time I lost my mind, and quit for the evening. Enjoy the legit error message.
I have the same issue here. The CIFS components of (Raspi) OSMC do not support the “vers” option of CIFS mount. The generic Raspbian from the foundation does. That the module has version has 2.09 does not mean that CIFS 2.0 is supported and the version of CIFS supported with the “vers” option is 3.
So it would be very helpful if the “vers” option would be supported as SMB1 should not be used anymore, e.g. for security and performance reasons.
@mintee@dillthedog, @sam_nazarko has put a kernel in staging that fixes the issue. If you want to test it follow these instructions otherwise it should most likely be published in the coming days.
I’d appreciate it if you could test this and provide feedback before we release this as an update to other users. To test this update:
Login via the command line2
Edit the file /etc/apt/sources.list
Add the following line: deb http://apt.osmc.tv jessie-devel main
Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
Your system should have have received the update.
Please see if the issue is resolved.
I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.
Here my success
osmc@osmc:~$ sudo mount -t cifs //192.168.147.140/Users/IEUSer/Downloads /mnt/test/ -o username=IEUser,vers=3.0
Password for IEUser@//192.168.17.140/Users/IEUSer/Downloads: *****
osmc@osmc:~$ ls -lah /mnt/test/
drwxr-xr-x 2 root root 4.0K May 13 19:22 .
drwxr-xr-x 6 root root 4.0K Jul 29 13:19 ..
-rwxr-xr-x 1 root root 282 Jul 22 2016 desktop.ini
-rwxr-xr-x 1 root root 176K May 6 19:55 Firefox Installer.exe
-rwxr-xr-x 1 root root 1.2M May 13 19:16 OperaSetup.exe
-rwxr-xr-x 1 root root 15M May 6 21:18 TeamViewer_Setup.exe
Thanks for confirming.
Remember to change back the devel repository so that you are not being surprised with some future testing stuff. The current testing kernel will remain installed and just be replaced with the official fixed one during the next regular update.