From owner-freebsd-questions Thu May 23 8:48:47 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id D58CD37B403 for ; Thu, 23 May 2002 08:48:39 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.12.2/8.12.3) id g4NFmcSU049908; Thu, 23 May 2002 10:48:38 -0500 (CDT) (envelope-from dan) Date: Thu, 23 May 2002 10:48:38 -0500 From: Dan Nelson To: Wayne Pascoe Cc: freebsd-questions@FreeBSD.ORG Subject: Re: AMD for NFS mounts Message-ID: <20020523154838.GD98450@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.99i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (May 23), Wayne Pascoe said: > Could someone please point me at a sample amd.map file that mounts > NFS shares automagically. I have an entry in /etc/fstab that works, > and I have the following section in my map file: > > localhost/production type:=program;\ > fs:=ourserver.ourdomain:/web/PRODUCTION_VIRTUALHOSTS;\ > mount:="/sbin/mount_nfs mount /host/localhost/production";\ > umount:="/sbin/umount umount /host/local/host/production" amd knows about NFS filesystems; you don't want to use type:=program. > In /etc/fstab, I have the following line: > ourserver.ourdomain:/web/PRODUCTION_VIRTUALHOSTS \ > /host/localhost/production nfs rw,noauto 0 0 You probably don't need this if you're using amd. Let it mount the filesystems for you. > I am starting amd as follows: > amd -a /.amd_mnt -c 3636 -l syslog /host /etc/amd.map My mapfile: : * host==${key};type:=link;fs:=/ \ : hostd==${key};type:=link;fs:=/ \ : type:=host;fs:=${autodir}/${rhost};rhost:=${key};opts:=rw,intr,soft,proto=udp : : localhost type:=link;fs:=/ This map will allow you to NFS mount any host by using /host//mountpoint syntax, plus it optimizes /host/localhost, and /host/ to symlinks to /. Take a look at the am-utils infopage for more information (and samples for just about anything that you'll want to do). -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message