You are not logged in.
Hello everybody,
I have looked through a lot of webpages, forums and so on, but couldn't find a real solution.
So, my question is:
How can I configure a CIFS mount in fstab in a way that it doesn't freeze my filemanager (Thunar under XFCE) when the Samba server isn't reachable?
I have experimented with Systemd Automount, but as far as I understand it, it just waits (x-systemd.device-timeout=10s) at boot or it unmounts a mountpoint when idle (x-systemd.idle-timeout=60s).
For example, two versions of my configurations in /etc/fstab:
First, without Systemd Automount:
//ip-address/data /media/data cifs noauto,nofail,user,rw,iocharset=utf8,vers=3.0,_netdev 0 0
Second, with Automount:
//ip-address/data /media/data cifs x-systemd.automount,x-systemd.device-timeout=30,x-systemd.idle-timeout=60,retry=0,rw,iocharset=utf8,vers=3.0,soft 0 0
Both variants freeze Thunar, when the server isn't reachable.
So, how can I configure a timeout to avoid that?
Thanks in advance!
Offline
"soft" is supposed to be the default anyway. Does the problem go beyond thunar? Ie. do you get hangs when trying to "ls /media/data"?
Also please clarify the scenario. Is it that the server is temporarily unreachable (because it's windows and just BSOD'd :-P) or is it because you're not in the same subnet? (Eg. this is a server at your home, but you're at at your office now and therefore the server isn't reachable?)
In the latter case: what's the actual IP (if it's a private range like 192.168.0.0/16, you're not exposing anything secret here) and what's the output of "ip a" and "ip r" at the failing location?
Online
"soft" is supposed to be the default anyway. Does the problem go beyond thunar? Ie. do you get hangs when trying to "ls /media/data"?
Yes it goes beyond Thunar. ls hangs, so it seems to be not only a Thunar problem.
Also please clarify the scenario. Is it that the server is temporarily unreachable (because it's windows and just BSOD'd :-P) or is it because you're not in the same subnet? (Eg. this is a server at your home, but you're at at your office now and therefore the server isn't reachable?)
It's the first scenario. The server is temporarily unreachable (it's not Windows, Samba runs on LibreELEC on a Raspberry Pi 4 and an external harddrive and sometimes it is switched off, while the client (Thinkpad) is still running).
In the latter case: what's the actual IP (if it's a private range like 192.168.0.0/16, you're not exposing anything secret here) and what's the output of "ip a" and "ip r" at the failing location?
Yes, everything is in a provate IP range (192.168.1.0/24).
Offline
You could try to lower the echo_interval (defaults to 60 seconds) to increase the detection of the broken connection.
Online
Typically I use this format - it helps with a faster reboot also.
defaults,nofail,x-systemd.device-timeout=10ms 0 0
Supercalifragilisticexpialidocious
Offline