Thunar daemon remounting cifs systemd automount folder itself after unmounted
Version information
Thunar 4.20 Debian 12
Prerequisites
You must have an automount systemd service started and pointing to a shared folder :
/etc/systemd/system/mnt-share.mount
:
[Unit]
Description=
[Mount]
What=//Remote/Share
Where=/mnt/share
Options=noauto,username=\*\*\*\*\*,password=\*\*\*\*\*\*\*
Type=cifs
TimeoutSec=10
ForceUnmount=true
[Install]
WantedBy=multi-user.target
/etc/systemd/system/mnt-share.automount
:
[Unit]
Description=Automount Share
[Automount]
Where=/mnt/share
TimeoutIdleSec=30
[Install]
WantedBy=multi-user.target
Steps to reproduce
- Open cifs share mount with Thunar
- close window
- observe remounting loop after unmounting :
systemd[1]: Unmounting mnt-share.mount
systemd[1]: mnt-share.mount: Deactivated successfully.
systemd[1]: Unmounted mnt-share.mount
systemd[1]: mnt-share.automount: Got automount request for /mnt/share, triggered by 998 (gmain)
systemd[1]: Mounting mnt-share.mount kernel: CIFS: Attempting to mount \\Remote\\Share
systemd[1]: Mounted mnt-share.mount
systemd[1]: Unmounting mnt-share.mount
systemd[1]: mnt-share.mount: Deactivated successfully.
systemd[1]: Unmounted mnt-share.mount
systemd[1]: mnt-share.automount: Got automount request for /mnt/share, triggered by 998 (gmain)
systemd[1]: Mounting mnt-share.mount kernel: CIFS: Attempting to mount \\Remote\\Share
systemd[1]: Mounted mnt-share.mount
Current behavior
System is unmounting and mounting shared folder indefinitely until crashing. Does not occur if Thunar daemon is not used.
Expected outcome
As in Thunar 4.18 version (tested), folder is mounted when accessing with Thunar and unmounted if not used.
See discussion : https://bbs.archlinux.org/viewtopic.php?id=302253
Edited by Theo Linkspfeifer