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

6.3 6.3-rc3
Last change on this file since 24c737dd was 24c737dd, checked in by Randy McMurchy <randy@…>, 16 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
RevLine 
[7ef22cf]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[7ef22cf]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
[d4bf650a]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">
[32d0e29]8 <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.bz2">
[d4bf650a]9 <!ENTITY autofs-md5sum "27839fe6fa8105b2b7d31bc922fd7cf6">
10 <!ENTITY autofs-size "221 KB">
[32d0e29]11 <!ENTITY autofs-buildsize "9 MB">
[460c6edb]12 <!ENTITY autofs-time "less than 0.1 SBU">
[7ef22cf]13]>
14
[32d0e29]15<sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
[d3ad3271]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
[32d0e29]32 <para>The <application>Autofs</application> package contains userspace
[d3ad3271]33 tools that work with the kernel to mount and un-mount removable file
[d4bf650a]34 systems. The primary use is to mount external network file systems like
[32d0e29]35 NFS (see <xref linkend="nfs-utils"/>) or Samba (see <xref linkend="samba3"/>)
[d4bf650a]36 on demand.</para>
[fd7e0ed6]37
[d4bf650a]38 <para>It may also be useful for allowing users to mount floppies, cdroms and
[d3ad3271]39 other removable storage devices without requiring the system
[d4bf650a]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
[d3ad3271]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>
[32d0e29]67
[24c737dd]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>
[fd7e0ed6]75
[d4bf650a]76<screen><userinput>wget &autofs-patch-dir;/patch_order-&autofs-version; &amp;&amp;
[32d0e29]77sed 's;autofs;&autofs-patch-dir;/autofs;' \
78 patch_order-&autofs-version; &gt; wget-list &amp;&amp;
[d4bf650a]79wget -i wget-list</userinput></screen>
[fd7e0ed6]80
[81066706]81 <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
[50d1a60]82
[81066706]83 <bridgehead renderas="sect4">Optional</bridgehead>
84 <para role="optional"><xref linkend="openldap"/> and
85 <xref linkend="cyrus-sasl"/></para>
[50d1a60]86
[3597eb6]87 <para condition="html" role="usernotes">User Notes:
88 <ulink url="&blfs-wiki;/autofs"/></para>
89
[d3ad3271]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
[6a0e6e4]102<screen><literal>File systems &rArr;
[e19ad480]103 Kernel automounter version 4 support Y or M
[6a0e6e4]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>
[d612b9f]107
[d3ad3271]108 <para>Recompile and install the new kernel, if necessary.</para>
[7ef22cf]109
[d3ad3271]110 </sect2>
[0290a023]111
[d3ad3271]112 <sect2 role="installation">
[d612b9f]113
[d3ad3271]114 <title>Installation of Autofs</title>
115
[32d0e29]116 <para>Install <application>Autofs</application> by running the following
[d3ad3271]117 commands:</para>
118
[410e228b]119<screen><userinput>for f in `cat ../patch_order-&autofs-version;`; do
[d4bf650a]120 patch -Np1 -i ../$f
121done &amp;&amp;
[6b104248]122./configure --prefix=/ --mandir=/usr/share/man &amp;&amp;
[d3ad3271]123make</userinput></screen>
124
[d4bf650a]125 <para>This package does not come with a test suite.</para>
126
[d3ad3271]127 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
128
129<screen role="root"><userinput>make install &amp;&amp;
[bb06362a]130ln -sf ../init.d/autofs /etc/rc.d/rcsysinit.d/S52autofs</userinput></screen>
[d3ad3271]131
132 </sect2>
133
134 <sect2 role="commands">
135 <title>Command Explanations</title>
136
[d4bf650a]137 <para><command>for f in `cat ../patch_order-&autofs-version;`; do
[410e228b]138 patch -Np1 -i ../$f; done</command>: This command applies all the
[24c737dd]139 patches downloaded earlier in the correct order.</para>
[765a494]140
[410e228b]141 <para><command>ln -sf ../init.d/autofs
142 /etc/rc.d/rcsysinit.d/S52autofs</command>: This command sets the
[d4bf650a]143 link to properly start autofs upon boot.</para>
[d260aaf4]144
[d3ad3271]145 </sect2>
[d260aaf4]146
[d3ad3271]147 <sect2 role="configuration">
148 <title>Configuring Autofs</title>
[7ef22cf]149
[d3ad3271]150 <sect3 id="autofs-config">
151 <title>Config Files</title>
[7ef22cf]152
[d3ad3271]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>
[7ef22cf]157
[d3ad3271]158 <indexterm zone="autofs autofs-config" >
159 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
160 </indexterm>
[7ef22cf]161
[d3ad3271]162 <indexterm zone="autofs autofs-config">
163 <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
164 </indexterm>
[7ef22cf]165
[d3ad3271]166 <indexterm zone="autofs autofs-config">
167 <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
168 </indexterm>
[7ef22cf]169
[d3ad3271]170 <indexterm zone="autofs autofs-config">
171 <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
172 </indexterm>
[7ef22cf]173
[d3ad3271]174 </sect3>
[7ef22cf]175
[d3ad3271]176 <sect3>
177 <title>Configuration Information</title>
[7ef22cf]178
[d3ad3271]179 <para>The installation process creates <filename>auto.master</filename>,
[d4bf650a]180 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
[32d0e29]181 <filename>auto.net</filename>. Replace the
182 <filename>auto.master</filename> file with the following commands:</para>
[d3ad3271]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
[7ef22cf]187
[9415459]188/media/auto /etc/auto.misc --ghost
189#/home /etc/auto.home
[7ef22cf]190
[d3ad3271]191# End /etc/auto.master</literal>
192EOF</userinput></screen>
193
[9415459]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
[32d0e29]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>
[9415459]213
[d3ad3271]214 <note>
[9415459]215 <para>An alternative method would be to specify another automount
[32d0e29]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>
[d612b9f]220 </note>
[d3ad3271]221
[9415459]222 <para>The <filename>auto.misc</filename> file must be configured to your
[d3ad3271]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
[9415459]225 match your device setup. Examples for floppies are available in the file
[d3ad3271]226 and easily activated. Documentation for this file is available using the
227 <command>man 5 autofs</command> command.</para>
228
[9415459]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
[32d0e29]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
[9415459]242 are also web resources such as this <ulink
[410e228b]243 url='http://gentoo-wiki.com/HOWTO_Auto_mount_filesystems_(AUTOFS)#Config_files'>AUTOFS
[32d0e29]244 HOWTO</ulink> available.</para>
[9415459]245
[d3ad3271]246 </sect3>
[32d0e29]247
[d4bf650a]248<!--
[d3ad3271]249 <sect3 id="autofs-init">
250 <title>Boot Script</title>
251
252
[e0d33ef]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
[5254d12]255 with the <xref linkend="bootscripts"/> package.</para>
[d3ad3271]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
[e0d33ef]266 much shorter time may be necessary to protect buffer writing to a floppy
[d3ad3271]267 if users tend to remove the media prior to the timeout setting.</para>
268
269 </sect3>
[d4bf650a]270-->
[32d0e29]271
[d3ad3271]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>
[d4bf650a]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,
[410e228b]287 mount_changer.so, mount_ext2.so, mount_generic.so,
[d4bf650a]288 mount_nfs.so, parse_sun.so</seg>
[460c6edb]289 <seg>/lib/autofs and /var/run/autofs</seg>
[d3ad3271]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>
[e0d33ef]301 <para>is the daemon that performs the mounting when a request is
[d3ad3271]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>
[7ef22cf]312
313</sect1>
Note: See TracBrowser for help on using the repository browser.