source: networking/netprogs/nfs-utils.xml@ 8dfc5c3

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 8dfc5c3 was 8dfc5c3, checked in by Krejzi <krejzi@…>, 7 years ago

Fix some URLs

  • Switch to https:// scheme where possible to avoid redirects
  • Unify all kernel.org, Sourceforge and GNU URLs
  • Fix python and perl module URLs to be consistent
  • Fix github provided URLs to properly download tarballs instead of vFOO.tar.gz
  • Use upstream locations for some packages or better/shorter URLs if available
  • Add https:// URLs for gnupg packages

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

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