You are not logged in.

#1 2022-03-31 17:29:39

DaMastah
Member
Registered: 2022-03-31
Posts: 5

[SOLVED] CIFS mounting problems with kernel 5.17.1

Hi, since I've updated to kernel 5.17.1 it's been impossible for me to mount any CIFS shares.

The errors I'm getting when mounting are very cryptic and I can't find much relevant help on google :
mount error(40): Too many levels of symbolic links
CIFS: VFS: cifs_mount failed w/return code = -40

I reverted to the 5.16.16 kernel and everything is working 100% fine with it so I was wondering if other people were having the same problem with the 5.17.1 kernel or if it is caused by some weird specific thing on my end.

For full disclosure my setup is pretty standard :
- Remote samba shares are on a Synology NAS running DSM 6.2.4-25556 Update 5 (latest version for my hardware)
- Mounting done with /etc/fstab : //redacted_ip/share         /mnt/share      cifs    rw,noperm,credentials=/etc/nas.credentials,vers=3.0,_netdev,x-systemd.requires=systemd-resolved.service.  0.  0
- No symbolic links used on the share or in /mnt
- Fully updated system

Any input will be greatly appreciated !

Last edited by DaMastah (2022-04-01 15:34:46)

Offline

#2 2022-04-01 06:01:37

crondrift
Member
Registered: 2021-03-29
Posts: 8

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

I've got the same problem - I can't access samba shares within thunar anymore.

However...mounting via commandline with "mount -t cifs //server/share ~/server/share -o username=xxx,password=xxx,uid=1000,gid=1000" for example still works.

I'm using Kernel 5.17.1-arch1-1

Offline

#3 2022-04-01 06:29:19

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

I've got the same problem - I can't access samba shares within thunar anymore.

No, you dont.
https://bbs.archlinux.org/viewtopic.php?id=275179

@DaMastah

mount.cifs --verbose //redacted_ip/share /mnt/share -o rw,noperm,credentials=/etc/nas.credentials,vers=3.0

errno 40 is ELOOP and typically caused by cyclic references - typically symlinks.

From the code history, try passing "nodfs" - does the NAS itself mount remote shares?

Offline

#4 2022-04-01 07:14:12

crondrift
Member
Registered: 2021-03-29
Posts: 8

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

seth wrote:

I've got the same problem - I can't access samba shares within thunar anymore.

No, you dont.
https://bbs.archlinux.org/viewtopic.php?id=275179

@seth
Ok, I should have said "similar" problem. Thanks for pointing me in the right direction.

Offline

#5 2022-04-01 07:48:28

DaMastah
Member
Registered: 2022-03-31
Posts: 5

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

seth wrote:

@DaMastah

mount.cifs --verbose //redacted_ip/share /mnt/share -o rw,noperm,credentials=/etc/nas.credentials,vers=3.0

errno 40 is ELOOP and typically caused by cyclic references - typically symlinks.


Updated to 5.17.1 again and tried mounting manually using the command you provided.
Output is :

mount.cifs kernel mount options: ip=redacted,unc=\\redacted\share,noperm,vers=3.0,user=redacted,pass=********
mount error(40): Too many levels of symbolic links
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
seth wrote:

From the code history, try passing "nodfs" - does the NAS itself mount remote shares?

Then tried to add the nodfs option :
Output is :

mount.cifs kernel mount options: ip=redacted,unc=\\redacted\share,noperm,vers=3.0,nodfs,user=redacted,pass=********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) 

NAS doesn't try to mount any remote shares, really basic setup.


Then tried the most basic mount command I could think of :

sudo mount.cifs --verbose //redacted/share test -o credentials=/etc/nas.credentials
mount.cifs kernel mount options: ip=redacted,unc=\\redacted\share,user=redacted,pass=********
mount error(40): Too many levels of symbolic links
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

Went back to 5.16.16 again, everything works perfectly with that kernel (or with every previous kernel : been on arch for years, first time I have such a problem)

It's driving me crazy. Really appreciate your help tho.

Last edited by DaMastah (2022-04-01 14:52:34)

Offline

#6 2022-04-01 14:26:52

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

Please replace the oversized images w/ links (the board has a 250x250 px limit rule)

Do you have a "Control Panel -> File services -> SMB -> Advanced Settings -> Enable MSDFS VFS module" setting on the NAS?

Offline

#7 2022-04-01 14:56:12

DaMastah
Member
Registered: 2022-03-31
Posts: 5

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

Sorry for the images. Thought img tags did some automatic resizing but was mistaken. I removed them.

Yes the NAS has this option checked but doesn’t have any symbolic links or mounts in any of the shares (all the shares mounts fail with 5.17.1).
I’ll disable this option and report after testing.

Offline

#8 2022-04-01 15:25:52

DaMastah
Member
Registered: 2022-03-31
Posts: 5

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

I disabled the “Enable MSDFS VFS module" setting on the Synology NAS and I’m pleased to report that everything works fine now with the 5.17.1 kernel.

For my undestanding, and because it used to work fine for years before, is it a problem with the 5.17 kernel or is it a bug on Synology’s end that stayed under the radar because the kernel didn’t implement dome feature before (the DFS feature I assume) ?

Thanks a lot for your help @seth !

Last edited by DaMastah (2022-04-01 15:26:09)

Offline

#9 2022-04-01 15:32:36

seth
Member
Registered: 2012-09-03
Posts: 50,983

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

is it a problem with the 5.17 kernel or is it a bug on Synology’s end

I've no idea - it could very much be a bug in synology, but since the kernel code is new, there's no guarantee that this isn't the buggy part - if there's a bug in the kernel, we'll however get more reports against other implementations.

You might want to file a bug against the kernel regardless (just to raise awareness there, idk enough to speculate what in the implementation might be broken)

Other than that, please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#10 2022-04-01 15:36:38

DaMastah
Member
Registered: 2022-03-31
Posts: 5

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

seth wrote:

is it a problem with the 5.17 kernel or is it a bug on Synology’s end

I've no idea - it could very much be a bug in synology, but since the kernel code is new, there's no guarantee that this isn't the buggy part - if there's a bug in the kernel, we'll however get more reports against other implementations.

You might want to file a bug against the kernel regardless (just to raise awareness there, idk enough to speculate what in the implementation might be broken)

Other than that, please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

I edited the subject, sorry for my noobness.
I’ll look now into filing a bug for this subject.

Thanks again.

Offline

#11 2022-04-04 11:14:31

pszafer
Member
Registered: 2015-01-22
Posts: 38

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

hi, please share link to bug reported upstream. I have same problem (but I do use DFS).

Offline

#12 2022-04-07 12:44:06

muhlinux
Member
Registered: 2019-11-19
Posts: 6

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

pszafer wrote:

hi, please share link to bug reported upstream. I have same problem (but I do use DFS).

https://bugzilla.kernel.org/buglist.cgi … esolution=---

related:

https://bugs.archlinux.org/task/74259
https://bbs.archlinux.org/viewtopic.php?id=275179


reverting to smbclient 4.15.6-1 solved it for now on my machine

Last edited by muhlinux (2022-04-07 13:56:01)

Offline

#13 2022-05-25 07:34:05

tanasis
Member
From: Delft
Registered: 2015-03-20
Posts: 6

Re: [SOLVED] CIFS mounting problems with kernel 5.17.1

I am having the same issue. Also reported in stack exchange (https://unix.stackexchange.com/q/697466/189868) in order to look for someone to know how to debug it further.

Two things restore functionality for me (as also stated by others):
- Reverting to < 5.17 kernel restores functionality for me - with MSDFS VFS module enabled.
- Using > 5.16 but disabling "Control Panel -> File services -> SMB -> Advanced Settings -> Enable MSDFS VFS module"

Last edited by tanasis (2022-05-25 07:34:58)

Offline

Board footer

Powered by FluxBB