From owner-freebsd-fs@FreeBSD.ORG Tue Aug 28 18:13:25 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D419106564A for ; Tue, 28 Aug 2012 18:13:25 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from lwfs1-cam.cam.lispworks.com (mail.lispworks.com [193.34.186.230]) by mx1.freebsd.org (Postfix) with ESMTP id D60228FC08 for ; Tue, 28 Aug 2012 18:13:24 +0000 (UTC) Received: from higson.cam.lispworks.com (higson.cam.lispworks.com [192.168.1.7]) by lwfs1-cam.cam.lispworks.com (8.14.5/8.14.5) with ESMTP id q7SIDKVW008891; Tue, 28 Aug 2012 19:13:20 +0100 (BST) (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by higson.cam.lispworks.com (8.14.4) id q7SIDF75000784; Tue, 28 Aug 2012 19:13:15 +0100 Received: (from martin@localhost) by higson.cam.lispworks.com (8.14.4/8.14.4/Submit) id q7SIDEiJ000779; Tue, 28 Aug 2012 19:13:14 +0100 Date: Tue, 28 Aug 2012 19:13:14 +0100 Message-Id: <201208281813.q7SIDEiJ000779@higson.cam.lispworks.com> From: Martin Simmons To: Tim Gustafson In-reply-to: (message from Tim Gustafson on Tue, 28 Aug 2012 10:06:51 -0700) References: Cc: freebsd-fs@freebsd.org Subject: Re: Using AMD with NFS Mounts X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 18:13:25 -0000 >>>>> On Tue, 28 Aug 2012 10:06:51 -0700, Tim Gustafson said: > > Unrelated to my existing ZFS issue, I also have an NFS/AMD question. > > I am trying to get FreeBSD to behave more like our existing Linux, Mac > and Solaris systems when it comes to auto-mounting. We maintain all > our mount information in our LDAP server, and Linux, Mac and Solaris > act upon that data directly using autofs. I know that FreeBSD prefers > AMD, so I'm willing to write a script that exports the data from the > LDAP server into AMD-map format, but I'm having a problem getting even > the basics to go. My configuration files are included below. > > AMD runs, and the log file indicates that it's ready to accept > requests, but when I try to cd into any AMD-hosted folder, I get > miscellaneous errors related to "too many levels of symlinks" or > flat-out permission denied errors. Sometimes I am able to re-start > AMD, and other time re-starting AMD hangs. I can statically mount the > filesystems in question by hand, so I'm sure the "permission denied" > errors are not NFS-related. > > I'm guessing that I have some minor error in my configuration file, > but I can't see what it is. What am I missing? Here's the output > from my syslog: > > amd[1983]: switched to logfile "syslog:daemon" > amd[1983]: AM-UTILS VERSION INFORMATION: > amd[1983]: Copyright (c) 1997-2006 Erez Zadok > amd[1983]: Copyright (c) 1990 Jan-Simon Pendry > amd[1983]: Copyright (c) 1990 Imperial College of Science, Technology & Medicine > amd[1983]: Copyright (c) 1990 The Regents of the University of California. > amd[1983]: am-utils version 6.1.5 (build 900044). > amd[1983]: Report bugs to https://bugzilla.am-utils.org/ or > am-utils@am-utils.org. > amd[1983]: Configured by David O'Brien on date > 4-December-2007 PST. > amd[1983]: Built by root@client.soe.ucsc.edu. > amd[1983]: cpu=amd64 (little-endian), arch=amd64, karch=amd64. > amd[1983]: full_os=freebsd9.0, os=freebsd9, osver=9.0, > vendor=undermydesk, distro=The FreeBSD Project. > amd[1983]: domain=soe.ucsc.edu, host=client, hostd=client.soe.ucsc.edu. > amd[1983]: Map support for: root, passwd, union, nis, ndbm, file, exec, error. > amd[1983]: AMFS: nfs, link, nfsx, nfsl, host, linkx, program, union, ufs, cdfs, > amd[1983]: pcfs, auto, direct, toplvl, error, inherit. > amd[1983]: FS: cd9660, nfs, nfs3, nullfs, msdosfs, ufs, unionfs. > amd[1983]: Network 1: wire=*SNIP* > amd[1983]: Network 2: wire=*SNIP* > amd[1983]: My ip addr is 127.0.0.1 > amd[1984]: released controlling tty using setsid() > amd[1984]: Locked process pages in memory > amd[1984]: file server localhost, type local, state starts up > amd[1984]: /dev/ad8s1a restarted fstype ufs on /, flags 0x89 > amd[1984]: devfs restarted fstype link on /dev, flags 0x89 > amd[1984]: procfs restarted fstype link on /proc, flags 0x89 > amd[1984]: fdescfs restarted fstype link on /dev/fd, flags 0x89 > amd[1984]: Unknown host: pid1715@client > amd[1984]: pid1715@client:/projects restarted fstype nfs on /projects, > flags 0x29 > amd[1984]: Unknown host: pid1715@client > amd[1984]: pid1715@client:/soe restarted fstype nfs on /soe, flags 0x29 > amd[1984]: pid1715@client:/soe referenced fstype nfs on /soe > amd[1984]: /soe set to timeout in 30 seconds > amd[1984]: pid1715@client:/projects referenced fstype nfs on /projects > amd[1984]: /projects set to timeout in 30 seconds > amd[1984]: WARNING: automounter going down on signal 15 > amd[1984]: WARNING: automounter going down on signal 15 > > And, here are my configuration files: > > ==================== > amd.conf > ==================== > [ global ] > browsable_dirs = no > map_type = file > mount_type = nfs > cache_duration = 30 > autofs_use_lofs = yes > log_file = syslog:daemon > log_options = fatal,error > print_pid = yes > pid_file = /var/run/amd.pid > restart_mounts = yes > selectors_in_defaults = no > > [ /soe ] > map_name = /etc/amd/soe.map > > [ /projects ] > map_name = /etc/amd/projects.map > > ==================== > soe.map > ==================== > /defaults type:=nfs;opts:=tcp,soft,nodev,nosuid,umount,vers=3 > * fs:=/soe/${key};rhost:=fs2;rfs:=/export/home/${key} > tjg fs:=/soe/tjg;rhost:=bsd-06;rfs:=/tank/export/home/tjg > > ==================== > projects.map > ==================== > /defaults type:=nfs;opts:=tcp,soft,nodev,nosuid,umount,vers=3 > * fs:=/projects/${key};rhost:=fs2;rfs:=/export/projects/${key} I think you want to remove "fs:=/projects/${key};" from here (its default value should be sufficent). That should make fs2:/export/projects/foo available as /projects/foo etc. Note that amd mounts the filesystem in a hidden directory (named by the fs option) and makes a symlink to it from the directory named in amd.conf. You shouldn't set fs to the directory named in amd.conf. __Martin