Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 May 2002 10:48:38 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Wayne Pascoe <wayne@penguinpowered.org.uk>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: AMD for NFS mounts
Message-ID:  <20020523154838.GD98450@dan.emsphone.com>
In-Reply-To: <m2661elsug.fsf@set.ehsrealtime.com>
References:  <m2661elsug.fsf@set.ehsrealtime.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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/<hostname>/mountpoint syntax, plus it optimizes /host/localhost,
and /host/<localmachinename> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020523154838.GD98450>