diff --git a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml index 92a92e80a6..78db811890 100644 --- a/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml @@ -1,7 +1,7 @@ @@ -807,55 +807,79 @@ nfs_client_flags="-n 4" Contributed by + + + Chern + Lee + Rewritten by + + - AMD (automatic mounter daemon) + amd - AMD + amd automatic mounter daemon - AMD is a useful utility used for automatically mounting a - filesystem whenever a file or directory within that filesystem is - accessed. It will also unmount that filesystem when it has not - been used for a time. + &man.amd.8;, which is also known as the automatic mounter + daemon, is a useful utility used for automatically mounting a + remote filesystem whenever a file or directory within that + filesystem is accessed. Filesystems that are inactive for a + period of time will also be automatically unmounted by + amd. Using + amd provides a simplistic alternative + to static mounts. - AMD operates by listening in the - /host and /net - directories for a filename lookup. On a lookup, it uses the - system's resolver routine to find the NFS server, and attempts - to map the exported filesystems on the NFS server to the - /host/${HOSTNAME}/ directory. + amd operates by attaching + itself as an NFS server to the /host and + /net directories. When a file is accessed + within one of these directories, amd + looks up the corresponding remote mount and automatically mounts + it. /net is used to mount an exported + filesystem from an IP address, while /host + is used to mount an export from a remote hostname. - The process actually goes a little something like - this: + An access to a file within + /host/foobar/usr would tell + amd to attempt to mount the + /usr export on the host + foobar. - - Someone cd's into - /host/${HOSTNAME}/exported_filesystem. + + Mounting an Export with <application>amd</application> - AMD receives the lookup request, and takes the - ${HOSTNAME} token. + &prompt.user; showmount -e foobar +Exports list on foobar: +/usr 10.10.10.0 +/a 10.10.10.0 +&prompt.user; cd /host/foobar/usr + - AMD attempts to resolve the HOSTNAME - token, and map any exports on the server into the - /host/${HOSTNAME}/ directory. - + As seen in the example, the showmount shows + /usr as an export. When changing directories to + /host/foobar/usr, amd + attempts to resolve the hostname foobar and + automatically mount the desired export. - Setting up amd is actually quite simple, perhaps deceptively - so: + amd can be started through the + rc.conf system by placing the following lines in + /etc/rc.conf: + + amd_enable="YES" - Put amd_enable="YES" in the - rc.conf file of the client machine. Thats - it, everything you need is already installed. Reboot the machine - and amd will create a host directory in your root - partition. Then, you can access the remote filesystem like - this: + Additionally, custom flags can be passed to + amd from the + amd_flags option. By default, + amd_flags is set to: - &prompt.user;cd /host/1.1.1.1/file/ + amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" - Also if you have DNS up and running, you can access the - filesystem like this: + The /etc/amd.map file defines the + default options that exports are mounted with. The + /etc/amd.conf file defines some of the more + advanced features of amd. - &prompt.user;cd /host/machinename/file/ + Consult the &man.amd.8; and &man.amd.conf.5; man pages for more + information.