old-www/HOWTO/NFS-HOWTO/intro.html

468 lines
11 KiB
HTML

<HTML
><HEAD
><TITLE
>Introduction</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="Linux NFS-HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Preamble"
HREF="preamble.html"><LINK
REL="NEXT"
TITLE="Setting Up an NFS Server"
HREF="server.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux NFS-HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="preamble.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="server.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INTRO">2. Introduction</H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="WHAT">2.1. What is NFS?</H2
><P
> The Network File System (NFS) was developed to allow machines
to mount a disk partition on a remote machine as if it were on
a local hard drive. This allows for fast, seamless sharing of
files across a network.
</P
><P
> It also gives the potential for unwanted people to access your
hard drive over the network (and thereby possibly read your email
and delete all your files as well as break into your system) if
you set it up incorrectly. So please read the Security section of
this document carefully if you intend to implement an NFS setup.
</P
><P
> There are other systems that provide similar functionality to NFS.
Samba (<A
HREF="http://www.samba.org"
TARGET="_top"
>http://www.samba.org</A
>)
provides file services to Windows clients. The Andrew File
System from IBM (<A
HREF="http://www.transarc.com/Product/EFS/AFS/index.html"
TARGET="_top"
>http://www.transarc.com/Product/EFS/AFS/index.html</A
>),
recently open-sourced, provides a file sharing mechanism with some
additional security and performance features. The Coda File System
(<A
HREF="http://www.coda.cs.cmu.edu/"
TARGET="_top"
>http://www.coda.cs.cmu.edu/</A
>) is still in development as of this writing
but is designed to work well with disconnected clients. Many of the
features of the Andrew and Coda file systems are slated for inclusion
in the next version of NFS (Version 4) (<A
HREF="http://www.nfsv4.org"
TARGET="_top"
>http://www.nfsv4.org</A
>). The
advantage of NFS today is that it is mature, standard, well understood,
and supported robustly across a variety of platforms.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="SCOPE">2.2. What is this HOWTO and what is it not?</H2
><P
> This HOWTO is intended as a complete, step-by-step guide to setting
up NFS correctly and effectively. Setting up NFS involves two steps,
namely configuring the server and then configuring the client. Each
of these steps is dealt with in order. The document then offers
some tips for people with particular needs and hardware setups, as
well as security and troubleshooting advice.
</P
><P
> This HOWTO is not a description of the guts and
underlying structure of NFS. For that you may wish to read
<EM
>Linux NFS and Automounter Administration</EM
> by Erez Zadok (Sybex, 2001). The classic NFS book, updated and still quite useful, is <EM
>Managing NFS and NIS</EM
> by Hal Stern, published by O'Reilly &#38;
Associates, Inc. A much more advanced technical
description of NFS is available in <EM
>NFS Illustrated</EM
> by Brent Callaghan.
</P
><P
> This document is also not intended as a complete reference manual,
and does not contain an exhaustive list of the features of Linux
NFS. For that, you can look at the man pages for <EM
>nfs(5)</EM
>,
<EM
>exports(5)</EM
>, <EM
>mount(8)</EM
>, <EM
>fstab(5)</EM
>,
<EM
>nfsd(8)</EM
>, <EM
>lockd(8)</EM
>, <EM
>statd(8)</EM
>,
<EM
>rquotad(8)</EM
>, and <EM
>mountd(8)</EM
>.
</P
><P
> It will also not cover PC-NFS, which is considered obsolete (users
are encouraged to use Samba to share files with Windows machines) or NFS
Version 4, which is still in development.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="KNOWPREREQ">2.3. Knowledge Pre-Requisites</H2
><P
> You should know some basic things about TCP/IP networking before
reading this HOWTO; if you are in doubt, read the
<A
HREF="http://www.linuxdoc.org/HOWTO/Networking-Overview-HOWTO.html"
TARGET="_top"
>Networking-
Overview-HOWTO</A
>.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="SWPREREQ">2.4. Software Pre-Requisites: Kernel Version and nfs-utils</H2
><P
> The difference between Version 2 NFS and version 3 NFS will be
explained later on; for now, you might simply take the suggestion
that you will need NFS Version 3 if you are installing a dedicated
or high-volume file server. NFS Version 2 should be fine for
casual use.
</P
><P
> NFS Version 2 has been around for quite some time now (at least
since the 1.2 kernel series) however you will need a kernel version
of at least 2.2.18 if you wish to do any of the following:
<P
></P
><UL
><LI
><P
>Mix Linux NFS with other operating systems' NFS</P
></LI
><LI
><P
>Use file locking reliably over NFS</P
></LI
><LI
><P
>Use NFS Version 3.</P
></LI
></UL
>
</P
><P
> There are also patches available for kernel versions above 2.2.14
that provide the above functionality. Some of them can be downloaded
from the Linux NFS homepage. If your kernel version is 2.2.14-
2.2.17 and you have the source code on hand, you can tell if these
patches have been added because NFS Version 3 server support will be
a configuration option. However, unless you have some particular
reason to use an older kernel, you should upgrade because many bugs
have been fixed along the way. Kernel 2.2.19 contains some additional
locking improvements over 2.2.18.
</P
><P
> Version 3 functionality will also require the nfs-utils package of
at least version 0.1.6, and mount version 2.10m or newer. However
because nfs-utils and mount are fully backwards compatible, and because
newer versions have lots of security and bug fixes, there is no good
reason not to install the newest nfs-utils and mount packages if you
are beginning an NFS setup.
</P
><P
> All 2.4 and higher kernels have full NFS Version 3 functionality.
</P
><P
> In all cases, if you are building your own kernel, you will need
to select NFS and NFS Version 3 support at compile time. Most
(but not all) standard distributions come with kernels that support
NFS version 3.
</P
><P
> Handling files larger than 2 GB will require a 2.4x kernel and a
2.2.x version of <SPAN
CLASS="APPLICATION"
>glibc</SPAN
>.
</P
><P
> All kernels after 2.2.18 support NFS over TCP on the client side.
As of this writing, server-side NFS over TCP only exists in a
buggy form as an experimental option in the post-2.2.18 series;
patches for 2.4 and 2.5 kernels have been introduced starting with
2.4.17 and 2.5.6. The patches are believed to be stable, though
as of this writing they are relatively new and have not seen
widespread use or integration into the mainstream 2.4 kernel.
</P
><P
> Because so many of the above functionalities were introduced in
kernel version 2.2.18, this document was written to be consistent
with kernels above this version (including 2.4.x). If you have an
older kernel, this document may not describe your NFS system
correctly.
</P
><P
> As we write this document, NFS version 4 has only recently been
finalized as a protocol, and no implementations are considered
production-ready. It will not be dealt with here.
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="FURTHERHELP">2.5. Where to get help and further information</H2
><P
> As of November 2000, the Linux NFS homepage is at
<A
HREF="http://nfs.sourceforge.net"
TARGET="_top"
>http://nfs.sourceforge.net</A
>. Please check there for NFS related
mailing lists as well as the latest version of nfs-utils, NFS
kernel patches, and other NFS related packages.
</P
><P
>When you encounter a problem or have a question not covered in this
manual, the faq or the man pages, you should send a message to the nfs
mailing list (<TT
CLASS="EMAIL"
>&#60;<A
HREF="mailto:nfs@lists.sourceforge.net"
>nfs@lists.sourceforge.net</A
>&#62;</TT
>). To best help the developers
and other users help you assess your problem you should include:</P
><P
></P
><UL
><LI
><P
> the version of <SPAN
CLASS="APPLICATION"
>nfs-utils</SPAN
> you are using</P
></LI
><LI
><P
> the version of the kernel and any non-stock applied kernels.</P
></LI
><LI
><P
> the distribution of linux you are using</P
></LI
><LI
><P
> the version(s) of other operating systems involved.</P
></LI
></UL
><P
>It is also useful to know the networking configuration connecting the
hosts.</P
><P
>
If your problem involves the inability mount or export shares please
also include:</P
><P
></P
><UL
><LI
><P
> a copy of your <TT
CLASS="FILENAME"
>/etc/exports</TT
> file</P
></LI
><LI
><P
> the output of <B
CLASS="COMMAND"
>rpcinfo -p</B
> <EM
>localhost</EM
> run on the server</P
></LI
><LI
><P
> the output of <B
CLASS="COMMAND"
>rpcinfo -p</B
> <EM
>servername</EM
> run on the client</P
></LI
></UL
><P
>Sending all of this information with a specific question, after reading
all the documentation, is the best way to ensure a helpful response from
the list.</P
><P
> You may also wish to look at the man pages for <EM
>nfs(5)</EM
>,
<EM
>exports(5)</EM
>, <EM
>mount(8)</EM
>, <EM
>fstab(5)</EM
>,
<EM
>nfsd(8)</EM
>, <EM
>lockd(8)</EM
>, <EM
>statd(8)</EM
>,
<EM
>rquotad(8)</EM
>, and <EM
>mountd(8)</EM
>.
</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="preamble.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="server.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Preamble</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Setting Up an NFS Server</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>