Your message dated Wed, 19 Jan 2022 10:10:35 +0100
with message-id <ff7e711b-42e9-b7bc-7677-8740f4d3e...@debian.org>
and subject line Re: Bug#821944 [systemd] automounts not unmounted after timeout
has caused the Debian Bug report #821944,
regarding [systemd] automounts not unmounted after timeout
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
821944: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821944
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: systemd
Version: 229-4
Severity: normal

--- Please enter the report below this line. ---

I have an automount configured so that it should unmount after 300s, but it is
not unmounted:

From man systemd.automount:
TimeoutIdleSec=
           Configures an idle timeout. Once the mount has been idle for the
           specified time, systemd will attempt to unmount.

 % cat /etc/systemd/system/mnt-vdr.automount
[Unit]
Description=VDR recordings
ConditionPathExists=/mnt/vdr
Wants=network.target
After=network.target

[Automount]
Where=/mnt/vdr
TimeoutIdleSec=300

[Install]
WantedBy=multi-user.target

% mount | grep vdr
systemd-1 on /mnt/vdr type autofs
(rw,relatime,fd=38,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) 

% cd /mnt/vdr markus@zem % mount | grep vdr
systemd-1 on /mnt/vdr type autofs
(rw,relatime,fd=38,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
vdr:/srv/share/vdr on /mnt/vdr type nfs
(rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.178.47,mountvers=3,mountport=48705,mountproto=tcp,local_lock=none,addr=192.168.178.47)

% cd ~ 
% sleep 400; mount | grep vdr
systemd-1 on /mnt/vdr type autofs
(rw,relatime,fd=38,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
vdr:/srv/share/vdr on /mnt/vdr type nfs
(rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.178.47,mountvers=3,mountport=48705,mountproto=tcp,local_lock=none,addr=192.168.178.47)

So after 400s it's still mounted. I guarantee that no other process
accessed /mnt/vdr in that time.

--- System information. ---
Architecture: amd64
Kernel:       Linux 4.4.0-1-amd64

Debian Release: stretch/sid
  700 testing         www.deb-multimedia.org 
  700 testing         security.debian.org 
  700 testing         ftp2.de.debian.org 
  600 unstable        ftp2.de.debian.org 
  500 utopic          ppa.launchpad.net 
  500 saucy           ppa.launchpad.net 
  500 grml-testing    deb.grml.org 

--- Package information. ---
Depends                         (Version) | Installed
=========================================-+-==================
libacl1                     (>= 2.2.51-8) | 2.2.52-3
libaudit1                    (>= 1:2.2.1) | 
libblkid1                     (>= 2.17.2) | 
libcap2                       (>= 1:2.10) | 
libcryptsetup4               (>= 2:1.4.3) | 
libdbus-1-3                    (>= 1.1.1) | 
libkmod2                          (>= 5~) | 
libpam0g                    (>= 0.99.7.1) | 
libselinux1                    (>= 2.1.9) | 
libsystemd-journal0             (= 208-8) | 
libudev1                         (>= 189) | 
libwrap0                      (>= 7.6-4~) | 
libsystemd-login0               (= 208-8) | 
util-linux                  (>= 2.19.1-2) | 
initscripts             (>= 2.88dsf-53.2) | 
sysv-rc                                   | 
udev                                      | 
acl                                       | 
adduser                                   | 
libcap2-bin                               | 


Package Status      (Version) | Installed
=============================-+-===========
udev                          | 229-4


Recommends          (Version) | Installed
=============================-+-===========
libpam-systemd                | 229-4


Suggests        (Version) | Installed
=========================-+-===========
systemd-ui                | 



--- Output from package bug script ---


-- 
Markus Grunwald
https://www.the-grue.de

Fragen zur Mail? https://www.the-grue.de/mail_und_co
https://www.the-grue.de/~markus/markus_grunwald.gpg

--- End Message ---
--- Begin Message ---

Am 18.01.22 um 23:02 schrieb Michael Biebl:
Am 18.01.22 um 17:43 schrieb Christoph Martin:
unarchive 821944
reopen 821944
found 821944 247.3-6
thanks

Hi all,

referencing this old bug, which you closed because you could not reproduce it.

I stumbled over the same issue and the interesting thing is, that the behavior is dependend on the timeout value for the umount.

The original submitter reported the problem with TimeoutIdleSec=300 .
You tried you reproduce it with 30 seconds and it worked.

I saw the same problem with a timeout of 300 seconds. I also tried with shorter values. 30 seconds worked. I then tried different values and found that it worked up to 50 seconds. Beginning with 60 seconds the IdleTimeout stops working.

Nope, still can not reproduce it with larger timeouts.
Doesn't really matter if I chose 60s or 300s

Are you absolutely sure something is not keeping your mount point busy?





Here is the relevant part from my /etc/fstab
10.20.30.40:/srv/nfs /mnt/remote nfs4 noauto,x-systemd.automount,x-systemd.idle-timeout=300 0 0

/dev/sdb3 /mnt/usb ext4 x-systemd.automount,x-systemd.idle-timeout=300 0 0


I tried with various timeouts, 30, 60, 180 and 300.
Here's an excerpt from the journal

<setup timeout of 180s, daemon-reload, restart automounts>
Jan 19 09:18:29 pluto systemd[1]: mnt-usb.automount: Deactivated successfully.
Jan 19 09:18:29 pluto systemd[1]: Unset automount mnt-usb.automount.
Jan 19 09:18:29 pluto systemd[1]: Stopping mnt-usb.automount...
Jan 19 09:18:29 pluto systemd[1]: Set up automount mnt-usb.automount.
Jan 19 09:18:29 pluto systemd[1]: mnt-remote.automount: Deactivated successfully.
Jan 19 09:18:29 pluto systemd[1]: Unset automount mnt-remote.automount.
Jan 19 09:18:29 pluto systemd[1]: Stopping mnt-remote.automount...
Jan 19 09:18:29 pluto systemd[1]: Set up automount mnt-remote.automount.
Jan 19 09:23:53 pluto systemd[1]: mnt-usb.automount: Deactivated successfully.
Jan 19 09:23:53 pluto systemd[1]: Unset automount mnt-usb.automount.
Jan 19 09:23:53 pluto systemd[1]: Stopping mnt-usb.automount...
Jan 19 09:23:53 pluto systemd[1]: Set up automount mnt-usb.automount.
Jan 19 09:23:53 pluto systemd[1]: mnt-remote.automount: Deactivated successfully.
Jan 19 09:23:53 pluto systemd[1]: Unset automount mnt-remote.automount.
Jan 19 09:23:53 pluto systemd[1]: Stopping mnt-remote.automount...
Jan 19 09:23:53 pluto systemd[1]: Set up automount mnt-remote.automount.
Jan 19 09:24:45 pluto systemd[1]: mnt-remote.automount: Got automount request for /mnt/remote, triggered by 378449 (ls)
Jan 19 09:24:45 pluto systemd[1]: Mounting /mnt/remote...
Jan 19 09:24:45 pluto systemd[1]: Mounted /mnt/remote.
Jan 19 09:24:45 pluto systemd[1]: mnt-usb.automount: Got automount request for /mnt/usb, triggered by 378449 (ls)
Jan 19 09:24:45 pluto systemd[1]: Mounting /mnt/usb...
Jan 19 09:24:45 pluto systemd[1]: Mounted /mnt/usb.
Jan 19 09:27:46 pluto systemd[1]: Unmounting /mnt/remote...
Jan 19 09:27:46 pluto systemd[1]: mnt-remote.mount: Deactivated successfully.
Jan 19 09:27:46 pluto systemd[1]: Unmounted /mnt/remote.
Jan 19 09:39:00 pluto systemd[1]: mnt-usb.mount: Deactivated successfully.
Jan 19 09:39:29 pluto systemd[1]: mnt-remote.automount: Got automount request for /mnt/remote, triggered by 380848 (ls)
Jan 19 09:39:29 pluto systemd[1]: Mounting /mnt/remote...
Jan 19 09:39:29 pluto systemd[1]: Mounted /mnt/remote.
Jan 19 09:39:29 pluto systemd[1]: mnt-usb.automount: Got automount request for /mnt/usb, triggered by 380848 (ls)
Jan 19 09:39:29 pluto systemd[1]: Mounting /mnt/usb...
Jan 19 09:39:29 pluto systemd[1]: Mounted /mnt/usb.
Jan 19 09:42:30 pluto systemd[1]: Unmounting /mnt/remote...
Jan 19 09:42:30 pluto systemd[1]: Unmounting /mnt/usb...
Jan 19 09:42:30 pluto systemd[1]: mnt-usb.mount: Deactivated successfully.
Jan 19 09:42:30 pluto systemd[1]: Unmounted /mnt/usb.
Jan 19 09:42:30 pluto systemd[1]: mnt-remote.mount: Deactivated successfully.
Jan 19 09:42:30 pluto systemd[1]: Unmounted /mnt/remote.

<setup timeout of 300s, daemon-reload, restart automounts>

Jan 19 09:44:26 pluto systemd[1]: mnt-remote.automount: Deactivated successfully.
Jan 19 09:44:26 pluto systemd[1]: Unset automount mnt-remote.automount.
Jan 19 09:44:26 pluto systemd[1]: Stopping mnt-remote.automount...
Jan 19 09:44:26 pluto systemd[1]: Set up automount mnt-remote.automount.
Jan 19 09:44:26 pluto systemd[1]: mnt-usb.automount: Deactivated successfully.
Jan 19 09:44:26 pluto systemd[1]: Unset automount mnt-usb.automount.
Jan 19 09:44:26 pluto systemd[1]: Stopping mnt-usb.automount...
Jan 19 09:44:26 pluto systemd[1]: Set up automount mnt-usb.automount.
Jan 19 09:44:36 pluto systemd[1]: mnt-remote.automount: Got automount request for /mnt/remote, triggered by 380972 (ls)
Jan 19 09:44:36 pluto systemd[1]: Mounting /mnt/remote...
Jan 19 09:44:37 pluto systemd[1]: Mounted /mnt/remote.
Jan 19 09:44:37 pluto systemd[1]: mnt-usb.automount: Got automount request for /mnt/usb, triggered by 380972 (ls)
Jan 19 09:44:37 pluto systemd[1]: Mounting /mnt/usb...
Jan 19 09:44:37 pluto systemd[1]: Mounted /mnt/usb.
Jan 19 09:49:37 pluto systemd[1]: Unmounting /mnt/remote...
Jan 19 09:49:37 pluto systemd[1]: Unmounting /mnt/usb...
Jan 19 09:49:37 pluto systemd[1]: mnt-remote.mount: Deactivated successfully.
Jan 19 09:49:37 pluto systemd[1]: Unmounted /mnt/remote.
Jan 19 09:49:38 pluto systemd[1]: mnt-usb.mount: Deactivated successfully.
Jan 19 09:49:38 pluto systemd[1]: Unmounted /mnt/usb.


As you can see, in all cases the automount worked fine.
I did those experiments on the console, no graphical session running or other processes which could keep the mounts busy.

I'm thus pretty sure your problem is not in systemd but "some" program preventing the unmount.

Feel free to reopen, if you can reproduce the problem on the linux console with no desktop environment / display manager etc running.

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


--- End Message ---

Reply via email to