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

gnome
Last change on this file since cae7a6f was cae7a6f, checked in by Christopher Gregory <cjg@…>, 10 years ago

Converted acpid at autofs bluez fcron gpm sysstat udisks2 upower dhcp nfs-utils cyrus-sasl mitkrb openssh polkit and stunnel pages to systemd

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/gnome@13413 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.6 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 &lfs75_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;
97 NFS client support: Y or M
98 NFS server support: Y or M</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
114 <systemitem class="username">nobody</systemitem> user and
115 <systemitem class="groupname">nogroup</systemitem> group have been
116 created. You can add them by running the following commands as the
117 <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>To test the results, issue: <command>make check</command>.</para>
154
155 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
156
157<!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
158
159<screen role='root'><userinput>make install</userinput></screen>
160
161 </sect2>
162
163 <sect2 role="commands">
164 <title>Command Explanations</title>
165
166 <para><parameter>--without-tcp-wrappers</parameter>: This option is
167 needed because TCP Wrappers is not in BLFS.</para>
168
169 <para><parameter>--disable-nfsv4</parameter>: Disables support
170 for NFS version 4.</para>
171
172 <para><parameter>--disable-gss</parameter>: Disables support for
173 RPCSEC GSS (RPC Security).</para>
174
175 </sect2>
176
177 <sect2 role="configuration">
178 <title>Configuring NFS Utilities</title>
179
180 <sect3 id='nfs-utils-server-config'>
181 <title>Server Configuration</title>
182
183 <para><filename>/etc/exports</filename> contains the exported directories
184 on NFS servers. Refer to the <filename>exports.5</filename> manual page
185 for the syntax of this file. Also refer to the "NFS HowTo" available at
186 <ulink url="http://nfs.sourceforge.net/nfs-howto/"/> for information on
187 how to configure the servers and clients in a secure manner. For example,
188 for sharing the <filename class="directory">/home</filename> directory
189 over the local network, the following line may be added:</para>
190
191<screen role="root"><userinput>/home <replaceable>&lt;192.168.0.0/24&gt;</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
192
193 <indexterm zone="nfs-utils nfs-utils-server-config">
194 <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
195 </indexterm>
196
197 <sect4 id="nfs-utils-server-init-systemd">
198 <title>Systemd Unit File</title>
199
200 <note>
201 <para>
202 Note that there is no support for gss (gssd) daemons nor nfsv4 (idmapd)
203 daemons yet since BLFS doesn't support the configuration out of the box.
204 </para>
205 </note>
206
207
208 <para>
209 The systemd-units package provides native unit files. To install the unit file
210 included in the <xref linkend="systemd-units"/> package
211 to start the server at boot issue the following command
212 as the <systemitem class="username">root</systemitem> user:
213 </para>
214
215<screen role="root"><userinput>make install-nfs-server</userinput></screen>
216
217 <indexterm zone="nfs-utils nfs-utils-server-init-systemd">
218 <primary sortas="f-nfs-server">nfs-server</primary>
219 </indexterm>
220
221 <para>Now create the <filename>/etc/default/nfs-utils</filename>
222 configuration file:</para>
223
224<screen role="root"><userinput>cat &gt; /etc/default/nfs-utils &lt;&lt; "EOF"
225<literal>PORT="2049"
226PROCESSES="8"
227QUOTAS="no"
228KILLDELAY="10"</literal>
229EOF</userinput></screen>
230
231 <indexterm zone="nfs-utils nfs-utils-server-init-systemd">
232 <primary
233 sortas="e-etc-sysconfig-nfs-server">/etc/sysconfig/nfs-server</primary>
234 </indexterm>
235
236 </sect4>
237
238 </sect3>
239
240 <sect3 id='nfs-utils-client-config'>
241 <title>Client Configuration</title>
242
243 <para><filename>/etc/fstab</filename> contains the directories that
244 are to be mounted on the client. Alternately the partitions can be
245 mounted by using the <command>mount</command> command with the proper
246 options. To mount the <filename class="directory">/home</filename>
247 and <filename class="directory">/usr</filename> partitions, add the
248 following to the <filename>/etc/fstab</filename>:</para>
249
250<screen role="root"><userinput><replaceable>&lt;server-name&gt;</replaceable>:/home /home nfs rw,_netdev 0 0
251<replaceable>&lt;server-name&gt;</replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
252
253 <para>The options which can be used are specified in <command>man 5 nfs</command>.
254 If both the client and server are running recent versions of linux, most of the
255 options will be negotiated. You can specify either <literal>rw</literal> or
256 <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
257 automatically mounted at boot, or <literal>noauto</literal> (and perhaps
258 <literal>user</literal>) for other filesystems.</para>
259
260 <para>If the fileserver is not running a recent version of linux, you may need to
261 specifiy other options.</para>
262
263 <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
264 and add the option <literal>comment=systemd.automount</literal>. Some machines
265 need this, because systemd tries to mount the external fs&apos;s before the network
266 is up, others do not need it. An alternative is for <systemitem
267 class="username">root</systemitem> to run <command>mount -a</command>.</para>
268
269 <indexterm zone="nfs-utils nfs-utils-client-config">
270 <primary sortas="e-etc-fstab">/etc/fstab</primary>
271 </indexterm>
272
273<!-- /etc/netconfig is installed by libtirpc
274 <para>In some circumstances an <filename>/etc/netconfig</filename> file
275 is required by an nfs client. It does no harm to create one even if it
276 is not in fact needed. As the <systemitem class="username">root</systemitem>
277 user:</para>
278
279<screen role="root"><userinput>cat &gt; /etc/netconfig &lt;&lt; "EOF"
280udp6 tpi_clts v inet6 udp - -
281tcp6 tpi_cots_ord v inet6 tcp - -
282udp tpi_clts v inet udp - -
283tcp tpi_cots_ord v inet tcp - -
284rawip tpi_raw - inet - - -
285local tpi_cots_ord - loopback - - -
286EOF</userinput></screen>
287
288 <indexterm zone="nfs-utils nfs-utils-client-config">
289 <primary sortas="e-etc-netconfig">/etc/netconfig</primary>
290 </indexterm>
291-->
292
293 <sect4 id="nfs-utils-client-init">
294 <title>Boot Script</title>
295
296 <note><para>The following boot script is not required if the
297 nfs-server script is installed.</para></note>
298
299 <para>Install the systemd unit file included in the
300 <xref linkend="systemd-units"/> package to start
301 the client services at boot issue the following command as the
302 <systemitem class="username">root</systemitem>
303 user:</para>
304
305<screen role="root"><userinput>make install-nfs-client</userinput></screen>
306
307 <indexterm zone="nfs-utils nfs-utils-client-config">
308 <primary sortas="f-nfs-client">nfs-client</primary>
309 </indexterm>
310
311 <para>To automatically mount <systemitem
312 class="filesystem">nfs</systemitem> filesystems, clients will also need
313 to install the <filename>netfs</filename> bootscript as described in
314 <xref linkend="postlfs-config-netfs"/>.</para>
315
316 <indexterm zone="nfs-utils nfs-utils-client-config">
317 <primary sortas="f-netfs">netfs</primary>
318 </indexterm>
319
320 </sect4>
321
322 </sect3>
323
324 </sect2>
325
326 <sect2 role="content">
327 <title>Contents</title>
328 <segmentedlist>
329 <segtitle>Installed Programs</segtitle>
330 <segtitle>Installed Libraries</segtitle>
331 <segtitle>Installed Directories</segtitle>
332
333 <seglistitem>
334 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
335 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
336 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
337 and umount.nfs4 (link to mount.nfs)</seg>
338 <seg>None</seg>
339 <seg>/var/lib/nfs</seg>
340 </seglistitem>
341 </segmentedlist>
342
343 <variablelist>
344 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
345 <?dbfo list-presentation="list"?>
346 <?dbhtml list-presentation="table"?>
347
348 <varlistentry id="exportfs">
349 <term><command>exportfs</command></term>
350 <listitem>
351 <para>maintains a list of NFS exported file systems.</para>
352 <indexterm zone="nfs-utils exportfs">
353 <primary sortas="b-exportfs">exportfs</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="mountstats">
359 <term><command>mountstats</command></term>
360 <listitem>
361 <para>displays NFS client per-mount statistics.</para>
362 <indexterm zone="nfs-utils mountstats">
363 <primary sortas="b-mountstats">mountstats</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="mountnfs">
369 <term><command>mount.nfs</command></term>
370 <listitem>
371 <para>Used to mount a network share using NFS</para>
372 <indexterm zone="nfs-utils mountnfs">
373 <primary sortas="b-mountnfs">mount.nfs</primary>
374 </indexterm>
375 </listitem>
376 </varlistentry>
377
378 <varlistentry id="mountnfs4">
379 <term><command>mount.nfs4</command></term>
380 <listitem>
381 <para>Used to mount a network share using NFSv4</para>
382 <indexterm zone="nfs-utils mountnfs4">
383 <primary sortas="b-mountnfs4">mount.nfs4</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="nfsiostat-nfs-utils">
389 <term><command>nfsiostat</command></term>
390 <listitem>
391 <para>Report input/output statistics for network filesystems.</para>
392 <indexterm zone="nfs-utils nfsiostat-nfs-utils">
393 <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
394 </indexterm>
395 </listitem>
396 </varlistentry>
397
398 <varlistentry id="nfsstat">
399 <term><command>nfsstat</command></term>
400 <listitem>
401 <para>displays statistics kept about NFS client and server activity.</para>
402 <indexterm zone="nfs-utils nfsstat">
403 <primary sortas="b-nfsstat">nfsstat</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="rpcmountd">
409 <term><command>rpc.mountd</command></term>
410 <listitem>
411 <para>implements the NFS mount protocol on an NFS server.</para>
412 <indexterm zone="nfs-utils rpcmountd">
413 <primary sortas="b-rpcmountd">rpc.mountd</primary>
414 </indexterm>
415 </listitem>
416 </varlistentry>
417
418 <varlistentry id="rpcnfsd">
419 <term><command>rpc.nfsd</command></term>
420 <listitem>
421 <para>implements the user level part of the NFS
422 service on the server.</para>
423 <indexterm zone="nfs-utils rpcnfsd">
424 <primary sortas="b-rpcnfsd">rpc.nfsd</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="rpcstatd">
430 <term><command>rpc.statd</command></term>
431 <listitem>
432 <para>is used by the NFS file locking service. Run on both sides,
433 client as well as server, when you want file locking enabled.</para>
434 <indexterm zone="nfs-utils rpcstatd">
435 <primary sortas="b-rpcstatd">rpc.statd</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="rpcdebug">
441 <term><command>rpcdebug</command></term>
442 <listitem>
443 <para>sets or clears the kernel's NFS client and server debug
444 flags.</para>
445 <indexterm zone="nfs-utils rpcdebug">
446 <primary sortas="b-rpcdebug">rpcdebug</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="showmount">
452 <term><command>showmount</command></term>
453 <listitem>
454 <para>displays mount information for an NFS server.</para>
455 <indexterm zone="nfs-utils showmount">
456 <primary sortas="b-showmount">showmount</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="sm-notify">
462 <term><command>sm-notify</command></term>
463 <listitem>
464 <para>is used to send Network Status Monitor reboot messages.</para>
465 <indexterm zone="nfs-utils sm-notify">
466 <primary sortas="b-sm-notify">sm-notify</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="start-statd">
472 <term><command>start-statd</command></term>
473 <listitem>
474 <para>is a script called by nfsmount when mounting a filesystem with
475 locking enabled, if statd does not appear to be running. It can be
476 customised with whatever flags are appropriate for the site.</para>
477 <indexterm zone="nfs-utils start-statd">
478 <primary sortas="b-start-statd">start-statd</primary>
479 </indexterm>
480 </listitem>
481 </varlistentry>
482
483 <varlistentry id="umountnfs">
484 <term><command>umount.nfs</command></term>
485 <listitem>
486 <para>Used to unmount a network share using NFS</para>
487 <indexterm zone="nfs-utils umountnfs">
488 <primary sortas="b-umountnfs">umount.nfs</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 <varlistentry id="umountnfs4">
494 <term><command>umount.nfs4</command></term>
495 <listitem>
496 <para>Used to unmount a network share using NFSv4</para>
497 <indexterm zone="nfs-utils umountnfs4">
498 <primary sortas="b-umountnfs4">umount.nfs4</primary>
499 </indexterm>
500 </listitem>
501 </varlistentry>
502
503 </variablelist>
504
505 </sect2>
506
507</sect1>
Note: See TracBrowser for help on using the repository browser.