source: networking/netprogs/nfs-utils.xml@ 2bda6610

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 2bda6610 was 2de46bcc, checked in by Ken Moffat <ken@…>, 10 years ago

Patch nfs-utils for gcc-4.9.1

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13706 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.7 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 " ">
[6336840d]9 <!ENTITY nfs-utils-md5sum "3ac3726eda563946d1f44ac3e5b61d56">
10 <!ENTITY nfs-utils-size "763 KB">
[b163480]11 <!ENTITY nfs-utils-buildsize "16 MB">
[c7328ac]12 <!ENTITY nfs-utils-time "0.2 SBU">
[d47e7ea9]13]>
14
[f8af105]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">
26 <primary sortas="a-Nfs-utils">NFS Utilities</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to NFS Utilities</title>
31
32 <para>The <application>NFS Utilities</application> package contains the
[e20c8110]33 userspace server and client tools necessary to use the kernel's NFS
[b86cfc2]34 abilities. NFS is a protocol that allows sharing file systems over the
35 network.</para>
36
[fd4dbec]37 &lfs75_checked;
[d40e1a4]38
[08fa483]39 <bridgehead renderas="sect3">Package Information</bridgehead>
[b86cfc2]40 <itemizedlist spacing='compact'>
41 <listitem>
42 <para>Download (HTTP): <ulink url="&nfs-utils-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&nfs-utils-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &nfs-utils-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &nfs-utils-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &nfs-utils-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &nfs-utils-time;</para>
58 </listitem>
59 </itemizedlist>
60
[2de46bcc]61 <bridgehead renderas="sect3">Additional Download</bridgehead>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Required patch:
66 <ulink url="&patch-root;/nfs-utils-&nfs-utils-version;-gcc_4_9-1.patch"/>
67 </para>
68 </listitem>
69 </itemizedlist>
70
[b86cfc2]71 <bridgehead renderas="sect3">NFS Utilities Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Required</bridgehead>
[ed6a289c]74 <para role="required">
[b163480]75 <xref linkend="libtirpc"/>
[ed6a289c]76 </para>
[06eb274]77
[b163480]78 <bridgehead renderas="sect4">Optional</bridgehead>
[ed6a289c]79 <para role="optional">
[37441de]80 <xref linkend="libevent"/>,
[b163480]81 <xref linkend="sqlite"/> and
82 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libnfsidmap</ulink> (for NFSv4 support),
[ed6a289c]83 <xref linkend="mitkrb"/> or
84 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
[6336840d]85 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support) and
[56605b9]86 <xref linkend="libcap-pam"/>
[ed6a289c]87 </para>
[0f10bc0]88
[b163480]89 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
90 <para role="required">
[cca69d7]91 <xref linkend="rpcbind"/>
[ed6a289c]92 </para>
[b86cfc2]93
[3cb0c57]94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/nfs-utils"/></para>
96
[b86cfc2]97 </sect2>
98
99 <sect2 role="kernel" id='nfs-utils-kernel'>
100 <title>Kernel Configuration</title>
101
102 <para>Enable the following options in the kernel configuration
[bfb7882]103 and recompile the kernel if necessary:</para>
[d47e7ea9]104
[b163480]105<screen><literal>File systems ---&gt;
106 Network File Systems ---&gt;
107 NFS client support: Y or M
108 NFS server support: Y or M</literal></screen>
[d47e7ea9]109
[b86cfc2]110 <para>Select the appropriate sub-options that appear when the above options
111 are selected.</para>
112
113 <indexterm zone="nfs-utils nfs-utils-kernel">
114 <primary sortas="d-nfs-utils">NFS Utilities</primary>
115 </indexterm>
[d47e7ea9]116
[b86cfc2]117 </sect2>
[d47e7ea9]118
[e20c8110]119 <sect2 role="installation" id='nfs-utils-install'
120 xreflabel='NFS Utilities Installation'>
[b86cfc2]121 <title>Installation of NFS Utilities</title>
[d47e7ea9]122
[e20c8110]123 <para>Before you compile the program, ensure that the
[b86cfc2]124 <systemitem class="username">nobody</systemitem> user and
[e20c8110]125 <systemitem class="groupname">nogroup</systemitem> group have been
126 created. You can add them by running the following commands as the
[b86cfc2]127 <systemitem class="username">root</systemitem> user:</para>
[a16cb066]128
[eaf6a1cd]129<screen role="root"><userinput>groupadd -g 99 nogroup &amp;&amp;
[0dfb754]130useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
131 -s /bin/false -u 99 nobody</userinput></screen>
[d47e7ea9]132
[b86cfc2]133 <note>
134 <para>The classic uid and gid values are 65534 which is also -2 when
[17b7723]135 interpreted as a signed 16-bit number. These values impact other files
136 on some filesystems that do not have support for sparse files. The
[b86cfc2]137 <systemitem class="username">nobody</systemitem> and <systemitem
[17b7723]138 class="groupname">nogroup</systemitem> values are relatively arbitrary.
[e20c8110]139 The impact on a server is nil if the <filename>exports</filename> file
140 is configured correctly. If it is misconfigured, an
141 <command>ls -l</command> or <command>ps</command> listing will show a
142 uid or gid number of 65534 instead of a name. The client uses <systemitem
[b86cfc2]143 class="username">nobody</systemitem> only as the user running
144 <command>rpc.statd</command>.</para>
145 </note>
146
147 <para>Install <application>NFS Utilities</application> by running
148 the following commands:</para>
[d47e7ea9]149
[2de46bcc]150<screen><userinput>patch -Np1 -i ../nfs-utils-&nfs-utils-version;-gcc_4_9-1.patch &amp;&amp;
151./configure --prefix=/usr \
[37441de]152 --sysconfdir=/etc \
153 --without-tcp-wrappers \
154 --disable-nfsv4 \
155 --disable-gss &amp;&amp;
[a16cb066]156make</userinput></screen>
157
[0f10bc0]158 <para>If your <filename class="directory">/usr</filename> directory
159 is NFS mounted, you should install the executables in
160 <filename class="directory">/sbin</filename> by passing
161 an additional parameter <option>--sbindir=/sbin</option> to the
162 above <command>./configure</command> command.</para>
163
[6336840d]164 <para>To test the results, issue: <command>make check</command>.</para>
[a16cb066]165
[e20c8110]166 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[d47e7ea9]167
[b163480]168<!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
169
[e20c8110]170<screen role='root'><userinput>make install</userinput></screen>
171
[b86cfc2]172 </sect2>
[d47e7ea9]173
[b86cfc2]174 <sect2 role="commands">
175 <title>Command Explanations</title>
[a16cb066]176
[b163480]177 <para><parameter>--without-tcp-wrappers</parameter>: This option is
178 needed because TCP Wrappers is not in BLFS.</para>
179
180 <para><parameter>--disable-nfsv4</parameter>: Disables support
181 for NFS version 4.</para>
[a16cb066]182
[b86cfc2]183 <para><parameter>--disable-gss</parameter>: Disables support for
184 RPCSEC GSS (RPC Security).</para>
[a16cb066]185
[b86cfc2]186 </sect2>
[a16cb066]187
[b86cfc2]188 <sect2 role="configuration">
189 <title>Configuring NFS Utilities</title>
[d47e7ea9]190
[b86cfc2]191 <sect3 id='nfs-utils-server-config'>
[3a929dc]192 <title>Server Configuration</title>
[d47e7ea9]193
[b86cfc2]194 <para><filename>/etc/exports</filename> contains the exported directories
[e20c8110]195 on NFS servers. Refer to the <filename>exports.5</filename> manual page
196 for the syntax of this file. Also refer to the "NFS HowTo" available at
197 <ulink url="http://nfs.sourceforge.net/nfs-howto/"/> for information on
198 how to configure the servers and clients in a secure manner. For example,
199 for sharing the <filename class="directory">/home</filename> directory
200 over the local network, the following line may be added:</para>
[d47e7ea9]201
[ed6a289c]202<screen role="root"><userinput>/home <replaceable>&lt;192.168.0.0/24&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
[d47e7ea9]203
[b86cfc2]204 <indexterm zone="nfs-utils nfs-utils-server-config">
205 <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
206 </indexterm>
207
[e20c8110]208 <sect4 id="nfs-utils-server-init">
[b86cfc2]209 <title>Boot Script</title>
[a16cb066]210
[b86cfc2]211 <para>Install the <filename>/etc/rc.d/init.d/nfs-server</filename>
[06eb274]212 init script included in the <xref linkend="bootscripts"/> package
[ed6a289c]213 to start the server at boot.</para>
[d47e7ea9]214
[eaf6a1cd]215<screen role="root"><userinput>make install-nfs-server</userinput></screen>
[d47e7ea9]216
[b86cfc2]217 <indexterm zone="nfs-utils nfs-utils-server-init">
218 <primary sortas="f-nfs-server">nfs-server</primary>
219 </indexterm>
220
221 <para>Now create the <filename>/etc/sysconfig/nfs-server</filename>
222 configuration file:</para>
[f5e4bdec]223
[eaf6a1cd]224<screen role="root"><userinput>cat &gt; /etc/sysconfig/nfs-server &lt;&lt; "EOF"
225<literal>PORT="2049"
[f5e4bdec]226PROCESSES="8"
227QUOTAS="no"
[eaf6a1cd]228KILLDELAY="10"</literal>
229EOF</userinput></screen>
[f5e4bdec]230
[06eb274]231 <note><para>The above parameters may be optionally placed in
[ed6a289c]232 <filename>/etc/sysconfig/rc.site</filename>.</para></note>
233
[b86cfc2]234 <indexterm zone="nfs-utils nfs-utils-server-init">
235 <primary
236 sortas="e-etc-sysconfig-nfs-server">/etc/sysconfig/nfs-server</primary>
237 </indexterm>
238
239 </sect4>
[d47e7ea9]240
[b86cfc2]241 </sect3>
[d47e7ea9]242
[b86cfc2]243 <sect3 id='nfs-utils-client-config'>
[3a929dc]244 <title>Client Configuration</title>
[eaf6a1cd]245
[b86cfc2]246 <para><filename>/etc/fstab</filename> contains the directories that
247 are to be mounted on the client. Alternately the partitions can be
248 mounted by using the <command>mount</command> command with the proper
249 options. To mount the <filename class="directory">/home</filename>
250 and <filename class="directory">/usr</filename> partitions, add the
251 following to the <filename>/etc/fstab</filename>:</para>
[a16cb066]252
[0d1cbe66]253<screen role="root"><userinput><replaceable>&lt;server-name&gt;</replaceable>:/home /home nfs rw,_netdev 0 0
254<replaceable>&lt;server-name&gt;</replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
255
256 <para>The options which can be used are specified in <command>man 5 nfs</command>.
257 If both the client and server are running recent versions of linux, most of the
258 options will be negotiated. You can specify either <literal>rw</literal> or
259 <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
260 automatically mounted at boot, or <literal>noauto</literal> (and perhaps
261 <literal>user</literal>) for other filesystems.</para>
262
263 <para>If the fileserver is not running a recent version of linux, you may need to
264 specifiy other options.</para>
265
266 <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
267 and add the option <literal>comment=systemd.automount</literal>. Some machines
268 need this, because systemd tries to mount the external fs&apos;s before the network
269 is up, others do not need it. An alternative is for <systemitem
270 class="username">root</systemitem> to run <command>mount -a</command>.</para>
[a16cb066]271
[b86cfc2]272 <indexterm zone="nfs-utils nfs-utils-client-config">
273 <primary sortas="e-etc-fstab">/etc/fstab</primary>
274 </indexterm>
[d47e7ea9]275
[08fa483]276<!-- /etc/netconfig is installed by libtirpc
[b1477fe7]277 <para>In some circumstances an <filename>/etc/netconfig</filename> file
278 is required by an nfs client. It does no harm to create one even if it
279 is not in fact needed. As the <systemitem class="username">root</systemitem>
280 user:</para>
281
282<screen role="root"><userinput>cat &gt; /etc/netconfig &lt;&lt; "EOF"
283udp6 tpi_clts v inet6 udp - -
284tcp6 tpi_cots_ord v inet6 tcp - -
285udp tpi_clts v inet udp - -
286tcp tpi_cots_ord v inet tcp - -
287rawip tpi_raw - inet - - -
288local tpi_cots_ord - loopback - - -
289EOF</userinput></screen>
290
291 <indexterm zone="nfs-utils nfs-utils-client-config">
292 <primary sortas="e-etc-netconfig">/etc/netconfig</primary>
293 </indexterm>
[08fa483]294-->
[b1477fe7]295
[b86cfc2]296 <sect4 id="nfs-utils-client-init">
297 <title>Boot Script</title>
[d47e7ea9]298
[06eb274]299 <note><para>The following boot script is not required if the
[ed6a289c]300 nfs-server script is installed.</para></note>
301
302 <para>Install the <filename>/etc/rc.d/init.d/nfs-client</filename> init
303 script included in the <xref linkend="bootscripts"/> package to start
304 the client services at boot.</para>
[a16cb066]305
[b86cfc2]306<screen role="root"><userinput>make install-nfs-client</userinput></screen>
[a16cb066]307
[b86cfc2]308 <indexterm zone="nfs-utils nfs-utils-client-config">
309 <primary sortas="f-nfs-client">nfs-client</primary>
310 </indexterm>
311
312 <para>To automatically mount <systemitem
[ed6a289c]313 class="filesystem">nfs</systemitem> filesystems, clients will also need
314 to install the <filename>netfs</filename> bootscript as described in
315 <xref linkend="postlfs-config-netfs"/>.</para>
[b86cfc2]316
317 <indexterm zone="nfs-utils nfs-utils-client-config">
318 <primary sortas="f-netfs">netfs</primary>
319 </indexterm>
320
321 </sect4>
322
323 </sect3>
324
325 </sect2>
326
327 <sect2 role="content">
328 <title>Contents</title>
329 <segmentedlist>
330 <segtitle>Installed Programs</segtitle>
331 <segtitle>Installed Libraries</segtitle>
332 <segtitle>Installed Directories</segtitle>
333
334 <seglistitem>
[06eb274]335 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
[b163480]336 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
[d40e1a4]337 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
338 and umount.nfs4 (link to mount.nfs)</seg>
[b86cfc2]339 <seg>None</seg>
340 <seg>/var/lib/nfs</seg>
341 </seglistitem>
342 </segmentedlist>
343
344 <variablelist>
345 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
346 <?dbfo list-presentation="list"?>
347 <?dbhtml list-presentation="table"?>
348
349 <varlistentry id="exportfs">
350 <term><command>exportfs</command></term>
351 <listitem>
352 <para>maintains a list of NFS exported file systems.</para>
353 <indexterm zone="nfs-utils exportfs">
354 <primary sortas="b-exportfs">exportfs</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
[d40e1a4]359 <varlistentry id="mountstats">
360 <term><command>mountstats</command></term>
361 <listitem>
362 <para>displays NFS client per-mount statistics.</para>
363 <indexterm zone="nfs-utils mountstats">
364 <primary sortas="b-mountstats">mountstats</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
[0f10bc0]369 <varlistentry id="mountnfs">
370 <term><command>mount.nfs</command></term>
371 <listitem>
372 <para>Used to mount a network share using NFS</para>
373 <indexterm zone="nfs-utils mountnfs">
374 <primary sortas="b-mountnfs">mount.nfs</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="mountnfs4">
380 <term><command>mount.nfs4</command></term>
381 <listitem>
382 <para>Used to mount a network share using NFSv4</para>
383 <indexterm zone="nfs-utils mountnfs4">
384 <primary sortas="b-mountnfs4">mount.nfs4</primary>
385 </indexterm>
386 </listitem>
387 </varlistentry>
388
[d40e1a4]389 <varlistentry id="nfsiostat-nfs-utils">
390 <term><command>nfsiostat</command></term>
391 <listitem>
392 <para>Report input/output statistics for network filesystems.</para>
393 <indexterm zone="nfs-utils nfsiostat-nfs-utils">
394 <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
[b86cfc2]399 <varlistentry id="nfsstat">
400 <term><command>nfsstat</command></term>
401 <listitem>
[d40e1a4]402 <para>displays statistics kept about NFS client and server activity.</para>
[b86cfc2]403 <indexterm zone="nfs-utils nfsstat">
404 <primary sortas="b-nfsstat">nfsstat</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="rpcmountd">
410 <term><command>rpc.mountd</command></term>
411 <listitem>
412 <para>implements the NFS mount protocol on an NFS server.</para>
413 <indexterm zone="nfs-utils rpcmountd">
414 <primary sortas="b-rpcmountd">rpc.mountd</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 <varlistentry id="rpcnfsd">
420 <term><command>rpc.nfsd</command></term>
421 <listitem>
422 <para>implements the user level part of the NFS
423 service on the server.</para>
424 <indexterm zone="nfs-utils rpcnfsd">
425 <primary sortas="b-rpcnfsd">rpc.nfsd</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="rpcstatd">
431 <term><command>rpc.statd</command></term>
432 <listitem>
[0f10bc0]433 <para>is used by the NFS file locking service. Run on both sides,
434 client as well as server, when you want file locking enabled.</para>
[b86cfc2]435 <indexterm zone="nfs-utils rpcstatd">
436 <primary sortas="b-rpcstatd">rpc.statd</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
[d3761424]441 <varlistentry id="rpcdebug">
442 <term><command>rpcdebug</command></term>
443 <listitem>
[81066706]444 <para>sets or clears the kernel's NFS client and server debug
445 flags.</para>
[d3761424]446 <indexterm zone="nfs-utils rpcdebug">
447 <primary sortas="b-rpcdebug">rpcdebug</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
[b86cfc2]452 <varlistentry id="showmount">
453 <term><command>showmount</command></term>
454 <listitem>
455 <para>displays mount information for an NFS server.</para>
456 <indexterm zone="nfs-utils showmount">
457 <primary sortas="b-showmount">showmount</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
[d3761424]462 <varlistentry id="sm-notify">
463 <term><command>sm-notify</command></term>
464 <listitem>
465 <para>is used to send Network Status Monitor reboot messages.</para>
466 <indexterm zone="nfs-utils sm-notify">
467 <primary sortas="b-sm-notify">sm-notify</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="start-statd">
473 <term><command>start-statd</command></term>
474 <listitem>
475 <para>is a script called by nfsmount when mounting a filesystem with
[81066706]476 locking enabled, if statd does not appear to be running. It can be
477 customised with whatever flags are appropriate for the site.</para>
[d3761424]478 <indexterm zone="nfs-utils start-statd">
479 <primary sortas="b-start-statd">start-statd</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
[0f10bc0]484 <varlistentry id="umountnfs">
485 <term><command>umount.nfs</command></term>
486 <listitem>
487 <para>Used to unmount a network share using NFS</para>
488 <indexterm zone="nfs-utils umountnfs">
489 <primary sortas="b-umountnfs">umount.nfs</primary>
490 </indexterm>
491 </listitem>
492 </varlistentry>
493
494 <varlistentry id="umountnfs4">
495 <term><command>umount.nfs4</command></term>
496 <listitem>
497 <para>Used to unmount a network share using NFSv4</para>
498 <indexterm zone="nfs-utils umountnfs4">
499 <primary sortas="b-umountnfs4">umount.nfs4</primary>
500 </indexterm>
501 </listitem>
502 </varlistentry>
503
[b86cfc2]504 </variablelist>
505
506 </sect2>
[d47e7ea9]507
[176b211]508</sect1>
Note: See TracBrowser for help on using the repository browser.