No SMB3 on nano: mount error(22): Invalid argument

problem: cannot mount smb3 synology share on nano, only smb1 works
more info:

fails:

sudo mount -t cifs -o username=po,vers=3.0 //zeng/nano /mnt/nano
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
sudo cat /var/log/kern.log

Feb 19 15:40:56 nano2 kernel: [ 2194.221315] CIFS VFS: cifs_mount failed w/return code = -95
Feb 19 15:42:45 nano2 kernel: [ 2302.790904] **CIFS VFS: Unknown vers= option specified: 3.0**

works:
smbclient -U po //zeng/nano -m SMB3

works:
sudo mount -t cifs -o username=po,**vers=1.0** //zeng/nano /mnt/nano

also fails:
sudo mount -t cifs -o username=po,**vers=2.0** //zeng/nano /mnt/nano

uname -r
4.9.253-tegra

found this link, but it suggest to build a new kernel?
[mount network folder samba cifs]

is there any fix for the issue?

I am not someone who uses SAMBA/CIFS, but the issue is one of adding a Linux driver and is not really a Jetson issue (unless you consider building and installing kernel modules on a Jetson, which does differ from building and installing for a desktop PC).

About this:

An error such as that above implies the kernel driver or feature needed for the operation does not exist. An example to see what CIFS features are installed would be:
zcat /proc/config.gz | grep -i cifs
(what do you see from that command?)

These URLs seem to be useful, though probably not answering all questions:

There are a lot of documents, and so I did not read through all of it, but it seems like the minimum requirement for kernel modules would be the “cifs.ko” module, which would be located here:
/lib/modules/$(uname -r)/kernel/fs/cifs/cifs.ko
(do you have that file?)

Keep in mind that there are (as you mentioned) multiple protocols, and perhaps some of those have different dependencies, but if the module were configured through the usual kernel Kconfig system using a feature editor, then this should be taken care of. But the first step is to see if you have the basics. If you have a config item of “CONFIG_CIFS” it seems most of what you need should already be there.

max@nano2:~$ zcat /proc/config.gz | grep -i cifs

CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
# CONFIG_CIFS_WEAK_PW_HASH is not set
# CONFIG_CIFS_UPCALL is not set
# CONFIG_CIFS_XATTR is not set
CONFIG_CIFS_DEBUG=y
# CONFIG_CIFS_DEBUG2 is not set
# CONFIG_CIFS_DFS_UPCALL is not set
# CONFIG_CIFS_SMB2 is not set
# CONFIG_CIFS_SYSFS is not set

max@nano2:~$ sudo ls /lib/modules/4.9.253-tegra/

build kernel modules.alias modules.alias.bin modules.builtin modules.builtin.bin modules.dep modules.dep.bin modules.devname modules.order modules.softdep modules.symbols modules.symbols.bin

i’ve got the latest pretty much vanilla nano image

wouldn’t it be more productive if Nvidia just fixes it

the repro is above

my workaround for now:

-) enable smb1 on NAS (was off)
-) addjust /etc/fstab:
	//azkaban/nano /mnt/nano cifs user=sirius,pass=black,vers=1.0,x-systemd.automount 0 0

and oh by the way it’s a security issue with nano

The above is only the parent directory to the module content. What do you see from:
find /lib/modules/2.9.253-tegra/kernel -type f

Or to narrow it, you could filter to show only some of the content:

find /lib/modules/2.9.253-tegra/kernel -type f | egrep -i '(cifs|samba)'

Note that I do not know what is actually required for your case, but is it possible you need to enabel “# CONFIG_CIFS_SMB2 is not set”? I am just speculating that newer CIFS might default to also using SMB2, but I have not researched. Your comment on enabling smb1 on the NAS is why I think maybe you need the kernel module for SMB2.

max@nano2:~$ find /lib/modules/4.9.253-tegra/kernel -type f | egrep -i ‘(cifs|samba)’
/lib/modules/4.9.253-tegra/kernel/fs/cifs/cifs.ko

This means it is possible to load the cifs driver in the form of a module. What I don’t know is if there is another version of this for a different/newer protocol. For example, is “CONFIG_CIFS_SMB2” a newer or older protocol? I have no idea if this is needed for your case.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.