User CIFS Mounts Suddenly Not Working

Greetings Tumbleweed Community,

I have been on travel for a bit and didn’t use my machine for the past 3 weeks. Upon return, I updated my TW system and my user CIFS mounts are now not working and I am unsure why. I have details below. Any recommendations are appreciated. Thank you! I looked and did not find other forum entries that aligned with this; my apologies if I missed something.

[Message from Terminal when Entering]

> cd /slash-johndoe/ 
bash: cd: /slash-johndoe/: No such device

[Relevant fstab]

//nas/slash-smb                            /slash-johndoe         cifs   vers=default,sec=ntlmssp,credentials=/root/mnt/smb-johndoe.cred,uid=1000,gid=8888,dir_mode=0750,file_mode=0750,x-systemd.automount,x-systemd.mount-timeout=10  0  0

[Relevant /etc/hosts]

192.168.1.11  nas

[Relevant credentials]

> sudo cat /root/mnt/smb-johndoe.cred 
[sudo] password for root:  
username=johndoe
password=nope 
domain=local

[Relevant dmesg output]

> dmesg | grep -i cifs 
  164.823334] Key type **cifs**.spnego registered 
  164.823342] Key type **cifs**.idmap registered 
  164.823932] **CIFS**: Attempting to mount \
as\slash-smb 
  164.862548] **CIFS**: VFS: **cifs**_mount failed w/return code = -22 
  164.867897] **CIFS**: Attempting to mount \
as\slash-smb 
  164.903734] **CIFS**: VFS: **cifs**_mount failed w/return code = -22

[Me Trying to Get More Error Information]

> > sudo umount /slash-johndoe  
> sudo mount --verbose /slash-johndoe/ 
mount.cifs kernel mount options: ip=192.168.1.11,unc=\
as\slash-smb,vers=default,sec=ntlmssp,dir_mode=0750,
file_mode=0750,uid=1000,gid=4200,user=johndoe,domain=local,pass=**** 
mount error(22): Invalid argument 
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

Kind regards,
iqgrande

Reads like this thread:

https://forums.opensuse.org/showthread.php/572342-CIFS-mount-fails-with-kernel-5-18-9-1-default?highlight=cifs_mount+-22

See if this helps…

https://forums.opensuse.org/showthread.php/572342-CIFS-mount-fails-with-kernel-5-18-9-1-default?p=3140852#post3140852

Specifically…

Something to try: Does specifying “vers=2.0” or “vers=3.02” in the mount command work for you?

Yes, both vers options appeared to have addressed this. Is this a kernel regression that will be fixed eventually (so I can go back to vers=default eventually)? That’s how I interpreted those threads, but I want to make sure I didn’t misread anything. Thanks again and my apologies for missing that thread. I put my question under “Network/Internet” whereas the solution was under “Install/Boot/Login”… I can see the justification for putting it under both. Should these sorts of questions fall under the former or the latter (just so I make sure I am looking/posting in the right location)?

All good. Glad to have been of guidance.

I put my question under “Network/Internet” whereas the solution was under “Install/Boot/Login”… I can see the justification for putting it under both. Should these sorts of questions fall under the former or the latter (just so I make sure I am looking/posting in the right location)?

Not a network related issue…the “Install/Boot/Login” probably best given that it is for

Questions about installation, login, boot issues, partitioning, file systems, software that runs at boot (GRUB, LILO, boot scripts)

Yes, I’d expect once the fix is in place, using “vers=default” should work reliably as it did previously.

The manpage (man mount.cifs) states…

default - Tries to negotiate the highest SMB2+ version supported by both the client and server.

You obviously know the maximum version supported by //nas/slash-smb. Thus the most robust option is specifying this number instead of negotiating.

Putting everything into one line of /etc/fstab is a handy feature. Use it if it works. But troubleshooting and maintenance can be cumbersome. For utmost robustness and ease of maintenance consider the use of local services defined in /etc/systemd These take precedence over vendor settings.

For illustration purposes I converted the following mount to a systemd unit:

//fritz.box/FRITZ.NAS                      /fritz.box              cifs   noauto,username=ftpuser,vers=1.0  0  0
[FONT=monospace]**erlangen:~ #** systemctl cat fritz.box.mount                   
**# /etc/systemd/system/fritz.box.mount**
[Mount] 
What=//fritz.box/FRITZ.NAS 
Where=/fritz.box 
Type=cifs 
Options=credentials=/root/fritz.box.credentials,vers=1.0 
**erlangen:~ #**[/FONT]

Adding automount capability is straight forward:

**erlangen:~ #** systemctl cat fritz.box.automount  
**# /etc/systemd/system/fritz.box.automount**
[Automount]  
Where=/fritz.box 
TimeoutIdleSec=1min 
**erlangen:~ #** 

To my experience local services readily survive hundreds of distribution upgrades and are less prone to failure caused by sloppy development.

Total nonsense, and not relevant to the reported issue in any way.