From owner-svn-doc-all@freebsd.org Sun Dec 13 09:45:25 2015 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE078A42474; Sun, 13 Dec 2015 09:45:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 83E421AA5; Sun, 13 Dec 2015 09:45:25 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBD9jO4S081413; Sun, 13 Dec 2015 09:45:24 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBD9jOwE081412; Sun, 13 Dec 2015 09:45:24 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201512130945.tBD9jOwE081412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 13 Dec 2015 09:45:24 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r47846 - head/en_US.ISO8859-1/books/handbook/disks X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2015 09:45:25 -0000 Author: trasz (src,ports committer) Date: Sun Dec 13 09:45:24 2015 New Revision: 47846 URL: https://svnweb.freebsd.org/changeset/doc/47846 Log: Describe how to use removable media with autofs(5). Reviewed by: emaste@, wblock@ Approved by: gjb@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3980 Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Sat Dec 12 14:04:04 2015 (r47845) +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Sun Dec 13 09:45:24 2015 (r47846) @@ -508,6 +508,68 @@ da0 at umass-sim0 bus 0 scbus4 target 0 da0: <STECH Simple Drive 1.04> s/n WD-WXE508CAN263 detached (da0:umass-sim0:0:0:0): Periph destroyed + + + Automounting Removable Media + + + &man.autofs.5; supports automatic mounting of + removable media starting with &os; 10.2-RELEASE. + + + USB devices can be automatically + mounted by uncommenting this line in + /etc/auto_master: + + /media -media -nosuid + + Then add these lines to + /etc/devd.conf: + + notify 100 { + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; +}; + + + Reload the configuration if &man.autofs.5; + and &man.devd.8; are already running: + + &prompt.root; service automount reload +&prompt.root; service devd restart + + &man.autofs.5; can be set to start at boot by adding this + line to /etc/rc.conf: + + autofs_enable="YES" + + &man.autofs.5; requires &man.devd.8; to be enabled, as it + is by default. + + Start the services immediately with: + + &prompt.root; service automount start +&prompt.root; service automountd start +&prompt.root; service autounmountd start +&prompt.root; service devd start + + Each file system that can be automatically mounted appears + as a directory in /media/. The directory + is named after the file system label. If the label is + missing, the directory is named after the device node. + + The file system is transparently mounted on the first + access, and unmounted after a period of inactivity. + Automounted drives can also be unmounted manually: + + &prompt.root; automount -fu + + This mechanism is typically used for memory cards and + USB memory sticks. It can be used with + any block device, including optical drives or + iSCSI LUNs. +