Date: Tue, 24 Oct 2000 17:24:06 -0700 From: Jim Pirzyk <Jim.Pirzyk@disney.com> To: freebsd-hackers@freebsd.org Subject: AutoFS on FreeBSD Message-ID: <00102417462400.00469@snoopy.fan.fa.disney.com>
next in thread | raw e-mail | index | archive | help
I was wondering if there is anyone working on AutoFS for FreeBSD. We currently have 4 studios with around 1000 unix systems of all kinds. Currently there are only 2 OSes that do not have autofs, FreeBSD and one that is known for its number crunching capabilties (and those are being phased out of production). Amd will not meet our needs because of the use of sym links. This is why AutoFS was written in the first place. I quote the 1993 USENIX paper on AutoFS (check http://www.usenix.org/publications/library/proceedings/cinci93/full_papers/callaghan.txt for the full paper). Symbolic links A single automount daemon can service many mountpoints. At each mountpoint the daemon associates a map, and emulates either a symbolic link (direct map) or a directory of symbolic links (indirect map). The symbolic links point to a directory where the automounter performs NFS mounts - /tmp_mnt or /a. The automounter unmounts what it considers to be "idle" mounts - those that have not been active - or that can be unmounted (not busy). As long as all references to these mounts are made through the daemon mountpoint, the dae- mon can replace the mounts as necessary. However, if a process invokes the getwd() function to obtain the path of the current directory while in an automounted filesystem, it will obtain a "/tmp_mnt/..." path. If this "back door" path is cached and used sometime later, there is no guarantee that the filesystem will still be mounted there. The automounter cannot detect references to empty mount- points unless they are made through the automounter's mountpoint. A common victim of this behavior is the at com- mand. It uses the pwd command to record the current directory so that it can be cd'ed to for subsequent invocation of the script. The symbolic links also confuse users because "/tmp_mnt" frequently appears as a prefix to the current directory. Various workarounds have been proposed for this problem. The most common was for the getwd() function to strip prepended "/tmp_mnt/" from paths. This workaround didn't take into account the effect of the automounter's -M flag that allowed users to specify a directory other than "/tmp_mnt/". It is also questionable whether the semantics of getwd() should be changed this way. The symbolic links present a problem for relative references between separate automounter mounts. For instance given the two directories /home/bob and /home/carol it seems reasonable that Bob should be able to "cd ../carol" but this will fail if Carol's directory isn't already mounted. If no one is using it, how is it looked apon if AutoFS was ported from Linux (with the GPL and that stuff) or would a complete rewrite be better? - JimP -- --- @(#) $Id: dot.signature,v 1.9 2000/07/10 16:43:05 pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------------------------------- _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00102417462400.00469>