source: networking/netprogs/nfs-utils.xml@ ce386957

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 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 ce386957 was ce386957, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Update to libreoffice-5.0.2.2.
Update to glib-2.46.1.
Update to xinput-1.6.2.
Update to nfs-utils-1.3.3.

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

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