gdh
16 December 2020 20:18
1
Hi folks,
I mounted an smb share via systemd mount units.
Mounts are working but that 2nd Qnap folder is every 20-40s disappearing for 1-2 seconds.
it looks odd to me, that there is a folder and even more that it does this disappear/appearing thing all the time.
home-desktop-Qnap.mount file in /etc/systemd/system:
[Unit]
Description=FreeNas Mount
After=network.target
[Mount]
What=//192.168.0.119/Qnap
Where=/home/desktop/Qnap
Type=cifs Options=_netdev,iocharset=utf8,rw,file_mode=0777,dir_mode=0777,credentials=/home/desktop/.smbpasswd
TimeoutSec=30
[Install]
WantedBy=multi-user.target
and the automount file:
[Unit]
Description=Automount freenas home-desktop-Qnap.mount
ConditionPathExists=/home/desktop/Qnap
[Automount]
Where=/home/desktop/Qnap
TimeoutIdleSec=10
[Install]
WantedBy=multi-user.target
gdh
19 December 2020 10:06
2
is any information missing?
Hello @gdh
Have look here:
TimeoutIdleSec=
Configures an idle timeout. Once the mount has been idle for the specified time, systemd will attempt to unmount. Takes a unit-less value in seconds, or a time span value such as ā5min 20sā. Pass 0 to disable the timeout logic. The timeout is disabled by default.
https://www.freedesktop.org/software/systemd/man/systemd.automount.html
Idle means: If nothing is working on that connection, it will unmount it and therefore it disappeared.
1 Like
gdh
20 December 2020 17:06
4
jep, switching to TimeoutIdleSec=0 in automount file seems to did the trick!
Thanks a lot.
system
Closed
4 January 2021 17:06
5
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.