source: postlfs/config/autofs.xml@ 24c737d

6.3 6.3-rc3
Last change on this file since 24c737d was 24c737d, checked in by Randy McMurchy <randy@…>, 14 years ago

Added text to the AutoFS instructions pointing out that the wget package must be installed, thanks to Leonhard Landrock for the report

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

  • Property mode set to 100644
File size: 11.8 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 for
69 <application>Autofs</application>. One method you can use to get the
70 current patches requires first installing the <xref linkend="wget"/>
71 package. After ensuring the <command>wget</command> command is installed
72 in a directory identified in the <envar>PATH</envar> variable, start in
73 the same directory as the main tar file and issue the following
74 commands:</para>
75
76<screen><userinput>wget &autofs-patch-dir;/patch_order-&autofs-version; &amp;&amp;
77sed 's;autofs;&autofs-patch-dir;/autofs;' \
78 patch_order-&autofs-version; &gt; wget-list &amp;&amp;
79wget -i wget-list</userinput></screen>
80
81 <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
82
83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional"><xref linkend="openldap"/> and
85 <xref linkend="cyrus-sasl"/></para>
86
87 <para condition="html" role="usernotes">User Notes:
88 <ulink url="&blfs-wiki;/autofs"/></para>
89
90 </sect2>
91
92 <sect2 role="kernel" id="autofs-kernel">
93 <title>Kernel Configuration</title>
94
95 <indexterm zone="autofs autofs-kernel">
96 <primary sortas="d-Automounter">Automounter</primary>
97 </indexterm>
98
99 <para>Verify that kernel support has been compiled in or built as
100 modules in the following areas:</para>
101
102<screen><literal>File systems &rArr;
103 Kernel automounter version 4 support Y or M
104 Network File Systems &rArr;
105 NFS file system support Y or M (optional)
106 SMB file system support Y or M (optional)</literal></screen>
107
108 <para>Recompile and install the new kernel, if necessary.</para>
109
110 </sect2>
111
112 <sect2 role="installation">
113
114 <title>Installation of Autofs</title>
115
116 <para>Install <application>Autofs</application> by running the following
117 commands:</para>
118
119<screen><userinput>for f in `cat ../patch_order-&autofs-version;`; do
120 patch -Np1 -i ../$f
121done &amp;&amp;
122./configure --prefix=/ --mandir=/usr/share/man &amp;&amp;
123make</userinput></screen>
124
125 <para>This package does not come with a test suite.</para>
126
127 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
128
129<screen role="root"><userinput>make install &amp;&amp;
130ln -sf ../init.d/autofs /etc/rc.d/rcsysinit.d/S52autofs</userinput></screen>
131
132 </sect2>
133
134 <sect2 role="commands">
135 <title>Command Explanations</title>
136
137 <para><command>for f in `cat ../patch_order-&autofs-version;`; do
138 patch -Np1 -i ../$f; done</command>: This command applies all the
139 patches downloaded earlier in the correct order.</para>
140
141 <para><command>ln -sf ../init.d/autofs
142 /etc/rc.d/rcsysinit.d/S52autofs</command>: This command sets the
143 link to properly start autofs upon boot.</para>
144
145 </sect2>
146
147 <sect2 role="configuration">
148 <title>Configuring Autofs</title>
149
150 <sect3 id="autofs-config">
151 <title>Config Files</title>
152
153 <para><filename>/etc/sysconfig/autofs.conf</filename>,
154 <filename>/etc/auto.master</filename>,
155 <filename>/etc/auto.misc</filename>, and
156 <filename>/etc/auto.net</filename></para>
157
158 <indexterm zone="autofs autofs-config" >
159 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
160 </indexterm>
161
162 <indexterm zone="autofs autofs-config">
163 <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
164 </indexterm>
165
166 <indexterm zone="autofs autofs-config">
167 <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
168 </indexterm>
169
170 <indexterm zone="autofs autofs-config">
171 <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
172 </indexterm>
173
174 </sect3>
175
176 <sect3>
177 <title>Configuration Information</title>
178
179 <para>The installation process creates <filename>auto.master</filename>,
180 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
181 <filename>auto.net</filename>. Replace the
182 <filename>auto.master</filename> file with the following commands:</para>
183
184<screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &amp;&amp;
185cat &gt; /etc/auto.master &lt;&lt; "EOF"
186<literal># Begin /etc/auto.master
187
188/media/auto /etc/auto.misc --ghost
189#/home /etc/auto.home
190
191# End /etc/auto.master</literal>
192EOF</userinput></screen>
193
194 <para>This file creates a new media directory, <filename>/media/auto</filename>
195 that will overlay any existing directory of the same name. In this example,
196 the file, <filename>/etc/auto.misc</filename>, has a line:</para>
197
198<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
199
200 <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
201 that directory is accessed. The <option>--ghost</option> option tells
202 the automounter to create <quote>ghost</quote> versions (i.e. empty
203 directories) of all the mount points listed in the configuration file
204 regardless whether any of the file systems are actually mounted or not.
205 This is very convenient and highly recommended, because it will show you
206 the available auto-mountable file systems as existing directories, even
207 when their file systems aren't currently mounted. Without the
208 <option>--ghost</option> option, you'll have to remember the names of the
209 directories. As soon as you try to access one of them, the directory will
210 be created and the file system will be mounted. When the file system gets
211 unmounted again, the directory is destroyed too, unless the
212 <option>--ghost</option> option was given.</para>
213
214 <note>
215 <para>An alternative method would be to specify another automount
216 location such as <filename
217 class='directory'>/var/lib/auto/cdrom</filename> and create a
218 symbolic link from <filename class='directory'>/media/cdrom</filename>
219 to the automount location.</para>
220 </note>
221
222 <para>The <filename>auto.misc</filename> file must be configured to your
223 working hardware. The loaded configuration file should load your cdrom
224 if <filename>/dev/cdrom</filename> is active or it can be edited to
225 match your device setup. Examples for floppies are available in the file
226 and easily activated. Documentation for this file is available using the
227 <command>man 5 autofs</command> command.</para>
228
229 <para>In the second line, if enabled, a user's home directory would be
230 mounted via NFS upon login. The <filename>/etc/home.auto</filename>
231 would need to exist and have an entry similar to:</para>
232
233<screen>joe example.org:/export/home/joe</screen>
234
235 <para>where the directory <filename>/export/home/joe</filename> is
236 exported via NFS from the system example.org. NFS shares
237 are covered on the next page.</para>
238
239 <para>This package could also be used to mount SMB shares, however that
240 feature is not configured in these instructions. For additional
241 configuration information, see the man pages for auto.master(5). There
242 are also web resources such as this <ulink
243 url='http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS)#Config_files'>AUTOFS
244 HOWTO</ulink> available.</para>
245
246 </sect3>
247
248<!--
249 <sect3 id="autofs-init">
250 <title>Boot Script</title>
251
252
253 <para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
254 and <filename>/etc/sysconfig/autofs.conf</filename> support file included
255 with the <xref linkend="bootscripts"/> package.</para>
256
257 <indexterm zone="autofs autofs-init">
258 <primary sortas="f-autofs-init">autofs</primary>
259 </indexterm>
260
261<screen role="root"><userinput>make install-autofs</userinput></screen>
262
263 <para>The time-out variable is set in
264 <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
265 a default of 60 seconds of inactivity before unmounting the device. A
266 much shorter time may be necessary to protect buffer writing to a floppy
267 if users tend to remove the media prior to the timeout setting.</para>
268
269 </sect3>
270-->
271
272 </sect2>
273
274 <sect2 role="content">
275 <title>Contents</title>
276
277 <segmentedlist>
278 <segtitle>Installed Program</segtitle>
279 <segtitle>Installed Libraries</segtitle>
280 <segtitle>Installed Directories</segtitle>
281
282 <seglistitem>
283 <seg>automount</seg>
284 <seg>lookup_file.so, lookup_hosts.so, lookup_multi.so,
285 lookup_nisplus.so, lookup_program.so, lookup_userhome.so,
286 lookup_yp.so, mount_afs.so, mount_autofs.so, mount_bind.so,
287 mount_changer.so, mount_ext2.so, mount_generic.so,
288 mount_nfs.so, parse_sun.so</seg>
289 <seg>/lib/autofs and /var/run/autofs</seg>
290 </seglistitem>
291 </segmentedlist>
292
293 <variablelist>
294 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
295 <?dbfo list-presentation="list"?>
296 <?dbhtml list-presentation="table"?>
297
298 <varlistentry id="automount">
299 <term><command>automount</command></term>
300 <listitem>
301 <para>is the daemon that performs the mounting when a request is
302 made for the device.</para>
303 <indexterm zone="autofs automount">
304 <primary sortas="b-automount">automount</primary>
305 </indexterm>
306 </listitem>
307 </varlistentry>
308
309 </variablelist>
310
311 </sect2>
312
313</sect1>
Note: See TracBrowser for help on using the repository browser.