0

The setup (not autofs, but systemd based automount):

# grep automount /etc/fstab
1.2.3.4:/vol/homedirs /home/roaming nfs x-systemd.automount,x-systemd.idle-timeout=30

and:

# systemctl daemon-reload

on SLES12.3.

This works great! If a user logs in, having "/home/roaming/someuser123" homedir, the /home/roaming gets automatically mounted. it wasn't mounted before.

The question: after user logs out, the "/home/roaming" never gets umounted! Why? The "x-systemd.idle-timeout=30" syntax looks good!

UPDATES:

# systemctl status automount
? automount.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
#
pintereric
  • 3
  • 1
  • 3

1 Answers1

1

This approach worked for me (on Ubuntu):

  1. Clean start: make sure the mount point is not mounted yet.
  2. Have the mount defined in your /etc/fstab
  3. sudo systemctl daemon-reload
  4. sudo systemctl restart remote-fs.target

To check if it works:

At this point if you didn't access the remote filesystem yet, systemctl status home-roaming.mount should report Loaded: loaded and Active: inactive (dead). Next, access the filesystem, with e.g. ls /home/roaming. Rerunning the above status query should now report Active: active (mounted). If the mount point is truly not accessed by the system after the user logs out, it should get umounted after the idle timeout, with corresponding active status. If not, I would try next with a mount point that is not a user homedir to see if it makes a difference.

j24
  • 11
  • 2