svn commit: r47846 - head/en_US.ISO8859-1/books/handbook/disks

Edward Tomasz Napierala <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
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: &lt;STECH Simple Drive 1.04&gt; s/n WD-WXE508CAN263          detached
 (da0:umass-sim0:0:0:0): Periph destroyed</screen>
     </sect2>
+
+    <sect2>
+      <title>Automounting Removable Media</title>
+
+      <note>
+        <para>&man.autofs.5; supports automatic mounting of
+	  removable media starting with &os;&nbsp;10.2-RELEASE.</para>
+      </note>
+
+      <para><acronym>USB</acronym> devices can be automatically
+        mounted by uncommenting this line in
+	<filename>/etc/auto_master</filename>:</para>
+
+      <screen>/media		-media		-nosuid</screen>
+
+      <para>Then add these lines to
+	<filename>/etc/devd.conf</filename>:</para>
+
+      <screen>notify 100 {
+	match "system" "GEOM";
+	match "subsystem" "DEV";
+	action "/usr/sbin/automount -c";
+};
+</screen>
+
+      <para>Reload the configuration if &man.autofs.5;
+        and &man.devd.8; are already running:</para>
+
+      <screen>&prompt.root; <userinput>service automount reload</userinput>
+&prompt.root; <userinput>service devd restart</userinput></screen>
+
+      <para>&man.autofs.5; can be set to start at boot by adding this
+        line to <filename>/etc/rc.conf</filename>:</para>
+
+      <programlisting>autofs_enable="YES"</programlisting>
+
+      <para>&man.autofs.5; requires &man.devd.8; to be enabled, as it
+        is by default.</para>
+
+      <para>Start the services immediately with:</para>
+
+      <screen>&prompt.root; <userinput>service automount start</userinput>
+&prompt.root; <userinput>service automountd start</userinput>
+&prompt.root; <userinput>service autounmountd start</userinput>
+&prompt.root; <userinput>service devd start</userinput></screen>
+
+      <para>Each file system that can be automatically mounted appears
+        as a directory in <filename>/media/</filename>.  The directory
+	is named after the file system label.  If the label is
+	missing, the directory is named after the device node.</para>
+
+      <para>The file system is transparently mounted on the first
+        access, and unmounted after a period of inactivity.
+	Automounted drives can also be unmounted manually:</para>
+
+      <screen>&prompt.root; <userinput>automount -fu</userinput></screen>
+
+      <para>This mechanism is typically used for memory cards and
+        <acronym>USB</acronym> memory sticks.  It can be used with
+	any block device, including optical drives or
+	<acronym>iSCSI</acronym> <acronym>LUN</acronym>s.</para>
+    </sect2>
   </sect1>
 
   <sect1 xml:id="creating-cds">
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-doc-all
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.