From owner-svn-doc-head@FreeBSD.ORG Tue Aug 19 09:54:47 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A95A8C78; Tue, 19 Aug 2014 09:54:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88EDC378E; Tue, 19 Aug 2014 09:54:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7J9slI0042331; Tue, 19 Aug 2014 09:54:47 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7J9slfJ042330; Tue, 19 Aug 2014 09:54:47 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408190954.s7J9slfJ042330@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 19 Aug 2014 09:54:47 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r45476 - head/en_US.ISO8859-1/books/handbook/network-servers X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Aug 2014 09:54:47 -0000 Author: trasz (src,ports committer) Date: Tue Aug 19 09:54:47 2014 New Revision: 45476 URL: http://svnweb.freebsd.org/changeset/doc/45476 Log: Add documentation for autofs(5). Reviewed by: gjb@ Approved by: gjb@ Sponsored by: The FreeBSD Foundation Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Mon Aug 18 19:00:13 2014 (r45475) +++ head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml Tue Aug 19 09:54:47 2014 (r45476) @@ -797,7 +797,7 @@ rpc_statd_enable="YES" - Automating Mounts + Automating Mounts With &man.amd.8; @@ -897,6 +897,113 @@ Exports list on foobar: Consult &man.amd.8; and &man.amd.conf.5; for more information. + + + Automating Mounts with &man.autofs.5; + + + The &man.autofs.5; automount facility is supported + starting with &os; 10.1-RELEASE. To use the + automounter functionality in older versions of &os;, use + &man.amd.8; instead. This chapter only describes the + &man.autofs.5; automounter. + + + + autofs + + automounter subsystem + + + The &man.autofs.5; facility is a common name for several + components that, together, allow for automatic mounting of + remote and local filesystems whenever a file or directory + within that file system is accessed. It consists of the + kernel component, &man.autofs.5;, and several userspace + applications: &man.automount.8;, &man.automountd.8; and + &man.autounmountd.8;. It serves as an alternative for + &man.amd.8; from previous &os; releases. Amd is still + provided for backward compatibility purposes, as the two use + different map format; the one used by autofs is the same as + with other SVR4 automounters, such as the ones in Solaris, + MacOS X, and Linux. + + The &man.autofs.5; source is mounted on specified + mountpoints by &man.automount.8;, usually invoked during + boot. + + Whenever a process attempts to access file within the + &man.autofs.5; mountpoint, the kernel will notify + &man.automountd.8; daemon and pause the triggering process. + The &man.automountd.8; daemon will handle kernel requests by + finding the proper map and mounting the filesystem according + to it, then signal the kernel to release blocked process. The + &man.autounmountd.8; daemon automatically unmounts automounted + filesystems after some time, unless they are still being + used. + + The primary autofs configuration file is + /etc/auto_master. It assigns individual + maps to top-level mounts. For an explanation of + auto_master and the map syntax, refer to + &man.auto.master.5;. + + There is a special automounter map mounted on + /net. When a file is accessed within + this directory, &man.autofs.5; looks up the corresponding + remote mount and automatically mounts it. For instance, an + attempt to access a file within + /net/foobar/usr would tell + &man.automountd.8; to mount the /usr export from the host + foobar. + + + Mounting an Export With &man.autofs.5; + + In this example, showmount -e shows + the exported file systems that can be mounted from the + NFS server, + foobar: + + &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 + + + The output from showmount shows + /usr as an export. + When changing directories to /host/foobar/usr, + &man.automountd.8; intercepts the request and attempts to + resolve the hostname foobar. If successful, + &man.automountd.8; automatically mounts the source + export. + + To enable &man.autofs.5; at boot time, add this line to + /etc/rc.conf: + + autofs_enable="YES" + + Then &man.autofs.5; can be started by running: + + &prompt.root; service automount start + &prompt.root; service automountd start + &prompt.root; service autounmountd start + + The &man.autofs.5; map format is the same as in other + operating systems, it might be desirable to consult + information from other operating systems, such as the Mac + OS X document. + + Consult the &man.automount.8;, &man.automountd.8;, + &man.autounmountd.8;, and &man.auto.master.5; manual pages for + more information. +