source: general/sysutils/autofs.xml@ a0c3cfb

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since a0c3cfb was 8ff67045, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Update introduction to autofs

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

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