I am looking to have a local partition unmount automatically after a set timeout. I set the parameters on fstab based on this ArchWiki Guide but the unmount doesn’t happen after the timeout has passed.
Any ideas on how to make it work? Or debug (which log files to search? What to look for?)?
Found log information. Can see it auto-mount … but no unmounts
[jetstream@localhost ~]$ journalctl --boot=0 | grep testmount
Feb 09 23:25:55 localhost.localdomain systemd[1]: Set up automount mnt-testmount.automount.
Feb 09 23:28:15 localhost.localdomain systemd[1]: mnt-testmount.automount: Got automount request for /mnt/testmount, triggered by 2198 (pool-org.gnome.)
Feb 09 23:28:15 localhost.localdomain systemd[1]: Mounting /mnt/testmount...
Feb 09 23:28:15 localhost.localdomain systemd[1]: Mounted /mnt/testmount. <-- can see it automount
Update 2
Does not unmount automatically after the timeout lapses hours later even. Even after logging out completely.
Thanks for that command @vgaetera I was wondering how to confirm once I closed all the apps / windows.
Ran it after closing all applications and waiting for several minutes. No new entries on journaltctl logs I’m going to step away from the system and check back later.
[jetstream@localhost ~]$ sudo lsof | grep -e /mnt
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
Could you please help me with the syntax of the fstab entry? I can see that the automount mount point should be named mnt-testmount.automount but I am clueless beyond that. Thanks in advance!!