You are not logged in.

#1 2025-07-02 22:41:36

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

[SOLVED] CIFS mount loses connection on smbd restart

I have an Arch machine mounting a samba folder via CIFS:

mount -t cifs -o username="artvandelay",password="bosco",uid=1000,gid=1000,dir_mode=0755,file_mode=0644,port=12345,nosharesock,actimeo=30 //vandelayindustries.com/latex /home/art/latex

(domain and credentials are fictional wink)

Samba server is running on Alpine (smbd).

When I restart smbd on the server (rc-service samba restart), the CIFS mounted folder just dies and is unable to reestablish connection:

ls: latex: Host is down

I tried downgrading cifs-utils and linux(-lts), it didn't help.

I'm sure this worked before, and it does on Alpine CIFS client to Alpine SMB server.

Last edited by karabaja4 (2026-03-25 00:38:47)

Offline

#2 2025-07-03 05:27:06

-thc
Member
Registered: 2017-03-15
Posts: 1,116

Re: [SOLVED] CIFS mount loses connection on smbd restart

I was unable to reproduce this behavior with an Arch client and a Debian Samba server and your mount options.

This looks not like an Arch issue to me.

Offline

#3 2025-07-03 07:13:43

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,274

Re: [SOLVED] CIFS mount loses connection on smbd restart

ls: latex: Host is down

Have you tried to nmap the server to see whether that's true (for the relevant ports, 137-139 + 445)
Firewall?

Online

#4 2025-07-03 07:54:04

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

Re: [SOLVED] CIFS mount loses connection on smbd restart

seth wrote:

ls: latex: Host is down

Have you tried to nmap the server to see whether that's true (for the relevant ports, 137-139 + 445)
Firewall?

It's a custom port (12345), and no, it's not true, the server is up, port is open and it's accessible from non-Arch clients. I can also umount and remount on the Arch client and the mounted folder works again.

Last edited by karabaja4 (2025-07-03 07:59:03)

Offline

#5 2025-07-03 08:00:07

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,274

Re: [SOLVED] CIFS mount loses connection on smbd restart

DId you

nmap latex

?
Might also be a DNS problem, notably if you relying on https://wiki.archlinux.org/title/Samba# … host_names

Online

#6 2025-07-03 08:08:01

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

Re: [SOLVED] CIFS mount loses connection on smbd restart

"latex" is a directory name, it's how ls reports a disconnected host on a mounted folder.

~ >> nmap -p 12345 vandelayindustries.com
Starting Nmap 7.97 ( https://nmap.org ) at 2025-07-03 10:04 +0200
Nmap scan report for vandelayindustries.com (*.*.*.*)
Host is up (0.021s latency).
rDNS record for *.*.*.*: static.*.*.*.*.clients.your-server.de

PORT      STATE SERVICE
12345/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 0.61 seconds
~ >> ls
ls: cannot access 'latex': Host is down
umount latex
mount -t cifs ... latex

... and everything works again.

I'm not relying on DNS, it also happens when I mount via IP directly.

Last edited by karabaja4 (2025-07-03 08:08:46)

Offline

#7 2025-07-03 08:36:50

-thc
Member
Registered: 2017-03-15
Posts: 1,116

Re: [SOLVED] CIFS mount loses connection on smbd restart

Older posts specifically mentioning "Host is down" point to a SMB protocol mismatch error.

Can you verify the working CIFS mount protocol version via

mount

?

Offline

#8 2025-07-07 00:51:06

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

Re: [SOLVED] CIFS mount loses connection on smbd restart

Protocol is SMB3_11 in all cases (I tried to force it on both ends, but it also auto-negotiates it without forcing it).

New information:

Happens only when a custom port is used (12345 in the example above), does not happen when default (445) port is used.
Not an Arch specific issue, actually happens on Alpine to Alpine on 6.12.35 kernels, that was a mistake in my testing.
There is no issue with Arch 6.6.72 kernel on the client (!). So it's some kind of kernel regression.

For now I probably won't be disecting the kernel, I'll just write a cron or something to remount when a disconnect happens or use a default port.

Last edited by karabaja4 (2025-07-07 00:55:17)

Offline

#9 2025-07-07 06:12:59

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,274

Re: [SOLVED] CIFS mount loses connection on smbd restart

https://wiki.archlinux.org/title/Fstab# … ile_system ?

Is it actually the older kernel or rather (also?) an older https://archlinux.org/packages/extra/x86_64/cifs-utils/ ?

Edit: custom port aside, https://github.com/torvalds/linux/commi … 7de0577a1d looks interesting

Last edited by seth (2025-07-07 06:14:35)

Online

#10 2025-07-07 07:57:52

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

Re: [SOLVED] CIFS mount loses connection on smbd restart

seth wrote:

Is it actually the older kernel or rather (also?) an older https://archlinux.org/packages/extra/x86_64/cifs-utils/ ?

Kernel only.

pacman -U https://archive.archlinux.org/packages/l/linux-lts/linux-lts-6.6.72-1-x86_64.pkg.tar.zst

Offline

#11 2026-03-25 00:38:31

karabaja4
Member
From: Croatia
Registered: 2008-09-14
Posts: 1,044
Website

Re: [SOLVED] CIFS mount loses connection on smbd restart

Well this finally fixed with 6.19.9 smile

commit 982d643dc05c6947605e379b13eab9891f6297a7
Author: Henrique Carvalho <henrique.carvalho@suse.com>
Date:   Wed Mar 11 20:17:23 2026 -0300

    smb: client: fix iface port assignment in parse_server_interfaces
    
    commit d4c7210d2f3ea481a6481f03040a64d9077a6172 upstream.
    
    parse_server_interfaces() initializes interface socket addresses with
    CIFS_PORT. When the mount uses a non-default port this overwrites the
    configured destination port.
    
    Later, cifs_chan_update_iface() copies this sockaddr into server->dstaddr,
    causing reconnect attempts to use the wrong port after server interface
    updates.
    
    Use the existing port from server->dstaddr instead.
    
    Cc: stable@vger.kernel.org
    Fixes: fe856be475f7 ("CIFS: parse and store info on iface queries")
    Tested-by: Dr. Thomas Orgis <thomas.orgis@uni-hamburg.de>
    Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
    Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Offline

Board footer

Powered by FluxBB