Link to home
Start Free TrialLog in
Avatar of Forrest
ForrestFlag for United States of America

asked on

OX X Lion, NFS and the automounter

I want to place some static NFS entries in the fstab, via vifs.   But it seems that automounter grabs hold of those and remounts them after I manually umount them, which is not what I want.   That is, I have placed the mount point in my own separate location outside of any of the standard locations -- in this case, I created a mount under a directory I created in /mnt.  

 I need mounts that the automounter isn't going to use.    

I looked through the manpage and didn't see anything obvious about options to avoid this.    Is this just the way it is with the OS, or is there some clever way to get around it.   Does it have something to do with the autofs configs in /etc?



Thanks.
Avatar of maximus5328
maximus5328
Flag of United States of America image

Have you tried using LaunchAgents for this?
I'd think you might be better to put the mounts in a shell script.

You can then set it to run by calling it from the User Account startup items as an Applescript or set it up as a LaunchAgent entry using Lingon
Avatar of Forrest

ASKER

How is this any different than just putting it in a static entry, in the fstab where it's more easily modified?

I've noticed that regardless of *where* you put a mount point, the automouting system grabs ahold of it.  For example, if I mount an NFS mount at /mnt/directory, then manually unmount it, the automounter just hops in and remounts it.  

I've never seen *any* UNIX-like system where the automounter behaved this way.  But, this is OS X and they've changed a lot of things.

For our production environment and with configuration management, we really need these entries to go into /etc/fstab.   We will have an array of similar systems eventually.

The /etc/auto_master file has these entries:

#
# Automounter master map
#
+auto_master            # Use directory service
/net                  -hosts            -nobrowse,hidefromfinder,nosuid
/home                  auto_home      -nobrowse,hidefromfinder
/Network/Servers      -fstab
/-                  -static

The last one, I suspect may be the issue as it's applying this to everything under /.  I looked at the man page, but it's just not clear to me where all the gears and wheels are connecting here.


Thanks.
I've always thought of fstab being the description of static file systems. You put your root FS there and the home folder FS but you don't put your external drives or network servers that you may want to eject. Just a speculation but automount may be designed the same way and it remounts everything it finds in fstab that's not mounted.
ASKER CERTIFIED SOLUTION
Avatar of Forrest
Forrest
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial