glfs/postlfs/config/autofs.xml

265 lines
9.1 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!-- Inserted as a reminder to do this. The mention of a test suite
is usually right before the root user installation commands. Please
delete these 12 (including one blank) lines after you are done.-->
<!-- Use one of the two mentions below about a test suite,
delete the line that is not applicable. Of course, if the
test suite uses syntax other than "make check", revise the
line to reflect the actual syntax to run the test suite -->
<!-- <para>This package does not come with a test suite.</para> -->
<!-- <para>To test the results, issue: <command>make check</command>.</para> -->
<!ENTITY autofs-patch-dir "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/">
<!ENTITY autofs-download-http "http://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
<!ENTITY autofs-download-ftp "ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-&autofs-version;.tar.bz2">
<!ENTITY autofs-md5sum "7e3949114c00665b4636f0c318179657">
<!ENTITY autofs-size "168 KB">
<!ENTITY autofs-buildsize "2.3 MB">
<!ENTITY autofs-time "less than 0.1 SBU">
]>
<sect1 id="autofs" xreflabel="autofs-&autofs-version;">
<?dbhtml filename="autofs.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Automate Mounting of File Systems</title>
<indexterm zone="autofs">
<primary sortas="a-Autofs">Autofs</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Autofs</title>
<para>The <application>autofs</application> package contains userspace
tools that work with the kernel to mount and un-mount removable file
systems. This is useful for allowing users to mount floppies, cdroms and
other removable storage devices without requiring the system
administrator to mount the devices. This may not be ideal for all
installations, so be aware of the risks before implementing this feature.</para>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&autofs-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&autofs-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &autofs-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &autofs-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &autofs-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &autofs-time;</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Recommended Patch: <ulink
url="&patch-root;/autofs-&autofs-version;-consolidated-1.patch"/></para>
</listitem>
</itemizedlist>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/autofs"/></para>
</sect2>
<sect2 role="kernel" id="autofs-kernel">
<title>Kernel Configuration</title>
<indexterm zone="autofs autofs-kernel">
<primary sortas="d-Automounter">Automounter</primary>
</indexterm>
<para>Verify that kernel support has been compiled in or built as
modules in the following areas:</para>
<screen><literal>File systems &rArr;
Kernel automounter version 4 support Y or M
Network File Systems &rArr;
NFS file system support Y or M (optional)
SMB file system support Y or M (optional)</literal></screen>
<para>Recompile and install the new kernel, if necessary.</para>
</sect2>
<sect2 role="installation">
<title>Installation of Autofs</title>
<para>Install <application>autofs</application> by running the following
commands:</para>
<screen><userinput>patch -Np1 -i ../autofs-&autofs-version;-consolidated-1.patch &amp;&amp;
./configure --prefix=/ --mandir=/usr/share/man &amp;&amp;
make</userinput></screen>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>make install &amp;&amp;
rm /etc/rc.d/init.d/autofs</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para><command>patch -Np1 -i
../autofs-&autofs-version;-consolidated-1.patch</command>: This patch
is a consolidation of nine small patches available at <ulink
url="http://ftp.kernel.org/pub/linux/daemons/autofs/v4/"/>. The patches
can be applied individually if desired.</para>
<para><command>rm /etc/rc.d/init.d/autofs</command>: This command removes
the installed script which only works on specific distributions.</para>
</sect2>
<sect2 role="configuration">
<title>Configuring Autofs</title>
<sect3 id="autofs-config">
<title>Config Files</title>
<para><filename>/etc/sysconfig/autofs.conf</filename>,
<filename>/etc/auto.master</filename>,
<filename>/etc/auto.misc</filename>, and
<filename>/etc/auto.net</filename></para>
<indexterm zone="autofs autofs-config" >
<primary sortas="e-etc-sysconfig-autofs.conf">/etc/sysconfig/autofs.conf</primary>
</indexterm>
<indexterm zone="autofs autofs-config">
<primary sortas="e-etc-auto.master">/etc/auto.master</primary>
</indexterm>
<indexterm zone="autofs autofs-config">
<primary sortas="e-etc-auto.misc">/etc/auto.misc</primary>
</indexterm>
<indexterm zone="autofs autofs-config">
<primary sortas="e-etc-auto.net">/etc/auto.net</primary>
</indexterm>
</sect3>
<sect3>
<title>Configuration Information</title>
<para>The installation process creates <filename>auto.master</filename>,
<filename>auto.misc</filename> and <filename>auto.net</filename>. You
will replace the <filename>auto.master</filename> with the following
commands:</para>
<screen role="root"><userinput>mv /etc/auto.master /etc/auto.master.bak &amp;&amp;
cat &gt; /etc/auto.master &lt;&lt; "EOF"
<literal># Begin /etc/auto.master
/media /etc/auto.misc
# End /etc/auto.master</literal>
EOF</userinput></screen>
<note>
<para>This file mounts a new media directory over the one created by
LFS and will therefore hide any mounts made by the
<filename>fstab</filename> file into that directory.</para>
</note>
<para>While this package could be used to mount NFS shares and SMB
shares, that feature is not configured in these instructions. NFS shares
are covered on the next page.</para>
<para>The <filename>auto.misc</filename> must be configured to your
working hardware. The loaded configuration file should load your cdrom
if <filename>/dev/cdrom</filename> is active or it can be edited to
match your device setup and examples for floppies are available in the file
and easily activated. Documentation for this file is available using the
<command>man 5 autofs</command> command.</para>
</sect3>
<sect3 id="autofs-init">
<title>Boot Script</title>
<para>Install the <filename>/etc/rc.d/init.d/autofs</filename> mount script
and <filename>/etc/sysconfig/autofs.conf</filename> support file included
with the <xref linkend="bootscripts"/> package.</para>
<indexterm zone="autofs autofs-init">
<primary sortas="f-autofs-init">autofs</primary>
</indexterm>
<screen role="root"><userinput>make install-autofs</userinput></screen>
<para>The time-out variable is set in
<filename>/etc/sysconfig/autofs.conf</filename>. The installed file sets
a default of 60 seconds of inactivity before unmounting the device. A
much shorter time may be necessary to protect buffer writing to a floppy
if users tend to remove the media prior to the timeout setting.</para>
</sect3>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Program</segtitle>
<segtitle>Installed Libraries</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>automount</seg>
<seg>autofs modules</seg>
<seg>/lib/autofs and /var/run/autofs</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="automount">
<term><command>automount</command></term>
<listitem>
<para>is the daemon that performs the mounting when a request is
made for the device.</para>
<indexterm zone="autofs automount">
<primary sortas="b-automount">automount</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>