New: CIFS mount shows only "vers=default" instead of specific SMB version
Subsystems (2)
https://bugzilla.samba.org/show_bug.cgi?id=14521
Bug ID: 14521
Summary: CIFS mount shows only "vers=default" instead of
specific SMB version
Product: CifsVFS
Version: 4.x
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5
Component: kernel fs
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
Target Milestone: ---
/proc/mounts and the mount command don't show the auto negotiated version after mounting with vers=default (or without specifying vers=).
Instead /proc/mounts just says vers=default.
Client OS: openSUSE-LEAP-15.2 with Linux-5.3
This non-public bug seems to be similar.
(I don't habe a RedHat license, so I can't see the details)
https://access.redhat.com/solutions/4592681
I was only able to reproduce with Windows Server 2012.
A Windows Server 2008 and Samba-4.6 (openSUSE-LEAP-42.3) work fine. (e.g. /proc/mounts shows vers=3.11)
Workaround with some help from:
https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting
echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control echo 7 > /proc/fs/cifs/cifsFYI
mount -t cifs ...
dmesg | grep -E 'cifs.*[123]\.[0-9]'
# -> negotiated smb3.02 dialect
So for me it's actually 3.02 what's been negotiated with Windows Server 2012.
P.S.
"man mount.cifs" may seem a little ambiguous about the vers=default behavior. Quote:
==========
SMB protocol version. Allowed values are:
[...]
- default - Tries to negotiate the highest SMB2+ version supported by both
the client and server.
[...]
The default since v4.13.5 is for the client and server to negotiate the highest possible version greater than or equal to ``2.1``. In kernels prior to v4.13, the default was ``1.0``. For kernels between v4.13 and v4.13.5 the default is ``3.0``.
==========
The first one sound more like 2.0 <= vers < 3.0.
While the second sounds more like 2.1 <= version (without upper limit). To me it looks like the second (2.1 <= version) is what's actually implemented (at least with Linux-5.3 on openSUSE-LEAP-15.2).
Signature · 2 lines
You are receiving this mail because: You are the QA Contact for the bug.
[Bug 14521] CIFS mount shows only "vers=default" instead of specific SMB version
https://bugzilla.samba.org/show_bug.cgi?id=14521
Aurélien Aptel <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Aurélien Aptel <[email protected]> --- Just to make sure I get this right:
With the same version of the kernel (openSUSE-LEAP-15.2 with Linux-5.3), when you mount with vers=default:
- a Windows Server 2012 share you see vers=3.11 in /proc/mounts
- anything else you see vers=default in /proc/mounts
And you are expecting the see the explicit version instead of default. Is that right?
As a side note, if you just need to version you can look at /proc/fs/cifs/DebugData. It will list all currently active connections along with their version as "Dialect":
# mount.cifs //foo/bar ....
# grep Dialect /proc/fs/cifs/DebugData
Number of credits: 407 Dialect 0x311 signed=> 0x311 is 3.1.1
Signature · 2 lines
You are receiving this mail because: You are the QA Contact for the bug.