[7ef22cff] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[ff769b8c] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
[7ef22cff] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
---|
| 8 | <!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
|
---|
| 9 | <!ENTITY autofs-md5sum "f43a09e94c4bd512ec58ac06e9d42c60">
|
---|
| 10 | <!ENTITY autofs-size "122 KB">
|
---|
| 11 | <!ENTITY autofs-buildsize "1.4 MB">
|
---|
| 12 | <!ENTITY autofs-time "0.01 SBU">
|
---|
| 13 | ]>
|
---|
| 14 |
|
---|
| 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 |
|
---|
| 23 | <title>Automate Mounting of File Systems</title>
|
---|
| 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 |
|
---|
| 32 | <para>The <application>autofs</application> package contains userspace
|
---|
| 33 | tools that work with the kernel to mount and un-mount removable file
|
---|
| 34 | systems. This is useful for allowing users to mount floppies, cdroms and
|
---|
| 35 | other removable storage devices without requiring the system
|
---|
| 36 | administrator to mount the devices. This may not be ideal for all
|
---|
| 37 | installations, so be aware of the risks before implementing this feature.</para>
|
---|
| 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download MD5 sum: &autofs-md5sum;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Download size: &autofs-size;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated disk space required: &autofs-buildsize;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>Estimated build time: &autofs-time;</para>
|
---|
| 58 | </listitem>
|
---|
| 59 | </itemizedlist>
|
---|
| 60 |
|
---|
| 61 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 62 | <itemizedlist spacing="compact">
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Recommended Patch: <ulink
|
---|
| 65 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-strict.patch"/></para>
|
---|
| 66 | </listitem>
|
---|
| 67 | <listitem>
|
---|
| 68 | <para>Recommended Patch: <ulink
|
---|
| 69 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-bad_chdir.patch"/></para>
|
---|
| 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
| 72 | <para>Recommended Patch: <ulink
|
---|
| 73 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-mtab_lock.patch"/></para>
|
---|
| 74 | </listitem>
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>Recommended Patch: <ulink
|
---|
| 77 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-non_block_ping.patch"/></para>
|
---|
| 78 | </listitem>
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>Recommended Patch: <ulink
|
---|
| 81 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-signal-race-fix.patch"/></para>
|
---|
| 82 | </listitem>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>Recommended Patch: <ulink
|
---|
| 85 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-sock-leak-fix.patch"/></para>
|
---|
| 86 | </listitem>
|
---|
| 87 | <listitem>
|
---|
| 88 | <para>Recommended Patch: <ulink
|
---|
| 89 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-replicated_server_select.patch"/></para>
|
---|
| 90 | </listitem>
|
---|
| 91 | <listitem>
|
---|
| 92 | <para>Recommended Patch: <ulink
|
---|
| 93 | url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-4.1.3-multi-over.patch"/></para>
|
---|
| 94 | </listitem>
|
---|
| 95 | </itemizedlist>
|
---|
| 96 |
|
---|
| 97 | </sect2>
|
---|
| 98 |
|
---|
| 99 | <sect2 role="kernel" id="autofs-kernel">
|
---|
| 100 | <title>Kernel Configuration</title>
|
---|
| 101 |
|
---|
| 102 | <indexterm zone="autofs autofs-kernel">
|
---|
| 103 | <primary sortas="d-Automounter">Automounter</primary>
|
---|
| 104 | </indexterm>
|
---|
| 105 |
|
---|
| 106 | <para>Verify that kernel support has been compiled in or built as
|
---|
| 107 | modules in the following areas:</para>
|
---|
| 108 |
|
---|
| 109 | <screen><literal>File systems
|
---|
| 110 | Kernel automounter version 4 support Y or M
|
---|
[7ef22cff] | 111 | Network File Systems
|
---|
[d3ad3271] | 112 | NFS file system support Y or M
|
---|
| 113 | SMB file system support Y or M</literal></screen>
|
---|
| 114 |
|
---|
| 115 | <para>Recompile and install the new kernel, if necessary.</para>
|
---|
[7ef22cff] | 116 |
|
---|
[d3ad3271] | 117 | </sect2>
|
---|
[0290a023] | 118 |
|
---|
[d3ad3271] | 119 | <sect2 role="installation">
|
---|
| 120 |
|
---|
| 121 | <title>Installation of Autofs</title>
|
---|
| 122 |
|
---|
| 123 | <para>Install <application>autofs</application> by running the following
|
---|
| 124 | commands:</para>
|
---|
| 125 |
|
---|
| 126 | <screen><userinput>patch -Np1 -i ../autofs-4.1.3-strict.patch &&
|
---|
[b6293773] | 127 | patch -Np1 -i ../autofs-4.1.3-bad_chdir.patch &&
|
---|
| 128 | patch -Np1 -i ../autofs-4.1.3-mtab_lock.patch &&
|
---|
| 129 | patch -Np1 -i ../autofs-4.1.3-non_block_ping.patch &&
|
---|
| 130 | patch -Np1 -i ../autofs-4.1.3-signal-race-fix.patch &&
|
---|
| 131 | patch -Np1 -i ../autofs-4.1.3-sock-leak-fix.patch &&
|
---|
| 132 | patch -Np1 -i ../autofs-4.1.3-replicated_server_select.patch &&
|
---|
| 133 | patch -Np1 -i ../autofs-4.1.3-multi-over.patch &&
|
---|
| 134 | ./configure --prefix=/ --mandir=/usr/share/man &&
|
---|
[d3ad3271] | 135 | make</userinput></screen>
|
---|
| 136 |
|
---|
| 137 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 138 |
|
---|
| 139 | <screen role="root"><userinput>make install &&
|
---|
| 140 | rm /etc/rc.d/init.d/autofs</userinput></screen>
|
---|
| 141 |
|
---|
| 142 | </sect2>
|
---|
| 143 |
|
---|
| 144 | <sect2 role="commands">
|
---|
| 145 | <title>Command Explanations</title>
|
---|
| 146 |
|
---|
| 147 | <para><command>rm /etc/rc.d/init.d/autofs</command>: This command
|
---|
| 148 | removes the installed script which only works on specific distributions.</para>
|
---|
[d260aaf4] | 149 |
|
---|
[d3ad3271] | 150 | </sect2>
|
---|
[d260aaf4] | 151 |
|
---|
[d3ad3271] | 152 | <sect2 role="configuration">
|
---|
| 153 | <title>Configuring Autofs</title>
|
---|
[7ef22cff] | 154 |
|
---|
[d3ad3271] | 155 | <sect3 id="autofs-config">
|
---|
| 156 | <title>Config Files</title>
|
---|
[7ef22cff] | 157 |
|
---|
[d3ad3271] | 158 | <para><filename>/etc/sysconfig/autofs.conf</filename>,
|
---|
| 159 | <filename>/etc/auto.master</filename>,
|
---|
| 160 | <filename>/etc/auto.misc</filename>, and
|
---|
| 161 | <filename>/etc/auto.net</filename></para>
|
---|
[7ef22cff] | 162 |
|
---|
[d3ad3271] | 163 | <indexterm zone="autofs autofs-config" >
|
---|
| 164 | <primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
|
---|
| 165 | </indexterm>
|
---|
[7ef22cff] | 166 |
|
---|
[d3ad3271] | 167 | <indexterm zone="autofs autofs-config">
|
---|
| 168 | <primary sortas="e-etc-auto.master">/etc/auto.master</primary>
|
---|
| 169 | </indexterm>
|
---|
[7ef22cff] | 170 |
|
---|
[d3ad3271] | 171 | <indexterm zone="autofs autofs-config">
|
---|
| 172 | <primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
|
---|
| 173 | </indexterm>
|
---|
[7ef22cff] | 174 |
|
---|
[d3ad3271] | 175 | <indexterm zone="autofs autofs-config">
|
---|
| 176 | <primary sortas="e-etc-auto.net">/etc/auto.net</primary>
|
---|
| 177 | </indexterm>
|
---|
[7ef22cff] | 178 |
|
---|
[d3ad3271] | 179 | </sect3>
|
---|
[7ef22cff] | 180 |
|
---|
[d3ad3271] | 181 | <sect3>
|
---|
| 182 | <title>Configuration Information</title>
|
---|
[7ef22cff] | 183 |
|
---|
[d3ad3271] | 184 | <para>The installation process creates <filename>auto.master</filename>,
|
---|
| 185 | <filename>auto.misc</filename> and <filename>auto.net</filename>. You
|
---|
| 186 | will replace the <filename>auto.master</filename> with the following
|
---|
| 187 | commands:</para>
|
---|
| 188 |
|
---|
| 189 | <screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &&
|
---|
| 190 | cat > /etc/auto.master << "EOF"
|
---|
| 191 | <literal># Begin /etc/auto.master
|
---|
[7ef22cff] | 192 |
|
---|
| 193 | /media /etc/auto.misc
|
---|
| 194 |
|
---|
[d3ad3271] | 195 | # End /etc/auto.master</literal>
|
---|
| 196 | EOF</userinput></screen>
|
---|
| 197 |
|
---|
| 198 | <note>
|
---|
| 199 | <para>This file mounts a new media directory over the one created by
|
---|
| 200 | LFS and will therefore hide any mounts made by the
|
---|
| 201 | <filename>fstab</filename> file into that directory.</para>
|
---|
| 202 | </note>
|
---|
| 203 |
|
---|
| 204 | <para>While this package could be used to mount NFS shares and SMB
|
---|
| 205 | shares, that feature is not configured in these instructions. NFS shares
|
---|
| 206 | are covered on the next page.</para>
|
---|
| 207 |
|
---|
| 208 | <para>The <filename>auto.misc</filename> must be configured to your
|
---|
| 209 | working hardware. The loaded configuration file should load your cdrom
|
---|
| 210 | if <filename>/dev/cdrom</filename> is active or it can be edited to
|
---|
| 211 | match your device setup and examples for floppies are available in the file
|
---|
| 212 | and easily activated. Documentation for this file is available using the
|
---|
| 213 | <command>man 5 autofs</command> command.</para>
|
---|
| 214 |
|
---|
| 215 | </sect3>
|
---|
| 216 |
|
---|
| 217 | <sect3 id="autofs-init">
|
---|
| 218 | <title>Boot Script</title>
|
---|
| 219 |
|
---|
| 220 |
|
---|
| 221 | <para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
|
---|
| 222 | and <filename>/etc/sysconfig/autofs.conf</filename> support file included
|
---|
| 223 | with the <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 224 |
|
---|
| 225 | <indexterm zone="autofs autofs-init">
|
---|
| 226 | <primary sortas="f-autofs-init">autofs</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 |
|
---|
| 229 | <screen role="root"><userinput>make install-autofs</userinput></screen>
|
---|
| 230 |
|
---|
| 231 | <para>The time-out variable is set in
|
---|
| 232 | <filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
|
---|
| 233 | a default of 60 seconds of inactivity before unmounting the device. A
|
---|
| 234 | much shorter time may be necessary to protect buffer writing to a floppy
|
---|
| 235 | if users tend to remove the media prior to the timeout setting.</para>
|
---|
| 236 |
|
---|
| 237 | </sect3>
|
---|
| 238 |
|
---|
| 239 | </sect2>
|
---|
| 240 |
|
---|
| 241 | <sect2 role="content">
|
---|
| 242 | <title>Contents</title>
|
---|
| 243 |
|
---|
| 244 | <segmentedlist>
|
---|
| 245 | <segtitle>Installed Program</segtitle>
|
---|
| 246 | <segtitle>Installed Libraries</segtitle>
|
---|
| 247 | <segtitle>Installed Directories</segtitle>
|
---|
| 248 |
|
---|
| 249 | <seglistitem>
|
---|
| 250 | <seg>automount</seg>
|
---|
| 251 | <seg>autofs modules</seg>
|
---|
| 252 | <seg>Not determined at this time</seg>
|
---|
| 253 | </seglistitem>
|
---|
| 254 | </segmentedlist>
|
---|
| 255 |
|
---|
| 256 | <variablelist>
|
---|
| 257 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 258 | <?dbfo list-presentation="list"?>
|
---|
| 259 | <?dbhtml list-presentation="table"?>
|
---|
| 260 |
|
---|
| 261 | <varlistentry id="automount">
|
---|
| 262 | <term><command>automount</command></term>
|
---|
| 263 | <listitem>
|
---|
| 264 | <para>is the daemon that performs the mounting when a request is
|
---|
| 265 | made for the device.</para>
|
---|
| 266 | <indexterm zone="autofs automount">
|
---|
| 267 | <primary sortas="b-automount">automount</primary>
|
---|
| 268 | </indexterm>
|
---|
| 269 | </listitem>
|
---|
| 270 | </varlistentry>
|
---|
| 271 |
|
---|
| 272 | </variablelist>
|
---|
| 273 |
|
---|
| 274 | </sect2>
|
---|
[7ef22cff] | 275 |
|
---|
| 276 | </sect1>
|
---|
| 277 |
|
---|