source: postlfs/config/autofs.xml@ 80d619f0

6.3 6.3-rc3
Last change on this file since 80d619f0 was 410e228b, checked in by Randy McMurchy <randy@…>, 16 years ago

Removed extraneous whitespace from the ends of line text

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@7431 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6 <!ENTITY autofs-patch-dir "http://ftp.kernel.org/pub/linux/daemons/autofs/v5">
7 <!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
8 <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
9 <!ENTITY autofs-md5sum "27839fe6fa8105b2b7d31bc922fd7cf6">
10 <!ENTITY autofs-size "221 KB">
11 <!ENTITY autofs-buildsize "9 MB">
12 <!ENTITY autofs-time "less than 0.1 SBU">
13]>
14
15<sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
16 <?dbhtml filename="autofs.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Automate Mounting of File Systems</title>
24
25 <indexterm zone="autofs">
26 <primary sortas="a-Autofs">Autofs</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Autofs</title>
31
32 <para>The <application>Autofs</application> package contains userspace
33 tools that work with the kernel to mount and un-mount removable file
34 systems. The primary use is to mount external network file systems like
35 NFS (see <xref linkend="nfs-utils"/>) or Samba (see <xref linkend="samba3"/>)
36 on demand.</para>
37
38 <para>It may also be useful for allowing users to mount floppies, cdroms and
39 other removable storage devices without requiring the system
40 administrator to mount the devices although this capability is now generally
41 provided by HAL (see <xref linkend="hal"/>). This may not be ideal for all
42 installations, so be aware of the risks before implementing this feature.</para>
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &autofs-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &autofs-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &autofs-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &autofs-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
67
68 <para>Recommended Patches: There are frequent patches issued
69 for <application>Autofs</application>. To get the current patches,
70 start in the same directory as the main tar file and run:</para>
71
72<screen><userinput>wget &autofs-patch-dir;/patch_order-&autofs-version; &amp;&amp;
73sed 's;autofs;&autofs-patch-dir;/autofs;' \
74 patch_order-&autofs-version; &gt; wget-list &amp;&amp;
75wget -i wget-list</userinput></screen>
76
77 <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Optional</bridgehead>
80 <para role="optional"><xref linkend="openldap"/> and
81 <xref linkend="cyrus-sasl"/></para>
82
83 <para condition="html" role="usernotes">User Notes:
84 <ulink url="&blfs-wiki;/autofs"/></para>
85
86 </sect2>
87
88 <sect2 role="kernel" id="autofs-kernel">
89 <title>Kernel Configuration</title>
90
91 <indexterm zone="autofs autofs-kernel">
92 <primary sortas="d-Automounter">Automounter</primary>
93 </indexterm>
94
95 <para>Verify that kernel support has been compiled in or built as
96 modules in the following areas:</para>
97
98<screen><literal>File systems &rArr;
99 Kernel automounter version 4 support Y or M
100 Network File Systems &rArr;
101 NFS file system support Y or M (optional)
102 SMB file system support Y or M (optional)</literal></screen>
103
104 <para>Recompile and install the new kernel, if necessary.</para>
105
106 </sect2>
107
108 <sect2 role="installation">
109
110 <title>Installation of Autofs</title>
111
112 <para>Install <application>Autofs</application> by running the following
113 commands:</para>
114
115<screen><userinput>for f in `cat ../patch_order-&autofs-version;`; do
116 patch -Np1 -i ../$f
117done &amp;&amp;
118./configure --prefix=/ --mandir=/usr/share/man &amp;&amp;
119make</userinput></screen>
120
121 <para>This package does not come with a test suite.</para>
122
123 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
124
125<screen role="root"><userinput>make install &amp;&amp;
126ln -sf ../init.d/autofs /etc/rc.d/rcsysinit.d/S52autofs</userinput></screen>
127
128 </sect2>
129
130 <sect2 role="commands">
131 <title>Command Explanations</title>
132
133 <para><command>for f in `cat ../patch_order-&autofs-version;`; do
134 patch -Np1 -i ../$f; done</command>: This command applies all the
135 patches fetched earlier in the correct order.</para>
136
137 <para><command>ln -sf ../init.d/autofs
138 /etc/rc.d/rcsysinit.d/S52autofs</command>: This command sets the
139 link to properly start autofs upon boot.</para>
140
141 </sect2>
142
143 <sect2 role="configuration">
144 <title>Configuring Autofs</title>
145
146 <sect3 id="autofs-config">
147 <title>Config Files</title>
148
149 <para><filename>/etc/sysconfig/autofs.conf</filename>,
150 <filename>/etc/auto.master</filename>,
151 <filename>/etc/auto.misc</filename>, and
152 <filename>/etc/auto.net</filename></para>
153
154 <indexterm zone="autofs autofs-config" >
155 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
156 </indexterm>
157
158 <indexterm zone="autofs autofs-config">
159 <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
160 </indexterm>
161
162 <indexterm zone="autofs autofs-config">
163 <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
164 </indexterm>
165
166 <indexterm zone="autofs autofs-config">
167 <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
168 </indexterm>
169
170 </sect3>
171
172 <sect3>
173 <title>Configuration Information</title>
174
175 <para>The installation process creates <filename>auto.master</filename>,
176 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
177 <filename>auto.net</filename>. Replace the
178 <filename>auto.master</filename> file with the following commands:</para>
179
180<screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &amp;&amp;
181cat &gt; /etc/auto.master &lt;&lt; "EOF"
182<literal># Begin /etc/auto.master
183
184/media/auto /etc/auto.misc --ghost
185#/home /etc/auto.home
186
187# End /etc/auto.master</literal>
188EOF</userinput></screen>
189
190 <para>This file creates a new media directory, <filename>/media/auto</filename>
191 that will overlay any existing directory of the same name. In this example,
192 the file, <filename>/etc/auto.misc</filename>, has a line:</para>
193
194<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
195
196 <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
197 that directory is accessed. The <option>--ghost</option> option tells
198 the automounter to create <quote>ghost</quote> versions (i.e. empty
199 directories) of all the mount points listed in the configuration file
200 regardless whether any of the file systems are actually mounted or not.
201 This is very convenient and highly recommended, because it will show you
202 the available auto-mountable file systems as existing directories, even
203 when their file systems aren't currently mounted. Without the
204 <option>--ghost</option> option, you'll have to remember the names of the
205 directories. As soon as you try to access one of them, the directory will
206 be created and the file system will be mounted. When the file system gets
207 unmounted again, the directory is destroyed too, unless the
208 <option>--ghost</option> option was given.</para>
209
210 <note>
211 <para>An alternative method would be to specify another automount
212 location such as <filename
213 class='directory'>/var/lib/auto/cdrom</filename> and create a
214 symbolic link from <filename class='directory'>/media/cdrom</filename>
215 to the automount location.</para>
216 </note>
217
218 <para>The <filename>auto.misc</filename> file must be configured to your
219 working hardware. The loaded configuration file should load your cdrom
220 if <filename>/dev/cdrom</filename> is active or it can be edited to
221 match your device setup. Examples for floppies are available in the file
222 and easily activated. Documentation for this file is available using the
223 <command>man 5 autofs</command> command.</para>
224
225 <para>In the second line, if enabled, a user's home directory would be
226 mounted via NFS upon login. The <filename>/etc/home.auto</filename>
227 would need to exist and have an entry similar to:</para>
228
229<screen>joe example.org:/export/home/joe</screen>
230
231 <para>where the directory <filename>/export/home/joe</filename> is
232 exported via NFS from the system example.org. NFS shares
233 are covered on the next page.</para>
234
235 <para>This package could also be used to mount SMB shares, however that
236 feature is not configured in these instructions. For additional
237 configuration information, see the man pages for auto.master(5). There
238 are also web resources such as this <ulink
239 url='http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS)#Config_files'>AUTOFS
240 HOWTO</ulink> available.</para>
241
242 </sect3>
243
244<!--
245 <sect3 id="autofs-init">
246 <title>Boot Script</title>
247
248
249 <para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
250 and <filename>/etc/sysconfig/autofs.conf</filename> support file included
251 with the <xref linkend="bootscripts"/> package.</para>
252
253 <indexterm zone="autofs autofs-init">
254 <primary sortas="f-autofs-init">autofs</primary>
255 </indexterm>
256
257<screen role="root"><userinput>make install-autofs</userinput></screen>
258
259 <para>The time-out variable is set in
260 <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
261 a default of 60 seconds of inactivity before unmounting the device. A
262 much shorter time may be necessary to protect buffer writing to a floppy
263 if users tend to remove the media prior to the timeout setting.</para>
264
265 </sect3>
266-->
267
268 </sect2>
269
270 <sect2 role="content">
271 <title>Contents</title>
272
273 <segmentedlist>
274 <segtitle>Installed Program</segtitle>
275 <segtitle>Installed Libraries</segtitle>
276 <segtitle>Installed Directories</segtitle>
277
278 <seglistitem>
279 <seg>automount</seg>
280 <seg>lookup_file.so, lookup_hosts.so, lookup_multi.so,
281 lookup_nisplus.so, lookup_program.so, lookup_userhome.so,
282 lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so,
283 mount_changer.so, mount_ext2.so, mount_generic.so,
284 mount_nfs.so, parse_sun.so</seg>
285 <seg>/lib/autofs and /var/run/autofs</seg>
286 </seglistitem>
287 </segmentedlist>
288
289 <variablelist>
290 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
291 <?dbfo list-presentation="list"?>
292 <?dbhtml list-presentation="table"?>
293
294 <varlistentry id="automount">
295 <term><command>automount</command></term>
296 <listitem>
297 <para>is the daemon that performs the mounting when a request is
298 made for the device.</para>
299 <indexterm zone="autofs automount">
300 <primary sortas="b-automount">automount</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 </variablelist>
306
307 </sect2>
308
309</sect1>
Note: See TracBrowser for help on using the repository browser.