Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Automount unmount after X minutes of inactivity.

    Hey there, I am not exactly a "Newbie" but it's not really OS specific, so I wasn't sure where to put this, but I guess it's a bit of a Newbie question.

    I have automounting setup and it's working great.

    I login as user "daredevil" and this is the output of df -h

    192.168.x.x:/mnt/nfs/daredevil <disk info> /nfshome/daredevil

    Now, when I switch user to spiderman, a second mount is added to df -h, which is fine!

    192.168.x.x:/mnt/nfs/daredevil <disk info> /nfshome/daredevil
    192.168.x.x:/mnt/nfs/spiderman <disk info> /nfshome/spiderman

    Although I have specified the unmount timeout to 10 seconds(just for testing, don't worry) in /etc/auto.master beside the mount line I created, and just for kicks, I also added it into auto.home , when I logout of spiderman and back to daredevil, it does not unmount /nfshome/spiderman until I reboot.

    I think it's because daredevil still has /nfshome/ mounted, and it's referencing that so it doesn't drop the spiderman mount since /nfshome isn't "technically" inactive..

    Is there any setting or workaround for this that anyone knows of? I just can't help but be really annoyed by this, if the computer in question was on 24/7/365 and we had a lot of users coming in and out of it, we could have nearly 300 mounts per computer unless we actively go around rebooting them everyday.

    Thanks for any help my dudes.

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2011
    Turtle Island West
    Perhaps you could add a line to ~/.bash_logout. Mine just clears the screen, but I suppose you could get it to do pretty much anything you wanted, including umount'ing stuff.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts