[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 |
|
---|
[47be189b] | 7 | <!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
|
---|
| 8 | <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-&autofs-version;.tar.xz">
|
---|
[d17b13d] | 9 | <!ENTITY autofs-md5sum "4ed5271598fb1a76475364a4879c7578">
|
---|
| 10 | <!ENTITY autofs-size "249 KB">
|
---|
| 11 | <!ENTITY autofs-buildsize "7.6 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 |
|
---|
[fb28b3b] | 39 | &lfs74_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 |
|
---|
[d17b13d] | 65 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 66 | <para role="optional">
|
---|
| 67 | <xref linkend="libtirpc"/>,
|
---|
| 68 | <xref linkend="nfs-utils"/>,
|
---|
| 69 | <xref linkend="libxml2"/>,
|
---|
| 70 | <xref linkend="mitkrb"/>,
|
---|
| 71 | <xref linkend="openldap"/> (client only), and
|
---|
| 72 | <xref linkend="cyrus-sasl"/>
|
---|
| 73 | </para>
|
---|
[50d1a60] | 74 |
|
---|
[3597eb6] | 75 | <para condition="html" role="usernotes">User Notes:
|
---|
| 76 | <ulink url="&blfs-wiki;/autofs"/></para>
|
---|
| 77 |
|
---|
[d3ad3271] | 78 | </sect2>
|
---|
| 79 |
|
---|
| 80 | <sect2 role="kernel" id="autofs-kernel">
|
---|
| 81 | <title>Kernel Configuration</title>
|
---|
| 82 |
|
---|
| 83 | <indexterm zone="autofs autofs-kernel">
|
---|
| 84 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
| 85 | </indexterm>
|
---|
| 86 |
|
---|
[d17b13d] | 87 | <para>
|
---|
| 88 | Verify that automounter kernel support has been enabled:
|
---|
| 89 | </para>
|
---|
| 90 |
|
---|
| 91 | <screen><literal>File systems --->
|
---|
| 92 | Kernel automounter version 4 support (also supports v3): Y or M</literal></screen>
|
---|
| 93 |
|
---|
| 94 | <para>
|
---|
| 95 | Optionally, enable the following options in the kernel configuration:
|
---|
| 96 | </para>
|
---|
[d3ad3271] | 97 |
|
---|
[d17b13d] | 98 | <screen><literal>File systems --->
|
---|
| 99 | Network File Systems --->
|
---|
| 100 | NFS client support: Y or M
|
---|
| 101 | CIFS support (advanced network filesystem, SMBFS successor): Y or M</literal></screen>
|
---|
[d612b9f] | 102 |
|
---|
[d3ad3271] | 103 | <para>Recompile and install the new kernel, if necessary.</para>
|
---|
[7ef22cff] | 104 |
|
---|
[d3ad3271] | 105 | </sect2>
|
---|
[0290a023] | 106 |
|
---|
[d3ad3271] | 107 | <sect2 role="installation">
|
---|
[d612b9f] | 108 |
|
---|
[d3ad3271] | 109 | <title>Installation of Autofs</title>
|
---|
| 110 |
|
---|
[32d0e29] | 111 | <para>Install <application>Autofs</application> by running the following
|
---|
[d3ad3271] | 112 | commands:</para>
|
---|
[d17b13d] | 113 |
|
---|
[69243a9] | 114 | <screen><userinput>./configure --prefix=/ --mandir=/usr/share/man &&
|
---|
[d3ad3271] | 115 | make</userinput></screen>
|
---|
| 116 |
|
---|
[d4bf650a] | 117 | <para>This package does not come with a test suite.</para>
|
---|
| 118 |
|
---|
[d3ad3271] | 119 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 120 |
|
---|
[47be189b] | 121 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[d3ad3271] | 122 |
|
---|
| 123 | </sect2>
|
---|
[d17b13d] | 124 |
|
---|
[d3ad3271] | 125 | <sect2 role="commands">
|
---|
| 126 | <title>Command Explanations</title>
|
---|
| 127 |
|
---|
[d17b13d] | 128 | <para>
|
---|
| 129 | <option>--with-libtirpc</option>: This switch enables libtirpc support if
|
---|
| 130 | available.
|
---|
| 131 | </para>
|
---|
[d260aaf4] | 132 |
|
---|
[d3ad3271] | 133 | </sect2>
|
---|
[d17b13d] | 134 |
|
---|
[d3ad3271] | 135 | <sect2 role="configuration">
|
---|
| 136 | <title>Configuring Autofs</title>
|
---|
[7ef22cff] | 137 |
|
---|
[d3ad3271] | 138 | <sect3 id="autofs-config">
|
---|
| 139 | <title>Config Files</title>
|
---|
[7ef22cff] | 140 |
|
---|
[d3ad3271] | 141 | <para><filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
| 142 | <filename>/etc/auto.master</filename>,
|
---|
| 143 | <filename>/etc/auto.misc</filename>, and
|
---|
| 144 | <filename>/etc/auto.net</filename></para>
|
---|
[7ef22cff] | 145 |
|
---|
[d3ad3271] | 146 | <indexterm zone="autofs autofs-config" >
|
---|
| 147 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
| 148 | </indexterm>
|
---|
[7ef22cff] | 149 |
|
---|
[d3ad3271] | 150 | <indexterm zone="autofs autofs-config">
|
---|
| 151 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
| 152 | </indexterm>
|
---|
[7ef22cff] | 153 |
|
---|
[d3ad3271] | 154 | <indexterm zone="autofs autofs-config">
|
---|
| 155 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
| 156 | </indexterm>
|
---|
[7ef22cff] | 157 |
|
---|
[d3ad3271] | 158 | <indexterm zone="autofs autofs-config">
|
---|
| 159 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
| 160 | </indexterm>
|
---|
[7ef22cff] | 161 |
|
---|
[d3ad3271] | 162 | </sect3>
|
---|
[7ef22cff] | 163 |
|
---|
[d3ad3271] | 164 | <sect3>
|
---|
| 165 | <title>Configuration Information</title>
|
---|
[7ef22cff] | 166 |
|
---|
[d3ad3271] | 167 | <para>The installation process creates <filename>auto.master</filename>,
|
---|
[d4bf650a] | 168 | <filename>auto.misc</filename>, <filename>auto.smb</filename>, and
|
---|
[32d0e29] | 169 | <filename>auto.net</filename>. Replace the
|
---|
[69243a9] | 170 | <filename>auto.master</filename> file with the following commands
|
---|
| 171 | as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[d3ad3271] | 172 |
|
---|
| 173 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
| 174 | cat > /etc/auto.master << "EOF"
|
---|
| 175 | <literal># Begin /etc/auto.master
|
---|
[7ef22cff] | 176 |
|
---|
[9415459] | 177 | /media/auto /etc/auto.misc --ghost
|
---|
| 178 | #/home /etc/auto.home
|
---|
[7ef22cff] | 179 |
|
---|
[d3ad3271] | 180 | # End /etc/auto.master</literal>
|
---|
| 181 | EOF</userinput></screen>
|
---|
| 182 |
|
---|
[9415459] | 183 | <para>This file creates a new media directory, <filename>/media/auto</filename>
|
---|
| 184 | that will overlay any existing directory of the same name. In this example,
|
---|
| 185 | the file, <filename>/etc/auto.misc</filename>, has a line:</para>
|
---|
| 186 |
|
---|
| 187 | <screen>cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom</screen>
|
---|
| 188 |
|
---|
| 189 | <para>that will mount a cdrom as <filename>/media/auto/cd</filename> if
|
---|
| 190 | that directory is accessed. The <option>--ghost</option> option tells
|
---|
[32d0e29] | 191 | the automounter to create <quote>ghost</quote> versions (i.e. empty
|
---|
| 192 | directories) of all the mount points listed in the configuration file
|
---|
| 193 | regardless whether any of the file systems are actually mounted or not.
|
---|
| 194 | This is very convenient and highly recommended, because it will show you
|
---|
| 195 | the available auto-mountable file systems as existing directories, even
|
---|
| 196 | when their file systems aren't currently mounted. Without the
|
---|
| 197 | <option>--ghost</option> option, you'll have to remember the names of the
|
---|
| 198 | directories. As soon as you try to access one of them, the directory will
|
---|
| 199 | be created and the file system will be mounted. When the file system gets
|
---|
| 200 | unmounted again, the directory is destroyed too, unless the
|
---|
| 201 | <option>--ghost</option> option was given.</para>
|
---|
[9415459] | 202 |
|
---|
[d3ad3271] | 203 | <note>
|
---|
[9415459] | 204 | <para>An alternative method would be to specify another automount
|
---|
[32d0e29] | 205 | location such as <filename
|
---|
| 206 | class='directory'>/var/lib/auto/cdrom</filename> and create a
|
---|
| 207 | symbolic link from <filename class='directory'>/media/cdrom</filename>
|
---|
| 208 | to the automount location.</para>
|
---|
[d612b9f] | 209 | </note>
|
---|
[d3ad3271] | 210 |
|
---|
[9415459] | 211 | <para>The <filename>auto.misc</filename> file must be configured to your
|
---|
[d3ad3271] | 212 | working hardware. The loaded configuration file should load your cdrom
|
---|
| 213 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
[9415459] | 214 | match your device setup. Examples for floppies are available in the file
|
---|
[d3ad3271] | 215 | and easily activated. Documentation for this file is available using the
|
---|
| 216 | <command>man 5 autofs</command> command.</para>
|
---|
| 217 |
|
---|
[9415459] | 218 | <para>In the second line, if enabled, a user's home directory would be
|
---|
| 219 | mounted via NFS upon login. The <filename>/etc/home.auto</filename>
|
---|
| 220 | would need to exist and have an entry similar to:</para>
|
---|
| 221 |
|
---|
| 222 | <screen>joe example.org:/export/home/joe</screen>
|
---|
| 223 |
|
---|
| 224 | <para>where the directory <filename>/export/home/joe</filename> is
|
---|
| 225 | exported via NFS from the system example.org. NFS shares
|
---|
| 226 | are covered on the next page.</para>
|
---|
| 227 |
|
---|
[32d0e29] | 228 | <para>This package could also be used to mount SMB shares, however that
|
---|
| 229 | feature is not configured in these instructions. For additional
|
---|
| 230 | configuration information, see the man pages for auto.master(5). There
|
---|
[9415459] | 231 | are also web resources such as this <ulink
|
---|
[8a994438] | 232 | url='http://en.gentoo-wiki.com/wiki/Autofs'>AUTOFS
|
---|
[32d0e29] | 233 | HOWTO</ulink> available.</para>
|
---|
[9415459] | 234 |
|
---|
[d3ad3271] | 235 | </sect3>
|
---|
[32d0e29] | 236 |
|
---|
[d3ad3271] | 237 | <sect3 id="autofs-init">
|
---|
| 238 | <title>Boot Script</title>
|
---|
| 239 |
|
---|
[601a838] | 240 | <para> <application>autofs</application> installs its own boot script,
|
---|
[47be189b] | 241 | but it has no capability for logging or visual conformance with other
|
---|
| 242 | BLFS scripts.</para>
|
---|
[d3ad3271] | 243 |
|
---|
[47be189b] | 244 | <para>Install the <filename>/etc/init.d/autofs</filename> mount script
|
---|
| 245 | included with the <xref linkend="bootscripts"/> package.</para>
|
---|
[d3ad3271] | 246 |
|
---|
| 247 | <indexterm zone="autofs autofs-init">
|
---|
| 248 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 |
|
---|
| 251 | <screen role="root"><userinput>make install-autofs</userinput></screen>
|
---|
| 252 |
|
---|
| 253 | <para>The time-out variable is set in
|
---|
| 254 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
| 255 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
[e0d33ef] | 256 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
[d3ad3271] | 257 | if users tend to remove the media prior to the timeout setting.</para>
|
---|
| 258 |
|
---|
| 259 | </sect3>
|
---|
[32d0e29] | 260 |
|
---|
[d3ad3271] | 261 | </sect2>
|
---|
| 262 |
|
---|
| 263 | <sect2 role="content">
|
---|
| 264 | <title>Contents</title>
|
---|
| 265 |
|
---|
| 266 | <segmentedlist>
|
---|
| 267 | <segtitle>Installed Program</segtitle>
|
---|
| 268 | <segtitle>Installed Libraries</segtitle>
|
---|
| 269 | <segtitle>Installed Directories</segtitle>
|
---|
| 270 |
|
---|
| 271 | <seglistitem>
|
---|
| 272 | <seg>automount</seg>
|
---|
[47be189b] | 273 | <seg>lookup_dir.so, lookup_file.so, lookup_hosts.so, lookup_ldap.so,
|
---|
[0d7900a] | 274 | lookup_multi.so, lookup_nisplus.so, lookup_program.so,
|
---|
| 275 | lookup_userhome.so, lookup_yp.so, mount_afs.so, mount_autofs.so,
|
---|
[47be189b] | 276 | mount_bind.so, mount_changer.so, mount_ext2.so, mount_generic.so,
|
---|
| 277 | mount_nfs.so, parse_sun.so</seg>
|
---|
| 278 | <seg>/lib/autofs</seg>
|
---|
[d3ad3271] | 279 | </seglistitem>
|
---|
| 280 | </segmentedlist>
|
---|
| 281 |
|
---|
| 282 | <variablelist>
|
---|
| 283 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 284 | <?dbfo list-presentation="list"?>
|
---|
| 285 | <?dbhtml list-presentation="table"?>
|
---|
| 286 |
|
---|
| 287 | <varlistentry id="automount">
|
---|
| 288 | <term><command>automount</command></term>
|
---|
| 289 | <listitem>
|
---|
[e0d33ef] | 290 | <para>is the daemon that performs the mounting when a request is
|
---|
[d3ad3271] | 291 | made for the device.</para>
|
---|
| 292 | <indexterm zone="autofs automount">
|
---|
| 293 | <primary sortas="b-automount">automount</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | </variablelist>
|
---|
| 299 |
|
---|
| 300 | </sect2>
|
---|
[7ef22cff] | 301 |
|
---|
| 302 | </sect1>
|
---|