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