Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 1996 11:00:50 +0100 (GMT-1)
From:      af@biomath.jussieu.fr
To:        randyd@nconnect.net (Randy)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: AMD difficulties
Message-ID:  <199609161000.LAA05673@garfield.biomath.jussieu.fr>
In-Reply-To: <XFMail.960915135539.randyd@nconnect.net> from "Randy" at Sep 15, 96 01:10:18 pm

next in thread | previous in thread | raw e-mail | index | archive | help
Randy wrote / a ecrit:
> 
> Greetings,
> 
> I seem to be having a great deal of difficulty understanding how to get amd
> set up and running on my network.  I'm wondering if someone would be willing
> to help me with the following example:....
> 

I'll try to. Some parts of amd remain a bit mysterious to me  so  I'll
try not to go beyond my understanding of it.

> 2 FBSD machines: named "egyptian" and "arabian"
> egyptian is the 'server'
> I wish to export the '/data' filesystem (mounted on /dev/wd1s1c) to arabian 
>     ( and potentially other machines later)
> 
> I'm confused about what's required in /etc/amd.map entries, and /etc/fstab entri
> es
> to get this to work.  I can mount these systems normally with mount.

Ok, so I'll  assume  that  you  already  have  the  correct  entry  in
/etc/exports on egyptian.

If you want to mount the remote filesystem at boot time, you  need  to
add an entry in arabian's /etc/fstab, such as:

/data		egyptian:/data	rw,nosuid
                                ^^-- list of options here might vary,
                                     check mount man page.

The  drawback  with  that  kind  of  setup  is that if for some reason
egyptian is down when arabian is booted, the boot will hang (I  think)
for quite some time when trying to do the mount. My version of FreeBSD
(2.1-stable)  doesn't  seem  to  support  the  "bg"  (retry  mount  in
background)  option  which might be supported in later releases. Check
the documentation for mount and mount_nfs.

That's what automount (and amd) are for.  Well,  one  of  the  reasons
anyway.

>  Furthermor
> e,
> I don't know if I'm supposed to replace mountd with amd, or if amd requires moun
> td.  

No. Amd doesn't replace mountd. Amd like mount  are  on  the  "client"
side of things whereas mountd is on the "server"  side  (it  gets  the
mount requests from clients -- those requests precisely are issued  by
mount  and  amd).  You  need to run mountd on any machine that exports
filesystems, not on clients.


> (I have enabled amd in /etc/sysconfig) Do I need amd running on both machines
> or just one??  

You need to run amd only on the client machine (arabian).

> 
> Could someone please illustrate this example a little?? :)
> 
> 

Now that's the most difficult part. What you want to do  looks  to  me
like what would be achieved  (when  using  the  "standard"  automount)
through the use of a direct automount map (automount is what is  found
on most commercial Unix  systems...  amd  is  its  free  counterpart).
Although  they  are  supposed to be supported, I have never managed to
make direct maps work using amd. Besides this,  I  would  not  make  a
direct    map   for   a   mount   point   in   the   root   directory.
You didn't specify where you wanted egyptian:/data mounted on arabian,
so I assumed you wanted it in /data as well.

I suggest the following simple setup:

1) put the following in /etc/sysconfig:

amdflags="-l syslog /Net /etc/amd.net.map"

2) edit /etc/amd.net.map as follows:

/defaults   type:=host;fs:=${autodir}/${rhost}/root/;rhost:=${key}
*       host!=${key};opts:=rw,nosuid; \
        host==${key};type:=link;fs:=/;

3) make /data a link to /Net/egyptian/data

cd /
ln -s /Net/egyptian/data data

Before I get flamed: I know that this oversimplified setup is far from
perfect.  I  works for me though, and amd is such a headache that I've
not investigated further until now.

Many  more  elaborate  solutions can be used, including the usage of a
"trampoline" directory to add one level  of  indirection  between  the
directory where the filesystem  is  mounted  and  amd's  mount  point.
Someone  had  sent  me a very helpful mail about this, unfortunately I
can't find it now.

Hope this helps somewhat anyway.
Good luck,
_Alain_
-- 
Alain FAUCONNET    Ingenieur systeme - System Manager     AP-HP/SIM
Public Health                91 bld de l'Hopital 75013 PARIS FRANCE
Medical Computing Research Labs         Mail: af@biomath.jussieu.fr
Tel: (+33) 1-40-77-96-19                   Fax: (+33) 1-45-86-80-68
    I've RTFMed. It says: "Refer to your system administrator"
            But... I *am* the system administrator :-]



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