2

I have autofs configured to automatically mount a directory using nfs on Ubuntu 14.04. After the user has left the directory (or exited the shell entirely); I would like that directory to dismount.

verbose output from automount -vvvf -d:

mounted indirect on /autonfs with timeout 10, freq 3 seconds

configuration in /etc/default/autofs:

...
OPTIONS="--verbose --timeout=10"
...

Mount command:

mount -t nfs -s -o rw,soft nfserver.example.com:/ /autonfs

also while running in debug mode, I get these lines, repeated over and over:

st_ready: st_ready(): state = 0 path /autonfs
st_expire: state 1 path /autonfs
expire_proc: exp_proc = 140041704711936 path /autonfs
expire_cleanup: got thid 140041704711936 path /autonfs stat 0
expire_cleanup: sigchld: exp 140041704711936 finished, switching from 2 to 1

I am not sure if that is a good thing or not. Is it an attempt to unmount, I don't know.

If I stop the autofs service, then it happily dismounts the directory. Or, if the user is out, and the drirectory is not busy, I can sudo umount /autonfs.

So this make me wonder. Is autofs even supposed / designed to be automatically unmounting it? if so, how can I further debug this issue?

1 Answer 1

0

If you set the timeout to 10 then it should unmount the directory after 10 seconds of inactivity. You can also try using that option in the /etc/auto.master file entry for that mount.

AFAIK autofs unmounts via timeout, it does not unmount via user session.

Sample auto.master entry with timeout:

/home   /etc/auto_home --timeout=10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .