Rewrite NFS/amd section. Better English, more concise and informative.
Reviewed by: murray
This commit is contained in:
parent
9868f98abe
commit
34153285f8
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=10332
1 changed files with 60 additions and 36 deletions
|
@ -1,7 +1,7 @@
|
||||||
<!--
|
<!--
|
||||||
The FreeBSD Documentation Project
|
The FreeBSD Documentation Project
|
||||||
|
|
||||||
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.80 2001/08/11 20:45:09 jim Exp $
|
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.81 2001/08/11 21:34:44 jim Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="advanced-networking">
|
<chapter id="advanced-networking">
|
||||||
|
@ -807,55 +807,79 @@ nfs_client_flags="-n 4"</programlisting>
|
||||||
<contrib>Contributed by </contrib>
|
<contrib>Contributed by </contrib>
|
||||||
</author>
|
</author>
|
||||||
</authorgroup>
|
</authorgroup>
|
||||||
|
<authorgroup>
|
||||||
|
<author>
|
||||||
|
<firstname>Chern</firstname>
|
||||||
|
<surname>Lee</surname>
|
||||||
|
<contrib>Rewritten by </contrib>
|
||||||
|
</author>
|
||||||
|
</authorgroup>
|
||||||
</sect2info>
|
</sect2info>
|
||||||
<title>AMD (automatic mounter daemon)</title>
|
<title>amd</title>
|
||||||
|
|
||||||
<indexterm><primary>AMD</primary></indexterm>
|
<indexterm><primary>amd</primary></indexterm>
|
||||||
<indexterm><primary>automatic mounter daemon</primary></indexterm>
|
<indexterm><primary>automatic mounter daemon</primary></indexterm>
|
||||||
|
|
||||||
<para>AMD is a useful utility used for automatically mounting a
|
<para>&man.amd.8;, which is also known as the automatic mounter
|
||||||
filesystem whenever a file or directory within that filesystem is
|
daemon, is a useful utility used for automatically mounting a
|
||||||
accessed. It will also unmount that filesystem when it has not
|
remote filesystem whenever a file or directory within that
|
||||||
been used for a time.</para>
|
filesystem is accessed. Filesystems that are inactive for a
|
||||||
|
period of time will also be automatically unmounted by
|
||||||
|
<application>amd</application>. Using
|
||||||
|
<application>amd</application> provides a simplistic alternative
|
||||||
|
to static mounts.</para>
|
||||||
|
|
||||||
<para>AMD operates by listening in the
|
<para><application>amd</application> operates by attaching
|
||||||
<filename>/host</filename> and <filename>/net</filename>
|
itself as an NFS server to the <filename>/host</filename> and
|
||||||
directories for a filename lookup. On a lookup, it uses the
|
<filename>/net</filename> directories. When a file is accessed
|
||||||
system's resolver routine to find the NFS server, and attempts
|
within one of these directories, <application>amd</application>
|
||||||
to map the exported filesystems on the NFS server to the
|
looks up the corresponding remote mount and automatically mounts
|
||||||
<filename>/host/${HOSTNAME}/</filename> directory.</para>
|
it. <filename>/net</filename> is used to mount an exported
|
||||||
|
filesystem from an IP address, while <filename>/host</filename>
|
||||||
|
is used to mount an export from a remote hostname.</para>
|
||||||
|
|
||||||
<para>The process actually goes a little something like
|
<para>An access to a file within
|
||||||
this:</para>
|
<filename>/host/foobar/usr</filename> would tell
|
||||||
|
<application>amd</application> to attempt to mount the
|
||||||
|
<filename>/usr</filename> export on the host
|
||||||
|
<hostid>foobar</hostid>.</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<example>
|
||||||
<listitem><para>Someone <command>cd</command>'s into
|
<title>Mounting an Export with <application>amd</application></title>
|
||||||
<filename>/host/${HOSTNAME}/exported_filesystem</filename>.</para></listitem>
|
|
||||||
|
|
||||||
<listitem><para>AMD receives the lookup request, and takes the
|
<screen>&prompt.user; <userinput>showmount -e foobar</userinput>
|
||||||
<varname>${HOSTNAME}</varname> token.</para></listitem>
|
Exports list on foobar:
|
||||||
|
/usr 10.10.10.0
|
||||||
|
/a 10.10.10.0
|
||||||
|
&prompt.user; cd /host/foobar/usr</screen>
|
||||||
|
</example>
|
||||||
|
|
||||||
<listitem><para>AMD attempts to resolve the HOSTNAME
|
<para>As seen in the example, the <command>showmount</command> shows
|
||||||
token, and map any exports on the server into the
|
<filename>/usr</filename> as an export. When changing directories to
|
||||||
<filename>/host/${HOSTNAME}/</filename> directory.</para></listitem>
|
<filename>/host/foobar/usr</filename>, <application>amd</application>
|
||||||
</itemizedlist>
|
attempts to resolve the hostname <hostid>foobar</hostid> and
|
||||||
|
automatically mount the desired export.</para>
|
||||||
|
|
||||||
<para>Setting up <application>amd</application> is actually quite simple, perhaps deceptively
|
<para><application>amd</application> can be started through the
|
||||||
so:</para>
|
<filename>rc.conf</filename> system by placing the following lines in
|
||||||
|
<filename>/etc/rc.conf</filename>:</para>
|
||||||
|
|
||||||
|
<programlisting>amd_enable="YES"</programlisting>
|
||||||
|
|
||||||
<para>Put <varname>amd_enable="YES"</varname> in the
|
<para>Additionally, custom flags can be passed to
|
||||||
<filename>rc.conf</filename> file of the client machine. Thats
|
<application>amd</application> from the
|
||||||
it, everything you need is already installed. Reboot the machine
|
<varname>amd_flags</varname> option. By default,
|
||||||
and amd will create a host directory in your root
|
<varname>amd_flags</varname> is set to:</para>
|
||||||
partition. Then, you can access the remote filesystem like
|
|
||||||
this:</para>
|
|
||||||
|
|
||||||
<screen>&prompt.user;<userinput>cd /host/<replaceable>1.1.1.1</replaceable>/file/</userinput></screen>
|
<programlisting>amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map"</programlisting>
|
||||||
|
|
||||||
<para>Also if you have DNS up and running, you can access the
|
<para>The <filename>/etc/amd.map</filename> file defines the
|
||||||
filesystem like this:</para>
|
default options that exports are mounted with. The
|
||||||
|
<filename>/etc/amd.conf</filename> file defines some of the more
|
||||||
|
advanced features of <application>amd</application>.</para>
|
||||||
|
|
||||||
<screen>&prompt.user;<userinput>cd /host/<replaceable>machinename</replaceable>/file/</userinput></screen>
|
<para>Consult the &man.amd.8; and &man.amd.conf.5; man pages for more
|
||||||
|
information.</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2>
|
<sect2>
|
||||||
|
|
Loading…
Reference in a new issue