source: networking/netprogs/nfs-utils.xml@ 71c31f5

systemd-13485
Last change on this file since 71c31f5 was b91aa96, checked in by DJ Lucas <dj@…>, 8 years ago

Merge changes from Chapter 15.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16877 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.3 KB
RevLine 
[d47e7ea9]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" [
[d47e7ea9]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
[8e82479]7 <!ENTITY nfs-utils-download-http "&sourceforge-repo;/nfs/nfs-utils-&nfs-utils-version;.tar.bz2">
[8070b391]8 <!ENTITY nfs-utils-download-ftp " ">
[b91aa96]9 <!ENTITY nfs-utils-md5sum "9b87d890669eaaec8e97a2b0a35b2665">
10 <!ENTITY nfs-utils-size "776 KB">
11 <!ENTITY nfs-utils-buildsize "14 MB">
12 <!ENTITY nfs-utils-time "0.2 SBU">
[d47e7ea9]13]>
14
[b91aa96]15<sect1 id="nfs-utils" xreflabel="nfs-utils-&nfs-utils-version;">
[b86cfc2]16 <?dbhtml filename="nfs-utils.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
[f8af105]23 <title>NFS-Utils-&nfs-utils-version;</title>
[b86cfc2]24
25 <indexterm zone="nfs-utils">
[b91aa96]26 <primary sortas="a-Nfs-utils">NFS Utilities</primary>
[b86cfc2]27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to NFS Utilities</title>
31
[b91aa96]32 <para>The <application>NFS Utilities</application> package contains the
33 userspace server and client tools necessary to use the kernel's NFS
34 abilities. NFS is a protocol that allows sharing file systems over the
35 network.</para>
[b86cfc2]36
[b91aa96]37 &lfs78_checked;
[d40e1a4]38
[08fa483]39 <bridgehead renderas="sect3">Package Information</bridgehead>
[b86cfc2]40 <itemizedlist spacing='compact'>
41 <listitem>
[b91aa96]42 <para>Download (HTTP): <ulink url="&nfs-utils-download-http;"/></para>
[b86cfc2]43 </listitem>
44 <listitem>
[b91aa96]45 <para>Download (FTP): <ulink url="&nfs-utils-download-ftp;"/></para>
[b86cfc2]46 </listitem>
47 <listitem>
[b91aa96]48 <para>Download MD5 sum: &nfs-utils-md5sum;</para>
[b86cfc2]49 </listitem>
50 <listitem>
[b91aa96]51 <para>Download size: &nfs-utils-size;</para>
[b86cfc2]52 </listitem>
53 <listitem>
[b91aa96]54 <para>Estimated disk space required: &nfs-utils-buildsize;</para>
[b86cfc2]55 </listitem>
56 <listitem>
[b91aa96]57 <para>Estimated build time: &nfs-utils-time;</para>
[b86cfc2]58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">NFS Utilities Dependencies</bridgehead>
62
63 <bridgehead renderas="sect4">Required</bridgehead>
[ed6a289c]64 <para role="required">
[b163480]65 <xref linkend="libtirpc"/>
[ed6a289c]66 </para>
[06eb274]67
[b163480]68 <bridgehead renderas="sect4">Optional</bridgehead>
[ed6a289c]69 <para role="optional">
[b91aa96]70 <xref linkend="libevent"/>,
71 <xref linkend="sqlite"/> and
72 <xref linkend="libnfsidmap"/> (for NFSv4 support),
[ed6a289c]73 <xref linkend="mitkrb"/> or
[b91aa96]74 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
75 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support) and
76 <xref linkend="libcap-pam"/>
[ed6a289c]77 </para>
[0f10bc0]78
[b163480]79 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
80 <para role="required">
[cca69d7]81 <xref linkend="rpcbind"/>
[ed6a289c]82 </para>
[b86cfc2]83
[3cb0c57]84 <para condition="html" role="usernotes">User Notes:
[b91aa96]85 <ulink url="&blfs-wiki;/nfs-utils"/></para>
86
[b86cfc2]87 </sect2>
88
[b91aa96]89 <sect2 role="kernel" id='nfs-utils-kernel'>
[b86cfc2]90 <title>Kernel Configuration</title>
91
[b91aa96]92 <para>Enable the following options in the kernel configuration
93 and recompile the kernel if necessary:</para>
[d47e7ea9]94
[b163480]95<screen><literal>File systems ---&gt;
[ac38e9dc]96 [*] Network File Systems ---&gt; [CONFIG_NETWORK_FILESYSTEMS]
97 &lt;*/M&gt; NFS client support [CONFIG_NFS_FS]
98 &lt;*/M&gt; NFS server support [CONFIG_NFSD]</literal></screen>
[d47e7ea9]99
[b91aa96]100 <para>Select the appropriate sub-options that appear when the above options
101 are selected.</para>
[b86cfc2]102
103 <indexterm zone="nfs-utils nfs-utils-kernel">
[b91aa96]104 <primary sortas="d-nfs-utils">NFS Utilities</primary>
[b86cfc2]105 </indexterm>
[d47e7ea9]106
[b86cfc2]107 </sect2>
[d47e7ea9]108
[b91aa96]109 <sect2 role="installation" id='nfs-utils-install'
110 xreflabel='NFS Utilities Installation'>
[b86cfc2]111 <title>Installation of NFS Utilities</title>
[d47e7ea9]112
[b91aa96]113 <para>Install <application>NFS Utilities</application> by running
114 the following commands:</para>
[a16cb066]115
[b91aa96]116<screen><userinput>./configure --prefix=/usr \
117 --sysconfdir=/etc \
118 --without-tcp-wrappers \
119 --disable-nfsv4 \
120 --disable-gss &amp;&amp;
[ac38e9dc]121make</userinput></screen>
122
[b91aa96]123 <para>If your <filename class="directory">/usr</filename> directory
124 is NFS mounted, you should install the executables in
125 <filename class="directory">/sbin</filename> by passing
126 an additional parameter <option>--sbindir=/sbin</option> to the
127 above <command>./configure</command> command.</para>
[ac38e9dc]128
[b91aa96]129 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d47e7ea9]130
[b163480]131<!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
[ac38e9dc]132
[b91aa96]133<screen role='root'><userinput>make install &amp;&amp;
134chmod u+w,go+r /sbin/mount.nfs</userinput></screen>
[b163480]135
[b91aa96]136 <para>The tests for this package require that the package be installed and
137 configured as specified below. In addition, the the daemon from <xref
138 linkend="rpcbind"/> needs to be running and the tests need to be run as the
139 <systemitem class="username">root</systemitem> user.</para>
[ac38e9dc]140
[b91aa96]141 <para>To test the results, issue, as root: <command>make check</command>.</para>
[e20c8110]142
[b86cfc2]143 </sect2>
[d47e7ea9]144
[b86cfc2]145 <sect2 role="commands">
146 <title>Command Explanations</title>
[a16cb066]147
[b91aa96]148 <para><parameter>--without-tcp-wrappers</parameter>: This option is
149 needed because TCP Wrappers is not in BLFS.</para>
[ac38e9dc]150
[b91aa96]151 <para><parameter>--disable-nfsv4</parameter>: Disables support
152 for NFS version 4.</para>
[b163480]153
[b91aa96]154 <para><parameter>--disable-gss</parameter>: Disables support for
155 RPCSEC GSS (RPC Security).</para>
[a16cb066]156
[b86cfc2]157 </sect2>
[a16cb066]158
[b86cfc2]159 <sect2 role="configuration">
160 <title>Configuring NFS Utilities</title>
[d47e7ea9]161
[b91aa96]162 <sect3 id='nfs-utils-server-config'>
163 <title>Server Configuration</title>
164
165 <para><filename>/etc/exports</filename> contains the exported directories
166 on NFS servers. Refer to the <filename>exports.5</filename> manual page
167 for the syntax of this file. Also refer to the "NFS HowTo" available at
168 <ulink url="http://nfs.sourceforge.net/nfs-howto/"/> for information on
169 how to configure the servers and clients in a secure manner. For example,
170 for sharing the <filename class="directory">/home</filename> directory
171 over the local network, the following line may be added:</para>
172
173<screen role="root"><userinput>/home <replaceable>192.168.0.0/24</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
174
175 <note><para>Be sure to replace the directory, network address. and prefix above
176 to match your network. The only space in the line above should be between
177 the directory and the network address.</para></note>
[d47e7ea9]178
[b86cfc2]179 <indexterm zone="nfs-utils nfs-utils-server-config">
180 <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
181 </indexterm>
182
[e20c8110]183 <sect4 id="nfs-utils-server-init">
[932240d]184 <title>Systemd Units</title>
[a16cb066]185
[932240d]186 <para>
[0da88ea3]187 To start the NFS server daemons at boot,
[932240d]188 install the systemd units from the <xref linkend="bootscripts"/>
189 package by running the following command as the
190 <systemitem class="username">root</systemitem> user:
191 </para>
[d47e7ea9]192
[ac38e9dc]193<screen role="root"><userinput>make install-nfsv4-server</userinput></screen>
194
195 <para>
196 If you have disabled NFSv4 support, run the following
197 command as the <systemitem
198 class="username">root</systemitem> user to omit the NFSv4
199 specific systemd units:
200 </para>
201
[eaf6a1cd]202<screen role="root"><userinput>make install-nfs-server</userinput></screen>
[d47e7ea9]203
[b86cfc2]204 <indexterm zone="nfs-utils nfs-utils-server-init">
205 <primary sortas="f-nfs-server">nfs-server</primary>
206 </indexterm>
207
[ac38e9dc]208 <para>
209 You can edit the <filename>/etc/default/nfs-utils</filename>
210 file to change the startup options for NFS daemons. Defaults
211 should be fine for most use cases.
212 </para>
[ed6a289c]213
[b86cfc2]214 <indexterm zone="nfs-utils nfs-utils-server-init">
[932240d]215 <primary sortas="e-etc-default-nfs-utils">/etc/default/nfs-utils</primary>
[b86cfc2]216 </indexterm>
217
218 </sect4>
[d47e7ea9]219
[b86cfc2]220 </sect3>
[d47e7ea9]221
[b91aa96]222 <sect3 id='nfs-utils-client-config'>
[3a929dc]223 <title>Client Configuration</title>
[eaf6a1cd]224
[b91aa96]225 <para><filename>/etc/fstab</filename> contains the directories that
226 are to be mounted on the client. Alternately the partitions can be
227 mounted by using the <command>mount</command> command with the proper
228 options. To mount the <filename class="directory">/home</filename>
229 and <filename class="directory">/usr</filename> partitions, add the
230 following to the <filename>/etc/fstab</filename>:</para>
231
232<screen role="root"><userinput><replaceable>&lt;server-name&gt;</replaceable>:/home /home nfs rw,_netdev 0 0
233<replaceable>&lt;server-name&gt;</replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
234
235 <para>The options which can be used are specified in <command>man 5 nfs</command>.
236 If both the client and server are running recent versions of linux, most of the
237 options will be negotiated. You can specify either <literal>rw</literal> or
238 <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
239 automatically mounted at boot, or <literal>noauto</literal> (and perhaps
240 <literal>user</literal>) for other filesystems.</para>
241
242 <para>If the fileserver is not running a recent version of linux, you may need to
243 specifiy other options.</para>
244
245 <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
246 and add the option <literal>comment=systemd.automount</literal>. Some machines
247 need this, because systemd tries to mount the external fs&apos;s before the network
248 is up, others do not need it. An alternative is for <systemitem
249 class="username">root</systemitem> to run <command>mount -a</command>.</para>
[a16cb066]250
[b86cfc2]251 <indexterm zone="nfs-utils nfs-utils-client-config">
252 <primary sortas="e-etc-fstab">/etc/fstab</primary>
253 </indexterm>
[d47e7ea9]254
[b86cfc2]255 <sect4 id="nfs-utils-client-init">
[932240d]256 <title>Systemd Units</title>
[d47e7ea9]257
[ac38e9dc]258 <note>
259 <para>
260 The following systemd unis are not required if the
261 nfs-server units were previously installed.
262 </para>
263 </note>
[ed6a289c]264
[932240d]265 <para>
266 To start the NFS client services at boot,
267 install the systemd units from the <xref linkend="bootscripts"/>
268 package by running the following command as the
269 <systemitem class="username">root</systemitem> user:
270 </para>
[a16cb066]271
[b86cfc2]272<screen role="root"><userinput>make install-nfs-client</userinput></screen>
[a16cb066]273
[b86cfc2]274 <indexterm zone="nfs-utils nfs-utils-client-config">
275 <primary sortas="f-nfs-client">nfs-client</primary>
276 </indexterm>
277
278 </sect4>
279
280 </sect3>
281
282 </sect2>
283
284 <sect2 role="content">
285 <title>Contents</title>
286 <segmentedlist>
287 <segtitle>Installed Programs</segtitle>
288 <segtitle>Installed Libraries</segtitle>
289 <segtitle>Installed Directories</segtitle>
290
291 <seglistitem>
[b91aa96]292 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
293 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
294 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
295 and umount.nfs4 (link to mount.nfs)</seg>
296 <seg>None</seg>
297 <seg>/var/lib/nfs</seg>
[b86cfc2]298 </seglistitem>
299 </segmentedlist>
300
301 <variablelist>
302 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
303 <?dbfo list-presentation="list"?>
304 <?dbhtml list-presentation="table"?>
305
[b91aa96]306 <varlistentry id="exportfs">
307 <term><command>exportfs</command></term>
[b86cfc2]308 <listitem>
[b91aa96]309 <para>maintains a list of NFS exported file systems.</para>
310 <indexterm zone="nfs-utils exportfs">
311 <primary sortas="b-exportfs">exportfs</primary>
[b86cfc2]312 </indexterm>
313 </listitem>
314 </varlistentry>
315
[b91aa96]316 <varlistentry id="mountstats">
317 <term><command>mountstats</command></term>
[d40e1a4]318 <listitem>
[b91aa96]319 <para>displays NFS client per-mount statistics.</para>
320 <indexterm zone="nfs-utils mountstats">
321 <primary sortas="b-mountstats">mountstats</primary>
[d40e1a4]322 </indexterm>
323 </listitem>
324 </varlistentry>
325
[cb0bbd2]326 <varlistentry id="mount.nfs">
[0f10bc0]327 <term><command>mount.nfs</command></term>
328 <listitem>
[b91aa96]329 <para>Used to mount a network share using NFS</para>
[cb0bbd2]330 <indexterm zone="nfs-utils mount.nfs">
331 <primary sortas="b-mount.nfs">mount.nfs</primary>
[0f10bc0]332 </indexterm>
333 </listitem>
334 </varlistentry>
335
[cb0bbd2]336 <varlistentry id="mount.nfs4">
[0f10bc0]337 <term><command>mount.nfs4</command></term>
338 <listitem>
[b91aa96]339 <para>Used to mount a network share using NFSv4</para>
[cb0bbd2]340 <indexterm zone="nfs-utils mount.nfs4">
341 <primary sortas="b-mount.nfs4">mount.nfs4</primary>
[0f10bc0]342 </indexterm>
343 </listitem>
344 </varlistentry>
345
[d40e1a4]346 <varlistentry id="nfsiostat-nfs-utils">
347 <term><command>nfsiostat</command></term>
348 <listitem>
[b91aa96]349 <para>Report input/output statistics for network filesystems.</para>
[d40e1a4]350 <indexterm zone="nfs-utils nfsiostat-nfs-utils">
351 <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
[b86cfc2]356 <varlistentry id="nfsstat">
357 <term><command>nfsstat</command></term>
358 <listitem>
[b91aa96]359 <para>displays statistics kept about NFS client and server activity.</para>
[b86cfc2]360 <indexterm zone="nfs-utils nfsstat">
361 <primary sortas="b-nfsstat">nfsstat</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
[cb0bbd2]366 <varlistentry id="osd_login">
367 <term><command>osd_login</command></term>
368 <listitem>
[b91aa96]369 <para>is a script that is a part of the autologin feature
[cb0bbd2]370 mandated by the pnfs-objects standard.</para>
371 <indexterm zone="nfs-utils osd_login">
372 <primary sortas="b-osd_login">osd_login</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377
378 <varlistentry id="rpc.mountd">
[b86cfc2]379 <term><command>rpc.mountd</command></term>
380 <listitem>
[b91aa96]381 <para>implements the NFS mount protocol on an NFS server.</para>
[cb0bbd2]382 <indexterm zone="nfs-utils rpc.mountd">
383 <primary sortas="b-rpc.mountd">rpc.mountd</primary>
[b86cfc2]384 </indexterm>
385 </listitem>
386 </varlistentry>
387
[cb0bbd2]388 <varlistentry id="rpc.nfsd">
[b86cfc2]389 <term><command>rpc.nfsd</command></term>
390 <listitem>
[b91aa96]391 <para>implements the user level part of the NFS
392 service on the server.</para>
[cb0bbd2]393 <indexterm zone="nfs-utils rpc.nfsd">
394 <primary sortas="b-rpc.nfsd">rpc.nfsd</primary>
[b86cfc2]395 </indexterm>
396 </listitem>
397 </varlistentry>
398
[cb0bbd2]399 <varlistentry id="rpc.statd">
[b86cfc2]400 <term><command>rpc.statd</command></term>
401 <listitem>
[b91aa96]402 <para>is used by the NFS file locking service. Run on both sides,
403 client as well as server, when you want file locking enabled.</para>
[cb0bbd2]404 <indexterm zone="nfs-utils rpc.statd">
405 <primary sortas="b-rpc.statd">rpc.statd</primary>
[b86cfc2]406 </indexterm>
407 </listitem>
408 </varlistentry>
409
[b91aa96]410 <varlistentry id="rpcdebug">
411 <term><command>rpcdebug</command></term>
412 <listitem>
413 <para>sets or clears the kernel's NFS client and server debug
414 flags.</para>
415 <indexterm zone="nfs-utils rpcdebug">
416 <primary sortas="b-rpcdebug">rpcdebug</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
[b86cfc2]421 <varlistentry id="showmount">
422 <term><command>showmount</command></term>
423 <listitem>
[b91aa96]424 <para>displays mount information for an NFS server.</para>
[b86cfc2]425 <indexterm zone="nfs-utils showmount">
426 <primary sortas="b-showmount">showmount</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
[d3761424]431 <varlistentry id="sm-notify">
432 <term><command>sm-notify</command></term>
433 <listitem>
[b91aa96]434 <para>is used to send Network Status Monitor reboot messages.</para>
[d3761424]435 <indexterm zone="nfs-utils sm-notify">
436 <primary sortas="b-sm-notify">sm-notify</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
441 <varlistentry id="start-statd">
442 <term><command>start-statd</command></term>
443 <listitem>
[b91aa96]444 <para>is a script called by nfsmount when mounting a filesystem with
445 locking enabled, if statd does not appear to be running. It can be
446 customised with whatever flags are appropriate for the site.</para>
[d3761424]447 <indexterm zone="nfs-utils start-statd">
448 <primary sortas="b-start-statd">start-statd</primary>
449 </indexterm>
450 </listitem>
451 </varlistentry>
452
[cb0bbd2]453 <varlistentry id="umount.nfs">
[0f10bc0]454 <term><command>umount.nfs</command></term>
455 <listitem>
[b91aa96]456 <para>Used to unmount a network share using NFS</para>
[cb0bbd2]457 <indexterm zone="nfs-utils umount.nfs">
458 <primary sortas="b-umount.nfs">umount.nfs</primary>
[0f10bc0]459 </indexterm>
460 </listitem>
461 </varlistentry>
462
[cb0bbd2]463 <varlistentry id="umount.nfs4">
[0f10bc0]464 <term><command>umount.nfs4</command></term>
465 <listitem>
[b91aa96]466 <para>Used to unmount a network share using NFSv4</para>
[cb0bbd2]467 <indexterm zone="nfs-utils umount.nfs4">
468 <primary sortas="b-umount.nfs4">umount.nfs4</primary>
[0f10bc0]469 </indexterm>
470 </listitem>
471 </varlistentry>
472
[b86cfc2]473 </variablelist>
474
475 </sect2>
[d47e7ea9]476
[176b211]477</sect1>
Note: See TracBrowser for help on using the repository browser.