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