From owner-freebsd-hackers Tue Oct 24 17:46:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail11.disney.com (mail11.disney.com [208.246.35.55]) by hub.freebsd.org (Postfix) with ESMTP id 972E437B479 for ; Tue, 24 Oct 2000 17:46:26 -0700 (PDT) Received: from pain.corp.disney.com (pain.corp.disney.com [153.7.231.100]) by mail11.disney.com (Switch-2.0.1/Switch-2.0.1) with SMTP id e9P0xbS14307 for ; Tue, 24 Oct 2000 17:59:37 -0700 (PDT) Received: from louie.fa.disney.com by pain.corp.disney.com with ESMTP for freebsd-hackers@freebsd.org; Tue, 24 Oct 2000 17:47:00 -0700 Received: from mercury.fan.fa.disney.com (mercury.fan.fa.disney.com [153.7.119.1]) by louie.fa.disney.com (8.9.2/8.9.2) with ESMTP id RAA15869 for ; Tue, 24 Oct 2000 17:46:24 -0700 (PDT) (envelope-from Jim.Pirzyk@disney.com) Received: from snoopy.fan.fa.disney.com by mercury.fan.fa.disney.com for freebsd-hackers@freebsd.org; Tue, 24 Oct 2000 17:46:23 -0700 From: Jim Pirzyk Organization: Walt Disney Feature Animation To: freebsd-hackers@freebsd.org Subject: AutoFS on FreeBSD Date: Tue, 24 Oct 2000 17:24:06 -0700 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00102417462400.00469@snoopy.fan.fa.disney.com> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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