migrate NFS instructions from FAQ to Handbook
This commit is contained in:
parent
8534f7d483
commit
470e6b9719
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=11920
1 changed files with 45 additions and 10 deletions
|
@ -759,7 +759,7 @@ host2.example.com link#1 UC 0 0
|
|||
</informaltable>
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<sect2 id="configuring-nfs">
|
||||
<title>Configuring NFS</title>
|
||||
<indexterm>
|
||||
<primary>NFS</primary>
|
||||
|
@ -840,15 +840,51 @@ nfs_client_flags="-n 4"</programlisting>
|
|||
have permission to do so. Make sure your client is listed in your
|
||||
<filename>/etc/exports</filename> file.</para>
|
||||
|
||||
<para>It is important to remember that you must restart <command>mountd</command>
|
||||
whenever you modify <filename>/etc/exports</filename> so that
|
||||
your changes take effect. This can be accomplished by sending
|
||||
the hangup signal to the <command>mountd</command> process :</para>
|
||||
<para>In <filename>/etc/exports</filename>, each line represents
|
||||
the export information for one filesystem to one host. A
|
||||
remote host can only be specified once for each local
|
||||
filesystem, and you can only have one default entry per local
|
||||
filesystem. For example, let's assume that
|
||||
<filename>/usr</filename> is a single filesystem. The
|
||||
following <filename>/etc/exports</filename> is invalid:</para>
|
||||
|
||||
<programlisting>/usr/src client
|
||||
/usr/ports client</programlisting>
|
||||
|
||||
<para>One filesystem, <filename>/usr</filename>, has two lines
|
||||
specifying its exports to the same host,
|
||||
<hostid>client</hostid>. The correct format is:</para>
|
||||
|
||||
<programlisting>/usr/src /usr/ports client</programlisting>
|
||||
|
||||
<para>The properties of one filesystem exported to a given host
|
||||
must all occur on one line. Lines without a client specified
|
||||
are treated as a single host. This limits how you can export
|
||||
filesystems, but for most people this is not an issue.</para>
|
||||
|
||||
<para>The following is an example of a valid export list, where
|
||||
<filename>/usr</filename> and <filename>/exports</filename>
|
||||
are local filesystems:</para>
|
||||
|
||||
<programlisting># Export src and ports to client01 and client02, but only
|
||||
# client01 has root privileges on it
|
||||
/usr/src /usr/ports -maproot=0 client01
|
||||
/usr/src /usr/ports client02
|
||||
# The "client" machines have root and can mount anywhere
|
||||
# up /exports. Anyone inhe world can mount /exports/obj read-only
|
||||
/exports -alldirs -maproot=0 client01 client02
|
||||
/exports/obj -ro</programlisting>
|
||||
|
||||
<para>You must restart
|
||||
<command>mountd</command> whenever you modify
|
||||
<filename>/etc/exports</filename> to make changes take
|
||||
effect. This can be accomplished by sending the hangup signal
|
||||
to the <command>mountd</command> process:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kill -HUP `cat /var/run/mountd.pid`</userinput></screen>
|
||||
|
||||
<para>Now that you have made all these changes you can just reboot
|
||||
and let FreeBSD start everything for you at boot time or you can
|
||||
and let FreeBSD start everything for you at boot time, or you can
|
||||
run the following commands as root:</para>
|
||||
|
||||
<para>On the NFS server:</para>
|
||||
|
@ -880,10 +916,9 @@ nfs_client_flags="-n 4"</programlisting>
|
|||
correctly you should be able to go into /mnt on the client and see
|
||||
all the files that are on the server.</para>
|
||||
|
||||
<para>If you want to permanently (each time you reboot) mount a
|
||||
remote file system you need to add it to your
|
||||
<filename>/etc/fstab</filename> file. Here is an example
|
||||
line:</para>
|
||||
<para>If you want to automatically mount a
|
||||
remote file system each time the computer boots, add the filesystem to
|
||||
<filename>/etc/fstab</filename>. Here is an example:</para>
|
||||
|
||||
<programlisting>server:/home /mnt nfs rw 0 0</programlisting>
|
||||
|
||||
|
|
Loading…
Reference in a new issue