CIFS Mount Fails with SMB2

I’m running:

SUSE Linux Enterprise Server 12 SP2 (x86_64)

Kernel:

4.4.90-92.45-default

When trying to mount a CIFS mount via the kernel:

[FONT=Courier New]# mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,sec=ntlm,vers=2.0
# mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,vers=2.0
# mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,sec=ntlm
[/FONT][/CODE]

All the above come back with the following error:

[CODE][FONT=Courier New]mount error(38): Function not implemented[/FONT][/CODE]

When doing it via smbmount:

[CODE][FONT=Courier New]# smbclient -U username -L fsserver01[/FONT][/CODE]

It comes back successful:

[CODE][FONT=Courier New]Domain=[ADDOMAIN] OS=[] Server=[]

        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        E$              Disk      Default share
        F$              Disk      Default share
        FS01        Disk
        FS02          Disk
        FS03            Disk
        Users           Disk
Domain=[ADDOMAIN] OS=[] Server=[]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------                 -------
[/FONT][/CODE]

Samba package version:

[CODE][FONT=Courier New]samba-client-4.4.2-38.11.2.x86_64[/FONT][/CODE]


Kernel has the CIFS module loaded, and all dependencies:

[CODE][FONT=Courier New]# modinfo /lib/modules/4.4.90-92.45-default/kernel/fs/cifs/cifs.ko
filename:       /lib/modules/4.4.90-92.45-default/kernel/fs/cifs/cifs.ko
version:        2.08
description:    VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license:        GPL
author:         Steve French <sfrench@us.ibm.com>
alias:          fs-cifs
srcversion:     2AF88CFDEC6299D515740A6
depends:        fscache,dns_resolver
supported:      yes
intree:         Y
vermagic:       4.4.90-92.45-default SMP mod_unload modversions
signer:         SUSE Linux Enterprise Secure Boot Signkey
sig_key:        3F:B0:77:B6:CE:BC:6F:F2:52:2E:1C:14:8C:57:C7:77:C7:88:E3:E7
sig_hashalgo:   sha256
parm:           CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)
parm:           cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (uint)
parm:           cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (uint)
parm:           cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (uint)
parm:           enable_oplocks:Enable or disable oplocks. Default: y/Y/1 (bool)


[/FONT][/CODE]


My fstab looks like:

[CODE][FONT=Courier New]# cat /etc/fstab

//111.111.111.111/fs/share /home/fsshare cifs credentials=/etc/smbcredentials,sec=ntlm,vers=2.0 0 0[/FONT][/CODE]


When mounting from the kernel it's really not using the /etc/samba/smb.conf file, so I don't see the need to post the config I have in here, but I have modified it to support SMB2 anyway.

From dmesg:

[CODE][FONT=Courier New][   14.430308] FS-Cache: Loaded
[   14.432507] Key type dns_resolver registered
[   14.507554] FS-Cache: Netfs 'cifs' registered for caching
[   14.507570] Key type cifs.spnego registered
[   14.507574] Key type cifs.idmap registered
[ 2475.448163] CIFS VFS: cifs_mount failed w/return code = -38
[ 2477.818137] CIFS VFS: cifs_mount failed w/return code = -38
[ 4148.184334] CIFS VFS: cifs_mount failed w/return code = -38
[ 4417.242655] CIFS VFS: cifs_mount failed w/return code = -38
[ 4437.198403] CIFS VFS: cifs_mount failed w/return code = -38
[ 4450.775798] CIFS VFS: cifs_mount failed w/return code = -38
[ 5123.222373] CIFS VFS: cifs_mount failed w/return code = -38
[ 5139.037057] CIFS VFS: cifs_mount failed w/return code = -38
[ 5172.597851] CIFS VFS: cifs_mount failed w/return code = -38
[/FONT]

Our Windows Fileshare is locked down to only do SMB2, but the support should be there with the kernel version we have running, along with SLES 12 SP2. Just doesn’t make sense.

Any help would be great =)

On 16/11/17 06:04, beeceeog wrote:
[color=blue]

I’m running:

SUSE Linux Enterprise Server 12 SP2 (x86_64)

Kernel:

4.4.90-92.45-default

When trying to mount a CIFS mount via the kernel:

Code:

mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,sec=ntlm,vers=2.0

mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,vers=2.0

mount.cifs //111.1.111.111.111/fs/share /home/fsshare -o credentials=/etc/smbcredentials,sec=ntlm


All the above come back with the following error:

Code:

 mount error(38): Function not implemented

--------------------[/color]

Given your /etc/fstab later on in your post shouldn’t the above
mount.cifs commands all be trying to mount //111.111.111.111/… not
//111.1.111.111.111/… or are they just typos when munging real IP
addresses for posting?
[color=blue]

When doing it via smbmount:

Code:

 # smbclient -U username -L fsserver01

It comes back successful:

Code:

 Domain=[ADDOMAIN] OS=[] Server=[]

Sharename Type Comment


ADMIN$ Disk Remote Admin
C$ Disk Default share
E$ Disk Default share
F$ Disk Default share
FS01 Disk
FS02 Disk
FS03 Disk
Users Disk
Domain=[ADDOMAIN] OS= Server=

Server Comment


Workgroup Master



Samba package version:

Code:

 samba-client-4.4.2-38.11.2.x86_64

Kernel has the CIFS module loaded, and all dependencies:

Code:

 # modinfo /lib/modules/4.4.90-92.45-default/kernel/fs/cifs/cifs.ko

filename: /lib/modules/4.4.90-92.45-default/kernel/fs/cifs/cifs.ko
version: 2.08
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba and Windows
license: GPL
author: Steve French sfrench@us.ibm.com
alias: fs-cifs
srcversion: 2AF88CFDEC6299D515740A6
depends: fscache,dns_resolver
supported: yes
intree: Y
vermagic: 4.4.90-92.45-default SMP mod_unload modversions
signer: SUSE Linux Enterprise Secure Boot Signkey
sig_key: 3F:B0:77:B6:CE:BC:6F:F2:52:2E:1C:14:8C:57:C7:77:C7:88:E3:E7
sig_hashalgo: sha256
parm: CIFSMaxBufSize:Network buffer size (not including header). Default: 16384 Range: 8192 to 130048 (uint)
parm: cifs_min_rcv:Network buffers in pool. Default: 4 Range: 1 to 64 (uint)
parm: cifs_min_small:Small network buffers in pool. Default: 30 Range: 2 to 256 (uint)
parm: cifs_max_pending:Simultaneous requests to server. Default: 32767 Range: 2 to 32767. (uint)
parm: enable_oplocks:Enable or disable oplocks. Default: y/Y/1 (bool)


My fstab looks like:

Code:

 # cat /etc/fstab

//111.111.111.111/fs/share /home/fsshare cifs credentials=/etc/smbcredentials,sec=ntlm,vers=2.0 0 0

When mounting from the kernel it’s really not using the
/etc/samba/smb.conf file, so I don’t see the need to post the config I
have in here, but I have modified it to support SMB2 anyway.[/color]

Do you have “unix extensions” set to anything in the [Global] section of
your smb.conf file?
[color=blue]

From dmesg:

Code:

 [   14.430308] FS-Cache: Loaded

[ 14.432507] Key type dns_resolver registered
[ 14.507554] FS-Cache: Netfs ‘cifs’ registered for caching
[ 14.507570] Key type cifs.spnego registered
[ 14.507574] Key type cifs.idmap registered
[ 2475.448163] CIFS VFS: cifs_mount failed w/return code = -38
[ 2477.818137] CIFS VFS: cifs_mount failed w/return code = -38
[ 4148.184334] CIFS VFS: cifs_mount failed w/return code = -38
[ 4417.242655] CIFS VFS: cifs_mount failed w/return code = -38
[ 4437.198403] CIFS VFS: cifs_mount failed w/return code = -38
[ 4450.775798] CIFS VFS: cifs_mount failed w/return code = -38
[ 5123.222373] CIFS VFS: cifs_mount failed w/return code = -38
[ 5139.037057] CIFS VFS: cifs_mount failed w/return code = -38
[ 5172.597851] CIFS VFS: cifs_mount failed w/return code = -38


Our Windows Fileshare is locked down to only do SMB2, but the support
should be there with the kernel version we have running, along with SLES
12 SP2. Just doesn’t make sense.

Any help would be great =)[/color]

Are you able to try with SLES12 SP3? It includes a later version of the
samba client (4.6.5) than is available for SLES12 SP2.

HTH.

Simon
SUSE Knowledge Partner


If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.

Yes, just typos when munging real ips

[QUOTE=smflood;40236]

Do you have “unix extensions” set to anything in the [Global] section of
your smb.conf file?[/QUOTE]

This is my samba config:

#cat /etc/samba/smb.conf [global] workgroup = ADDOMAIN realm = ADDOMAIN.NET server max protocol = SMB3 server min protocol = SMB2 client max protocol = SMB3 client min protocol = SMB2 client signing = yes client use spnego = yes client ldap sasl wrapping = sign kerberos method = secrets and keytab security = ads

I can add in the “unix extension” line in the config, but smbclient is actually working, making a successful connection to the FS. It’s when it tries to mount it via the kernel via /etc/fstab or mount.cifs is where it fails (this doesn’t seem to use the samba config at all?)

Not yet, but I will run up an instance of SLES12 SP3 and let you know the results? I thought the SP2 kernels 3.x and over has support for SMB2?

For those who may have also come across this issue with mounting SMB2.0/3.0 via cifs on SUSE 12 SP2, an install of SP3 didn’t work.

What did work, is the new patch cluster SUSE released Jan 2018, that had the following packages:

cifs-utils-6.5-9.3.2.x86_64

kernel-default-4.4.103-92.56.1.x86_64

samba-4.4.2-38.14.1.x86_64
samba-client-32bit-4.4.2-38.14.1.x86_64
samba-client-4.4.2-38.14.1.x86_64
samba-libs-32bit-4.4.2-38.14.1.x86_64
samba-libs-4.4.2-38.14.1.x86_64
samba-winbind-32bit-4.4.2-38.14.1.x86_64
samba-winbind-4.4.2-38.14.1.x86_64

These updates were deployed to the server I had a problem with (that wouldn’t mount samba 2.0), and after a reboot, magic, cifs mount for SMB2 working (no config changes).

I’m still running SUSE 12 SP2 enterprise. What ever magic was in the above packages, if fixed my problem. Thanks!