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

systemd-13485
Last change on this file since d8aa38f0 was b91aa96, checked in by DJ Lucas <dj@…>, 8 years ago

Merge changes from Chapter 15.

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

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