source: general/sysutils/autofs.xml@ 5ff8c3a

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/soup3 xry111/xf86-video-removal
Last change on this file since 5ff8c3a was 7263a049, checked in by Bruce Dubbs <bdubbs@…>, 20 months ago

Tags

  • Property mode set to 100644
File size: 14.0 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
7 <!ENTITY autofs-download-http "&kernel-dl;/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
8 <!ENTITY autofs-download-ftp " ">
9 <!ENTITY autofs-md5sum "72d81645d39a857c3d16bd3a32e9cb44">
10 <!ENTITY autofs-size "320 KB">
11 <!ENTITY autofs-buildsize "6.5 MB">
12 <!ENTITY autofs-time "0.1 SBU">
13]>
14
15<sect1 id="autofs" xreflabel="Autofs-&autofs-version;">
16 <?dbhtml filename="autofs.html"?>
17
18 <sect1info>
19 <date>$Date$</date>
20 </sect1info>
21
22 <title>autofs-&autofs-version;</title>
23
24 <indexterm zone="autofs">
25 <primary sortas="a-Autofs">Autofs</primary>
26 </indexterm>
27
28 <sect2 role="package">
29 <title>Introduction to Autofs</title>
30
31 <para>
32 <application>Autofs</application> controls the operation of the automount
33 daemons. The automount daemons automatically mount filesystems when they
34 are accessed and unmount them after a period of inactivity. This is done
35 based on a set of pre-configured maps.
36 </para>
37
38 &lfs112_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&autofs-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&autofs-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &autofs-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &autofs-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &autofs-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &autofs-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">Autofs Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="libtirpc"/> and
79 <xref linkend="rpcsvc-proto"/>
80 </para>
81
82 <bridgehead renderas="sect4">Optional</bridgehead>
83 <para role="optional">
84 <xref linkend="nfs-utils"/>,
85 <xref linkend="libnsl"/>,
86 <xref linkend="libxml2"/>,
87 <xref linkend="mitkrb"/>,
88 <xref linkend="openldap"/> (client only), and
89 <xref linkend="cyrus-sasl"/>
90 </para>
91
92 <para condition="html" role="usernotes">User Notes:
93 <ulink url="&blfs-wiki;/autofs"/></para>
94
95 </sect2>
96
97 <sect2 role="kernel" id="autofs-kernel">
98 <title>Kernel Configuration</title>
99
100 <indexterm zone="autofs autofs-kernel">
101 <primary sortas="d-Automounter">Automounter</primary>
102 </indexterm>
103
104 <para>
105 Verify that automounter kernel support has been enabled:
106 </para>
107
108<screen><literal>File systems ---&gt;
109 &lt;*/M&gt; Kernel automounter support (supports v3, v4, and v5) [CONFIG_AUTOFS_FS]</literal></screen>
110
111 <para>
112 Optionally, enable the following options in the kernel configuration:
113 </para>
114
115<screen><literal>File systems ---&gt;
116 [*] Network File Systems ---&gt; [CONFIG_NETWORK_FILESYSTEMS]
117 &lt;*/M&gt; NFS client support [CONFIG_NFS_FS]
118 &lt;*/M&gt; SMB3 and CIFS support (advanced network filesystem) [CONFIG_CIFS]</literal></screen>
119
120 <para>
121 Recompile and install the new kernel, if necessary.
122 </para>
123
124 </sect2>
125
126 <sect2 role="installation">
127
128 <title>Installation of Autofs</title>
129
130 <para>
131 First fix an issue introduced by glibc-2.36:
132 </para>
133
134 <screen><userinput>grep -rl linux/fs modules | xargs sed -i "/linux\/fs/d"</userinput></screen>
135
136 <para>
137 Install <application>Autofs</application> by running the following
138 commands:
139 </para>
140
141<screen revision="sysv"><userinput>./configure --prefix=/usr \
142 --with-mapdir=/etc/autofs \
143 --with-libtirpc \
144 --without-openldap \
145 --mandir=/usr/share/man &amp;&amp;
146make</userinput></screen>
147
148<screen revision="systemd"><userinput>./configure --prefix=/usr \
149 --with-mapdir=/etc/autofs \
150 --with-libtirpc \
151 --with-systemd \
152 --without-openldap \
153 --mandir=/usr/share/man &amp;&amp;
154make</userinput></screen>
155
156 <para>
157 This package does not come with a test suite.
158 </para>
159
160 <para>
161 Now, as the <systemitem class="username">root</systemitem> user:
162 </para>
163
164<screen role="root"><userinput>make install</userinput></screen>
165
166<!-- As of version 5.1.5, the configuration files are not installed anymore -->
167 <caution>
168 <para>
169 If <application>autofs</application> is already installed on your
170 system, be sure to backup your configuration files. They'll be
171 overwritten by the following command.
172 </para>
173 </caution>
174
175 <para>
176 Install the default configuration files, still as the
177 <systemitem class="username">root</systemitem> user:
178 </para>
179
180<screen role="root"><userinput>make install_samples</userinput></screen>
181
182 </sect2>
183
184 <sect2 role="commands">
185 <title>Command Explanations</title>
186
187 <para>
188 <parameter>--with-libtirpc</parameter>: This switch forces the package to
189 use libtirpc for RPC functionality instead of relying on implementation
190 from Glibc, which was removed in LFS 8.1.
191 </para>
192
193 <para revision="systemd">
194 <parameter>--with-systemd</parameter>: This switch enables installation
195 of the bundled systemd units.
196 </para>
197
198 <para>
199 <parameter>--without-openldap</parameter>: This switch disables openldap
200 if found. If openldap is desired, omit this switch. Note that openldap
201 support in autofs requires <xref linkend="mitkrb"/>.
202 </para>
203
204 </sect2>
205
206 <sect2 role="configuration">
207 <title>Configuring Autofs</title>
208
209 <sect3 id="autofs-config">
210 <title>Config Files</title>
211
212 <para>
213 <filename>/etc/sysconfig/autofs.conf</filename>,
214 <filename>/etc/autofs/auto.master</filename>,
215 <filename>/etc/autofs/auto.misc</filename>, and
216 <filename>/etc/autofs/auto.net</filename>
217 </para>
218
219 <indexterm zone="autofs autofs-config" >
220 <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
221 </indexterm>
222
223 <indexterm zone="autofs autofs-config">
224 <primary sortas="e-etc-auto.master">/etc/autofs/auto.master</primary>
225 </indexterm>
226
227 <indexterm zone="autofs autofs-config">
228 <primary sortas="e-etc-auto.misc">/etc/autofs/auto.misc</primary>
229 </indexterm>
230
231 <indexterm zone="autofs autofs-config">
232 <primary sortas="e-etc-auto.net">/etc/autofs/auto.net</primary>
233 </indexterm>
234
235 </sect3>
236
237 <sect3>
238 <title>Configuration Information</title>
239
240 <para>
241 The installation process creates <filename>auto.master</filename>,
242 <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
243 <filename>auto.net</filename>. Replace the
244 <filename>auto.master</filename> file with the following commands
245 as the <systemitem class="username">root</systemitem> user:
246 </para>
247
248<screen role="root"><userinput>mv /etc/autofs/auto.master /etc/autofs/auto.master.bak &amp;&amp;
249cat &gt; /etc/autofs/auto.master &lt;&lt; "EOF"
250<literal># Begin /etc/autofs/auto.master
251
252/media/auto /etc/autofs/auto.misc --ghost
253#/home /etc/autofs/auto.home
254
255# End /etc/autofs/auto.master</literal>
256EOF</userinput></screen>
257
258 <para>
259 This file creates a new media directory,
260 <filename>/media/auto</filename> that will overlay any existing
261 directory of the same name. In this example, the file,
262 <filename>/etc/autofs/auto.misc</filename>, has a line:
263 </para>
264
265<screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
266
267 <para>
268 that will mount a cdrom as <filename>/media/auto/cd</filename> if
269 that directory is accessed. The <option>--ghost</option> option tells
270 the automounter to create <quote>ghost</quote> versions (i.e. empty
271 directories) of all the mount points listed in the configuration file
272 regardless whether any of the file systems are actually mounted or not.
273 This is very convenient and highly recommended, because it will show
274 you the available auto-mountable file systems as existing directories,
275 even when their file systems aren't currently mounted. Without the
276 <option>--ghost</option> option, you'll have to remember the names of
277 the directories. As soon as you try to access one of them, the
278 directory will be created and the file system will be mounted. When
279 the file system gets unmounted again, the directory is destroyed too,
280 unless the <option>--ghost</option> option was given.
281 </para>
282
283 <note>
284 <para>
285 An alternative method would be to specify another automount
286 location such as <filename
287 class='directory'>/var/lib/auto/cdrom</filename> and create a
288 symbolic link from <filename
289 class='directory'>/media/cdrom</filename> to the automount location.
290 </para>
291 </note>
292
293 <para>
294 The <filename>auto.misc</filename> file must be configured to your
295 working hardware. The loaded configuration file should load your cdrom
296 if <filename>/dev/cdrom</filename> is active or it can be edited to
297 match your device setup. Examples for floppies are available in the
298 file and easily activated. Documentation for this file is available
299 using the <command>man 5 autofs</command> command.
300 </para>
301
302 <para>
303 In the second line, if enabled, a user's home directory would be
304 mounted via NFS upon login. The <filename>/etc/home.auto</filename>
305 would need to exist and have an entry similar to:
306 </para>
307
308<screen>joe example.org:/export/home/joe</screen>
309
310 <para>
311 where the directory <filename>/export/home/joe</filename> is
312 exported via NFS from the system example.org. NFS shares
313 are covered on the next page.
314 </para>
315
316 <para>
317 This package could also be used to mount SMB shares, however that
318 feature is not configured in these instructions. For additional
319 configuration information, see the man pages for auto.master(5). There
320 are also web resources such as this <ulink
321 url='http://wiki.gentoo.org/wiki/AutoFS'>AUTOFS
322 HOWTO</ulink> available.
323 </para>
324
325 </sect3>
326
327 <sect3 id="autofs-init">
328 <title><phrase revision="sysv">Boot Script</phrase>
329 <phrase revision="systemd">Systemd Unit</phrase></title>
330
331 <para revision="sysv">
332 <application>autofs</application> installs its own
333 boot script, but it has no capability for logging or visual conformance
334 with other BLFS scripts. It will be replaced by an enhanced version.
335 </para>
336
337 <para revision="sysv">
338 Install the <filename>/etc/init.d/autofs</filename>
339 mount script included with the <xref linkend="bootscripts"/>
340 package.
341 </para>
342
343 <para revision="systemd">
344 To start <application>Autofs</application> at boot, enable the
345 previously installed systemd unit by running the following command as
346 the <systemitem class="username">root</systemitem> user:
347 </para>
348
349 <indexterm zone="autofs autofs-init">
350 <primary sortas="f-autofs-init">autofs</primary>
351 </indexterm>
352
353<screen role="root" revision="sysv"><userinput>make install-autofs</userinput></screen>
354
355<screen role="root" revision="systemd"><userinput>systemctl enable autofs</userinput></screen>
356
357 <para revision="sysv">
358 The time-out variable is set in
359 <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
360 a default of 60 seconds of inactivity before unmounting the device. A
361 much shorter time may be necessary to protect buffer writing to a floppy
362 if users tend to remove the media prior to the timeout setting.
363 </para>
364
365 <note revision="systemd">
366 <para>
367 You can also specify <envar>OPTIONS</envar> variable in the
368 <filename>/etc/sysconfig/autofs</filename> file with any additional
369 parameters that you might want to pass to the automount daemon.
370 </para>
371 </note>
372
373 </sect3>
374
375 </sect2>
376
377 <sect2 role="content">
378 <title>Contents</title>
379
380 <segmentedlist>
381 <segtitle>Installed Program</segtitle>
382 <segtitle>Installed Libraries</segtitle>
383 <segtitle>Installed Directories</segtitle>
384
385 <seglistitem>
386 <seg>automount</seg>
387 <seg>
388 lookup_dir.so, lookup_file.so, lookup_files.so, lookup_hosts.so,
389 lookup_ldap.so (optional), lookup_multi.so, lookup_nis.so,
390 lookup_program.so, lookup_userhome.so, lookup_yp.so, mount_afs.so,
391 mount_autofs.so, mount_bind.so, mount_changer.so, mount_ext2.so,
392 mount_ext3.so, mount_ext4.so, mount_generic.so, mount_nfs.so,
393 mount_nfs4.so, parse_amd.so, and parse_sun.so
394 </seg>
395 <seg>/usr/lib/autofs and /etc/autofs</seg>
396 </seglistitem>
397 </segmentedlist>
398
399 <variablelist>
400 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
401 <?dbfo list-presentation="list"?>
402 <?dbhtml list-presentation="table"?>
403
404 <varlistentry id="automount">
405 <term><command>automount</command></term>
406 <listitem>
407 <para>
408 is the daemon that performs the mounting when a request is
409 made for the device
410 </para>
411 <indexterm zone="autofs automount">
412 <primary sortas="b-automount">automount</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 </variablelist>
418
419 </sect2>
420
421</sect1>
Note: See TracBrowser for help on using the repository browser.