source: networking/netprogs/nfs-utils.xml@ 99bc211

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 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 99bc211 was d2df2ce, checked in by Ken Moffat <ken@…>, 8 years ago

nfs-utils: correct description of --disable-nfsv4 switch, and note that autonegotiation will fail if CONFIG_NFSD_V4 is enabled at either end. Reported by John Frankish. I suspect the failure is because we do not install portmapper any more (the data he provided showed it was being invoked during the negotiation).

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

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