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

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 99e99c3 was 99e99c3, checked in by Ken Moffat <ken@…>, 10 years ago

tags

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@14237 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 "3ac3726eda563946d1f44ac3e5b61d56">
10 <!ENTITY nfs-utils-size "763 KB">
11 <!ENTITY nfs-utils-buildsize "16 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 &lfs76_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">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
71 <bridgehead renderas="sect3">NFS Utilities Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Required</bridgehead>
74 <para role="required">
75 <xref linkend="libtirpc"/>
76 </para>
77
78 <bridgehead renderas="sect4">Optional</bridgehead>
79 <para role="optional">
80 <xref linkend="libevent"/>,
81 <xref linkend="sqlite"/> and
82 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libnfsidmap</ulink> (for NFSv4 support),
83 <xref linkend="mitkrb"/> or
84 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
85 <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support) and
86 <xref linkend="libcap-pam"/>
87 </para>
88
89 <bridgehead renderas="sect4">Required (runtime)</bridgehead>
90 <para role="required">
91 <xref linkend="rpcbind"/>
92 </para>
93
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/nfs-utils"/></para>
96
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
103 and recompile the kernel if necessary:</para>
104
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>
109
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>
116
117 </sect2>
118
119 <sect2 role="installation" id='nfs-utils-install'
120 xreflabel='NFS Utilities Installation'>
121 <title>Installation of NFS Utilities</title>
122
123 <para>Before you compile the program, ensure that the
124 <systemitem class="username">nobody</systemitem> user and
125 <systemitem class="groupname">nogroup</systemitem> group have been
126 created. You can add them by running the following commands as the
127 <systemitem class="username">root</systemitem> user:</para>
128
129<screen role="root"><userinput>groupadd -g 99 nogroup &amp;&amp;
130useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
131 -s /bin/false -u 99 nobody</userinput></screen>
132
133 <note>
134 <para>The classic uid and gid values are 65534 which is also -2 when
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
137 <systemitem class="username">nobody</systemitem> and <systemitem
138 class="groupname">nogroup</systemitem> values are relatively arbitrary.
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
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>
149
150<screen><userinput>patch -Np1 -i ../nfs-utils-&nfs-utils-version;-gcc_4_9-1.patch &amp;&amp;
151./configure --prefix=/usr \
152 --sysconfdir=/etc \
153 --without-tcp-wrappers \
154 --disable-nfsv4 \
155 --disable-gss &amp;&amp;
156make</userinput></screen>
157
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
164 <para>To test the results, issue: <command>make check</command>.</para>
165
166 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
167
168<!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
169
170<screen role='root'><userinput>make install</userinput></screen>
171
172 </sect2>
173
174 <sect2 role="commands">
175 <title>Command Explanations</title>
176
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>
182
183 <para><parameter>--disable-gss</parameter>: Disables support for
184 RPCSEC GSS (RPC Security).</para>
185
186 </sect2>
187
188 <sect2 role="configuration">
189 <title>Configuring NFS Utilities</title>
190
191 <sect3 id='nfs-utils-server-config'>
192 <title>Server Configuration</title>
193
194 <para><filename>/etc/exports</filename> contains the exported directories
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>
201
202<screen role="root"><userinput>/home <replaceable>&lt;192.168.0.0/24&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
203
204 <indexterm zone="nfs-utils nfs-utils-server-config">
205 <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
206 </indexterm>
207
208 <sect4 id="nfs-utils-server-init">
209 <title>Boot Script</title>
210
211 <para>Install the <filename>/etc/rc.d/init.d/nfs-server</filename>
212 init script included in the <xref linkend="bootscripts"/> package
213 to start the server at boot.</para>
214
215<screen role="root"><userinput>make install-nfs-server</userinput></screen>
216
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>
223
224<screen role="root"><userinput>cat &gt; /etc/sysconfig/nfs-server &lt;&lt; "EOF"
225<literal>PORT="2049"
226PROCESSES="8"
227QUOTAS="no"
228KILLDELAY="10"</literal>
229EOF</userinput></screen>
230
231 <note><para>The above parameters may be optionally placed in
232 <filename>/etc/sysconfig/rc.site</filename>.</para></note>
233
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>
240
241 </sect3>
242
243 <sect3 id='nfs-utils-client-config'>
244 <title>Client Configuration</title>
245
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>
252
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>
271
272 <indexterm zone="nfs-utils nfs-utils-client-config">
273 <primary sortas="e-etc-fstab">/etc/fstab</primary>
274 </indexterm>
275
276<!-- /etc/netconfig is installed by libtirpc
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>
294-->
295
296 <sect4 id="nfs-utils-client-init">
297 <title>Boot Script</title>
298
299 <note><para>The following boot script is not required if the
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>
305
306<screen role="root"><userinput>make install-nfs-client</userinput></screen>
307
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
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>
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>
335 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
336 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
337 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
338 and umount.nfs4 (link to mount.nfs)</seg>
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
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
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
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
399 <varlistentry id="nfsstat">
400 <term><command>nfsstat</command></term>
401 <listitem>
402 <para>displays statistics kept about NFS client and server activity.</para>
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>
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>
435 <indexterm zone="nfs-utils rpcstatd">
436 <primary sortas="b-rpcstatd">rpc.statd</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
441 <varlistentry id="rpcdebug">
442 <term><command>rpcdebug</command></term>
443 <listitem>
444 <para>sets or clears the kernel's NFS client and server debug
445 flags.</para>
446 <indexterm zone="nfs-utils rpcdebug">
447 <primary sortas="b-rpcdebug">rpcdebug</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
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
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
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>
478 <indexterm zone="nfs-utils start-statd">
479 <primary sortas="b-start-statd">start-statd</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
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
504 </variablelist>
505
506 </sect2>
507
508</sect1>
Note: See TracBrowser for help on using the repository browser.