I installed autofs and it's mounting a network drive to a folder in my local linux filesystem. I use -fstype=cifs,rw
in the mount command in an /etc/auto.smb.shares file.
If I cd into the mounted folder (or if I have got it open in a Windows Samba Share) and I stop autofs systemctl stop autofs
the folder stays mounted.
I check with systemctl status autofs
and it says the autofs process is dead. But I check with the mount
command and df -h
and the mounted folder is still there and indeed I can cd in and out of the folder from linux or browse in and out from the Windows Samba share.
If I manually unmount the drive then it unmounts it. Now if I restart autofs I get the expected behavior again. If I now cd out of the mounted folder and stop autofs it does not mount the folder if I try to cd in to it.
Am I just describing standard behavior of autofs or why does a folder stay mounted if I happen to have it open when I stop autofs?
Cheers, Flex