From owner-freebsd-questions@FreeBSD.ORG Fri May 8 20:28:51 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 357991065674 for ; Fri, 8 May 2009 20:28:51 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from corellia.vindaloo.com (corellia.vindaloo.com [64.51.148.100]) by mx1.freebsd.org (Postfix) with ESMTP id D6D088FC13 for ; Fri, 8 May 2009 20:28:50 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from hadar.vindaloo.com (hadar.vindaloo.com [172.24.145.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by corellia.vindaloo.com (Postfix) with ESMTP id E909E5D97; Fri, 8 May 2009 15:56:34 -0400 (EDT) Message-Id: From: Christopher Sean Hilton To: Paul Schmehl , freebsd-questions@freebsd.org In-Reply-To: <115CE74FFEDF152EA4EFA58F@utd65257.utdallas.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 8 May 2009 15:56:34 -0400 References: <20090507035523.GA6073@lpthe.jussieu.fr> <970380130905072016gecc607cr1e5401d8e396366b@mail.gmail.com> <115CE74FFEDF152EA4EFA58F@utd65257.utdallas.edu> X-Mailer: Apple Mail (2.930.3) Cc: Subject: Re: Autofs howto X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2009 20:28:51 -0000 On May 8, 2009, at 10:57 AM, Paul Schmehl wrote: > --On Thursday, May 07, 2009 22:16:01 -0500 Jason Garrett > wrote: >>> >> While cryptic, It has worked well for me with multiple FreeBSD and >> Linux >> hosts on my network. >> > > Hopefully it will work well for me too. However, I am struggling > with the documentation, trying to figure out how to translate the > developer-speak into normal human language. > > Here's what one of our guys is using on linux (I changed the > hostname to foobar): > cat /etc/auto.master > /home ldap //foobar.utdallas.edu/ > nismapname=auto_home,dc=utdallas,dc=edu nfsvers=3 proto=tcp > /proj ldap //foobar.utdallas.edu/ > nismapname=auto_proj,dc=utdallas,dc=edu nfsvers=3 proto=tcp > /net -hosts > I haven't played with Linux's autofs and when I did my look at it was shallow. From what you have here it looks like foobar.utdallas.edu is a NFS v3 server that offers a pair of directory hierarchies. He's mounting one of them on locally as /home and another as /proj. If you want to do that in FreeBSD this should get you going. *** /etc/amd/amd.conf *** [ global ] browsable_dirs = no map_type = file mount_type = nfs search_path = /etc auto_dir = /.amd cache_duration = 30 log_file = syslog:daemon log_options = fatal,error print_pid = yes pid_file = /var/run/ amd.pid restart_mounts = yes selectors_in_defaults = no [ /home ] map_name = /etc/amd/ home.map [ /proj ] map_name = /etc/amd/ proj.map *** /etc/amd/home.map *** /defaults type:=nfs;opts:=tcp,intr,nodev,nosuid,umount,vers=3;\ rhost:=foobar.utdallas.edu;rfs:=/home/${key} * fs:=${autodir}/home/${key} *** /etc/amd/proj.map *** /defaults type:=nfs;opts:=tcp,intr,nodev,nosuid,umount,vers=3;\ rhost:=foobar.utdallas.edu;rfs:=/proj/${key} * fs:=${autodir}/proj/${key} ------------------------------- In the map files you'll need to make sure that the rfs entry matches the directory tree that foobar.utdallas.edu is exporting. e.g. if you would manually mount the directory under FreeBSD like this: # mount_nfs -o tcp,intr,nodev,nosuid foobar.utdallas.edu:/home/ pschmehl /home/pschmehl or the fstab entry that you would use looks like this: # foobar.utdallas.edu:/home/pschmehl /home/pschmehl nfs noauto,tcp,intr 0 0 Then the rfs entry should look like this: ...;rfs:=/home/${key} This setup assumes that you've exported the directory try with FreeBSD's equivalent of the -alldirs option. This option allows you to mount any point under the exported tree rather than forcing you to mount the entire filesystem. A typical setup on FreeBSD would be to export /home with --alldirs then an NFS client can mount /home/ cshilton or /home/jbauer or whatever. Hope this helps -- Chris Sorry if I've got some minor bobbles in the syntax on the mount or fstab lines. > So how do I tranlsate that into FreeBSD amd conf and map files? > It's got me stumped. > > -- > Paul Schmehl, Senior Infosec Analyst > As if it wasn't already obvious, my opinions > are my own and not those of my employer. > ******************************************* > Check the headers before clicking on Reply. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org > " > -- Chris Hilton chris-at-vindaloo-dot-com ------------------------------------------------------------------------ "All I was doing was trying to get home from work!" -- Rosa Parks