You are not logged in.
It used to be that
systemctl stop autofs
would unmount all. Now I must reboot to get them to unmount.
Not only that, --timeout no longer works, similar to what is described at autofs mounts not disconnecting after inactive.
Any form of
umount -R
is no good because the folders are not deleted.
systemd mounts are of no interest. Last time I looked they are not even close to the ease and usability of autofs. I'm using auto.smb to mount anywhere I want without having to preselect the mounts which, so far as I can tell, systemd mount has no equivalent to.
Offline
I'm also using autofs and am not noticing this behaviour.
Is it possible that something is holding the mount point active?
Does lsof/fuser show anything?
Does running it in debug mode show anything?
Offline
I have auto.ftp and auto.ssh mounts on another computer which unmount on timeout or stop as expected. It's the auto.smb mounts that used to unmount but won't now.
'lsof -Pn | grep /smb/' never shows anything other than automount. The only folder automount has open is the one I accessed. The ones I didn't access are not open yet are not unmounted. Here is the test sequence.
# uname -r
4.8.13-1-ARCH
# pacman -Q autofs
autofs 5.1.2-1
# grep auto.smb /etc/autofs/auto.master
/smb /etc/autofs/auto.smb --timeout=300
# systemctl start autofs
# mount | grep /smb/
# cd /smb/192.168.50.10/C; cd # zsh causes the mount. Also tried in bash and sh
# systemctl stop autofs
# mount | grep /smb/
/etc/autofs/auto.smb on /smb/192.168.50.10/C type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/C2$ type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/CDIMAGES type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/MUSIC type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/MYSQL type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/ROOT type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/WINDVR type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/WWW type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/_INCO type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
/etc/autofs/auto.smb on /smb/192.168.50.10/afs type autofs (rw,relatime,fd=18,pgrp=29521,timeout=300,minproto=5,maxproto=5,offset)
Fortunately I found that repeating start and stop usually works. Here's a one liner to kick the mounts and restart autofs.
# systemctl stop autofs; echo "sleeping"; sleep 10; systemctl start autofs; systemctl stop autofs; systemctl start autofs
stop: mounts are still present
sleep: won't work without this. Sometimes doesn't work with this.
start: mounts are attached
stop: mounts are destroyed
start: clean slate
Running automount manually in another window allows me to generate the working and non working logs for comparison.
# /usr/bin/automount -df
# unmount fails because I accessed a folder
^Cdo_notify_state: signal 2
master_notify_state_change: sig 2 switching /afs/misc from 1 to 5
master_notify_state_change: sig 2 switching /afs/net from 1 to 5
master_notify_state_change: sig 2 switching /smb from 1 to 5
st_prepare_shutdown: state 1 path /smb
expire_proc: exp_proc = 140226441922304 path /smb
st_prepare_shutdown: state 1 path /afs/net
expire_proc: exp_proc = 140226311743232 path /afs/net
expire_proc_indirect: expire /smb/192.168.50.10/C
st_prepare_shutdown: state 1 path /afs/misc
expire_proc: exp_proc = 140226310690560 path /afs/misc
expire_cleanup: got thid 140226311743232 path /afs/net stat 0
expire_cleanup: sigchld: exp 140226311743232 finished, switching from 5 to 7
st_shutdown: state 5 path /afs/net
expire_cleanup: got thid 140226310690560 path /afs/misc stat 0
expire_cleanup: sigchld: exp 140226310690560 finished, switching from 5 to 7
st_shutdown: state 5 path /afs/misc
handle_packet: type = 6
handle_packet_expire_direct: token 128, name /smb/192.168.50.10/C
expiring path /smb/192.168.50.10/C
umount_multi: path /smb/192.168.50.10/C incl 1
umount_subtree_mounts: unmounting dir = /smb/192.168.50.10/C
expired /smb/192.168.50.10/C
dev_ioctl_send_ready: token = 128
expire_cleanup: got thid 140226441922304 path /smb stat 11
expire_cleanup: sigchld: exp 140226441922304 finished, switching from 5 to 7
st_shutdown: state 5 path /smb
umount_multi: path /afs/net incl 0
umounted indirect mount /afs/net
automount_path_to_fifo: fifo name /run/autofs.fifo-afs-net
shut down path /afs/net
umount_multi: path /smb incl 0
umount_autofs_indirect: ask umount returned busy /smb
umount_autofs_indirect: mount point /smb is in use
automount_path_to_fifo: fifo name /run/autofs.fifo-smb
failed to remove dir /smb: Device or resource busy
shut down path /smb
umount_multi: path /afs/misc incl 0
umounted indirect mount /afs/misc
automount_path_to_fifo: fifo name /run/autofs.fifo-afs-misc
shut down path /afs/misc
autofs stopped
# /usr/bin/automount -df
# unmount succeeds because I didn't access any of the reattached folders
^Cdo_notify_state: signal 2
master_notify_state_change: sig 2 switching /afs/misc from 1 to 5
master_notify_state_change: sig 2 switching /afs/net from 1 to 5
master_notify_state_change: sig 2 switching /smb from 1 to 5
st_prepare_shutdown: state 1 path /smb
expire_proc: exp_proc = 140394226738944 path /smb
st_prepare_shutdown: state 1 path /afs/net
expire_proc: exp_proc = 140394166703872 path /afs/net
st_prepare_shutdown: state 1 path /afs/misc
expire_proc: exp_proc = 140394165651200 path /afs/misc
expire_cleanup: got thid 140394166703872 path /afs/net stat 0
expire_cleanup: sigchld: exp 140394166703872 finished, switching from 5 to 7
st_shutdown: state 5 path /afs/net
expire_cleanup: got thid 140394165651200 path /afs/misc stat 0
expire_cleanup: sigchld: exp 140394165651200 finished, switching from 5 to 7
st_shutdown: state 5 path /afs/misc
handle_packet: type = 4
handle_packet_expire_indirect: token 129, name 192.168.50.10
expiring path /smb/192.168.50.10
umount_multi: path /smb/192.168.50.10 incl 1
umount_multi_triggers: umount offset /smb/192.168.50.10/C
umounted offset mount /smb/192.168.50.10/C
umount_multi_triggers: umount offset /smb/192.168.50.10/C2$
umounted offset mount /smb/192.168.50.10/C2$
umount_multi_triggers: umount offset /smb/192.168.50.10/CDIMAGES
umounted offset mount /smb/192.168.50.10/CDIMAGES
umount_multi_triggers: umount offset /smb/192.168.50.10/MUSIC
umounted offset mount /smb/192.168.50.10/MUSIC
umount_multi_triggers: umount offset /smb/192.168.50.10/MYSQL
umounted offset mount /smb/192.168.50.10/MYSQL
umount_multi_triggers: umount offset /smb/192.168.50.10/ROOT
umounted offset mount /smb/192.168.50.10/ROOT
umount_multi_triggers: umount offset /smb/192.168.50.10/WINDVR
umount_multi: path /afs/net incl 0
umounted indirect mount /afs/net
automount_path_to_fifo: fifo name /run/autofs.fifo-afs-net
shut down path /afs/net
umounted offset mount /smb/192.168.50.10/WINDVR
umount_multi_triggers: umount offset /smb/192.168.50.10/WWW
umounted offset mount /smb/192.168.50.10/WWW
umount_multi_triggers: umount offset /smb/192.168.50.10/_INCO
umounted offset mount /smb/192.168.50.10/_INCO
umount_multi_triggers: umount offset /smb/192.168.50.10/afs
umounted offset mount /smb/192.168.50.10/afs
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/C
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/C2$
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/CDIMAGES
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/MUSIC
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/MYSQL
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/ROOT
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/WINDVR
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/WWW
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/_INCO
cache_delete_offset_list: deleting offset key /smb/192.168.50.10/afs
rm_unwanted_fn: removing directory /smb/192.168.50.10/afs
rm_unwanted_fn: removing directory /smb/192.168.50.10/_INCO
rm_unwanted_fn: removing directory /smb/192.168.50.10/WWW
rm_unwanted_fn: removing directory /smb/192.168.50.10/WINDVR
rm_unwanted_fn: removing directory /smb/192.168.50.10/ROOT
rm_unwanted_fn: removing directory /smb/192.168.50.10/MYSQL
rm_unwanted_fn: removing directory /smb/192.168.50.10/MUSIC
rm_unwanted_fn: removing directory /smb/192.168.50.10/CDIMAGES
rm_unwanted_fn: removing directory /smb/192.168.50.10/C2$
rm_unwanted_fn: removing directory /smb/192.168.50.10/C
rm_unwanted_fn: removing directory /smb/192.168.50.10
expired /smb/192.168.50.10
dev_ioctl_send_ready: token = 129
handle_packet: type = 3
expire_cleanup: got thid 140394226738944 path /smb stat 11
expire_cleanup: sigchld: exp 140394226738944 finished, switching from 5 to 7
st_shutdown: state 5 path /smb
umount_multi: path /afs/misc incl 0
umounted indirect mount /afs/misc
automount_path_to_fifo: fifo name /run/autofs.fifo-afs-misc
shut down path /afs/misc
handle_packet_missing_indirect: token 130, name 192.168.50.10, request pid 1977
dev_ioctl_send_fail: token = 130
umount_multi: path /smb incl 0
umount_autofs_indirect: ask umount returned busy /smb
umounted indirect mount /smb
automount_path_to_fifo: fifo name /run/autofs.fifo-smb
shut down path /smb
autofs stopped
Offline
From your failure log:
umount_multi: path /smb incl 0
umount_autofs_indirect: ask umount returned busy /smb
umount_autofs_indirect: mount point /smb is in use
automount_path_to_fifo: fifo name /run/autofs.fifo-smb
failed to remove dir /smb: Device or resource busy
Something is holding open the smb mount. It's interesting that lsof/fuser isn't showing anything, though.
If this a recent issue, have you tried downgrading the kernel to see if the bug is in there?
Offline
No help
# uname -r
4.4.44-1-lts
Offline