Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143149386
D3980.id9650.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D3980.id9650.diff
View Options
Index: en_US.ISO8859-1/books/handbook/disks/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/handbook/disks/chapter.xml
+++ en_US.ISO8859-1/books/handbook/disks/chapter.xml
@@ -508,6 +508,57 @@
da0: <STECH Simple Drive 1.04> s/n WD-WXE508CAN263 detached
(da0:umass-sim0:0:0:0): Periph destroyed</screen>
</sect2>
+ <sect2>
+ <title>Automounting removable media</title>
+
+ <note>
+ <para>The -media &man.autofs.5; map is supported
+ starting with &os; 10.2-RELEASE.</para>
+ </note>
+
+ <para>To automatically mount the <acronym>USB</acronym> device,
+ uncomment the following line in <filename>/etc/auto_master</filename>:</para>
+ <screen>/media -media -nosuid</screen>
+
+ <para>Second step is to add the following lines to <filename>/etc/devd.conf</filename>;
+ default configuration file contains them, but in the comments section:</para>
+ <screen># Discard autofs caches, useful for the -media special map.
+notify 100 {
+ match "system" "GEOM";
+ match "subsystem" "DEV";
+ action "/usr/sbin/automount -c";
+};
+</screen>
+
+ <para>If autofs and devd are already running, one must reload their
+ configuration by using:</para>
+ <screen>&prompt.root; <userinput>service automount reload</userinput>
+&prompt.root; <userinput>service devd reload</userinput></screen>
+
+ <para>To enable &man.autofs.5; and &man.devd.8; at boot time, add those lines to
+ <filename>/etc/rc.conf</filename>:</para>
+
+ <programlisting>autofs_enable="YES"
+devd_enable="YES"</programlisting>
+
+ <para>Then &man.autofs.5; and &man.devd.8; can be started by running:</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 will appear as a directory
+ in <filename>/media</filename>, named after the filesystem label, or, if the label
+ is missing, after the device node. It will be transparently mounted on first access,
+ and unmounted after some period of inactivity. Automounted drives can also be unmounted
+ by hand by using:</para>
+ <screen>&prompt.root; <userinput>automount -fu</userinput></screen>
+
+ <para>This mechanism works for any block devices - not just USB sticks, but also
+ optical drives or iSCSI LUNs.</para>
+
+ </sect2>
</sect1>
<sect1 xml:id="creating-cds">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 27, 2:44 PM (6 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28057394
Default Alt Text
D3980.id9650.diff (2 KB)
Attached To
Mode
D3980: Mention -media autofs map in the handbook.
Attached
Detach File
Event Timeline
Log In to Comment