source: networking/netprogs/nfs-utils-systemd.xml@ 1e50cf5

systemd-11177
Last change on this file since 1e50cf5 was 1e50cf5, checked in by Krejzi <krejzi@…>, 10 years ago

Merge trunk.

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

  • Property mode set to 100644
File size: 18.2 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">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>Systemd Units</title>
210
211 <para>
212 To start the NFS server daemons at boot,
213 install the systemd units from the <xref linkend="bootscripts"/>
214 package by running the following command as the
215 <systemitem class="username">root</systemitem> user:
216 </para>
217
218<screen role="root"><userinput>make install-nfs-server</userinput></screen>
219
220 <indexterm zone="nfs-utils nfs-utils-server-init">
221 <primary sortas="f-nfs-server">nfs-server</primary>
222 </indexterm>
223
224 <para>You can edit the <filename>/etc/default/nfs-utils</filename>
225 file to change the startup options for NFS daemons. Defaults should
226 be fine for most use cases.</para>
227
228 <indexterm zone="nfs-utils nfs-utils-server-init">
229 <primary sortas="e-etc-default-nfs-utils">/etc/default/nfs-utils</primary>
230 </indexterm>
231
232 </sect4>
233
234 </sect3>
235
236 <sect3 id='nfs-utils-client-config'>
237 <title>Client Configuration</title>
238
239 <para><filename>/etc/fstab</filename> contains the directories that
240 are to be mounted on the client. Alternately the partitions can be
241 mounted by using the <command>mount</command> command with the proper
242 options. To mount the <filename class="directory">/home</filename>
243 and <filename class="directory">/usr</filename> partitions, add the
244 following to the <filename>/etc/fstab</filename>:</para>
245
246<screen role="root"><userinput><replaceable>&lt;server-name&gt;</replaceable>:/home /home nfs rw,_netdev 0 0
247<replaceable>&lt;server-name&gt;</replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
248
249 <para>The options which can be used are specified in <command>man 5 nfs</command>.
250 If both the client and server are running recent versions of linux, most of the
251 options will be negotiated. You can specify either <literal>rw</literal> or
252 <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
253 automatically mounted at boot, or <literal>noauto</literal> (and perhaps
254 <literal>user</literal>) for other filesystems.</para>
255
256 <para>If the fileserver is not running a recent version of linux, you may need to
257 specifiy other options.</para>
258
259 <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
260 and add the option <literal>comment=systemd.automount</literal>. Some machines
261 need this, because systemd tries to mount the external fs&apos;s before the network
262 is up, others do not need it. An alternative is for <systemitem
263 class="username">root</systemitem> to run <command>mount -a</command>.</para>
264
265 <indexterm zone="nfs-utils nfs-utils-client-config">
266 <primary sortas="e-etc-fstab">/etc/fstab</primary>
267 </indexterm>
268
269<!-- /etc/netconfig is installed by libtirpc
270 <para>In some circumstances an <filename>/etc/netconfig</filename> file
271 is required by an nfs client. It does no harm to create one even if it
272 is not in fact needed. As the <systemitem class="username">root</systemitem>
273 user:</para>
274
275<screen role="root"><userinput>cat &gt; /etc/netconfig &lt;&lt; "EOF"
276udp6 tpi_clts v inet6 udp - -
277tcp6 tpi_cots_ord v inet6 tcp - -
278udp tpi_clts v inet udp - -
279tcp tpi_cots_ord v inet tcp - -
280rawip tpi_raw - inet - - -
281local tpi_cots_ord - loopback - - -
282EOF</userinput></screen>
283
284 <indexterm zone="nfs-utils nfs-utils-client-config">
285 <primary sortas="e-etc-netconfig">/etc/netconfig</primary>
286 </indexterm>
287-->
288
289 <sect4 id="nfs-utils-client-init">
290 <title>Systemd Units</title>
291
292 <note><para>The following systemd unis are not required if the
293 nfs-server units were previously installed.</para></note>
294
295 <para>
296 To start the NFS client services at boot,
297 install the systemd units from the <xref linkend="bootscripts"/>
298 package by running the following command as the
299 <systemitem class="username">root</systemitem> user:
300 </para>
301
302<screen role="root"><userinput>make install-nfs-client</userinput></screen>
303
304 <indexterm zone="nfs-utils nfs-utils-client-config">
305 <primary sortas="f-nfs-client">nfs-client</primary>
306 </indexterm>
307
308 </sect4>
309
310 </sect3>
311
312 </sect2>
313
314 <sect2 role="content">
315 <title>Contents</title>
316 <segmentedlist>
317 <segtitle>Installed Programs</segtitle>
318 <segtitle>Installed Libraries</segtitle>
319 <segtitle>Installed Directories</segtitle>
320
321 <seglistitem>
322 <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
323 nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
324 showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
325 and umount.nfs4 (link to mount.nfs)</seg>
326 <seg>None</seg>
327 <seg>/var/lib/nfs</seg>
328 </seglistitem>
329 </segmentedlist>
330
331 <variablelist>
332 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
333 <?dbfo list-presentation="list"?>
334 <?dbhtml list-presentation="table"?>
335
336 <varlistentry id="exportfs">
337 <term><command>exportfs</command></term>
338 <listitem>
339 <para>maintains a list of NFS exported file systems.</para>
340 <indexterm zone="nfs-utils exportfs">
341 <primary sortas="b-exportfs">exportfs</primary>
342 </indexterm>
343 </listitem>
344 </varlistentry>
345
346 <varlistentry id="mountstats">
347 <term><command>mountstats</command></term>
348 <listitem>
349 <para>displays NFS client per-mount statistics.</para>
350 <indexterm zone="nfs-utils mountstats">
351 <primary sortas="b-mountstats">mountstats</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="mountnfs">
357 <term><command>mount.nfs</command></term>
358 <listitem>
359 <para>Used to mount a network share using NFS</para>
360 <indexterm zone="nfs-utils mountnfs">
361 <primary sortas="b-mountnfs">mount.nfs</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
366 <varlistentry id="mountnfs4">
367 <term><command>mount.nfs4</command></term>
368 <listitem>
369 <para>Used to mount a network share using NFSv4</para>
370 <indexterm zone="nfs-utils mountnfs4">
371 <primary sortas="b-mountnfs4">mount.nfs4</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
376 <varlistentry id="nfsiostat-nfs-utils">
377 <term><command>nfsiostat</command></term>
378 <listitem>
379 <para>Report input/output statistics for network filesystems.</para>
380 <indexterm zone="nfs-utils nfsiostat-nfs-utils">
381 <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
382 </indexterm>
383 </listitem>
384 </varlistentry>
385
386 <varlistentry id="nfsstat">
387 <term><command>nfsstat</command></term>
388 <listitem>
389 <para>displays statistics kept about NFS client and server activity.</para>
390 <indexterm zone="nfs-utils nfsstat">
391 <primary sortas="b-nfsstat">nfsstat</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="rpcmountd">
397 <term><command>rpc.mountd</command></term>
398 <listitem>
399 <para>implements the NFS mount protocol on an NFS server.</para>
400 <indexterm zone="nfs-utils rpcmountd">
401 <primary sortas="b-rpcmountd">rpc.mountd</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry id="rpcnfsd">
407 <term><command>rpc.nfsd</command></term>
408 <listitem>
409 <para>implements the user level part of the NFS
410 service on the server.</para>
411 <indexterm zone="nfs-utils rpcnfsd">
412 <primary sortas="b-rpcnfsd">rpc.nfsd</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 <varlistentry id="rpcstatd">
418 <term><command>rpc.statd</command></term>
419 <listitem>
420 <para>is used by the NFS file locking service. Run on both sides,
421 client as well as server, when you want file locking enabled.</para>
422 <indexterm zone="nfs-utils rpcstatd">
423 <primary sortas="b-rpcstatd">rpc.statd</primary>
424 </indexterm>
425 </listitem>
426 </varlistentry>
427
428 <varlistentry id="rpcdebug">
429 <term><command>rpcdebug</command></term>
430 <listitem>
431 <para>sets or clears the kernel's NFS client and server debug
432 flags.</para>
433 <indexterm zone="nfs-utils rpcdebug">
434 <primary sortas="b-rpcdebug">rpcdebug</primary>
435 </indexterm>
436 </listitem>
437 </varlistentry>
438
439 <varlistentry id="showmount">
440 <term><command>showmount</command></term>
441 <listitem>
442 <para>displays mount information for an NFS server.</para>
443 <indexterm zone="nfs-utils showmount">
444 <primary sortas="b-showmount">showmount</primary>
445 </indexterm>
446 </listitem>
447 </varlistentry>
448
449 <varlistentry id="sm-notify">
450 <term><command>sm-notify</command></term>
451 <listitem>
452 <para>is used to send Network Status Monitor reboot messages.</para>
453 <indexterm zone="nfs-utils sm-notify">
454 <primary sortas="b-sm-notify">sm-notify</primary>
455 </indexterm>
456 </listitem>
457 </varlistentry>
458
459 <varlistentry id="start-statd">
460 <term><command>start-statd</command></term>
461 <listitem>
462 <para>is a script called by nfsmount when mounting a filesystem with
463 locking enabled, if statd does not appear to be running. It can be
464 customised with whatever flags are appropriate for the site.</para>
465 <indexterm zone="nfs-utils start-statd">
466 <primary sortas="b-start-statd">start-statd</primary>
467 </indexterm>
468 </listitem>
469 </varlistentry>
470
471 <varlistentry id="umountnfs">
472 <term><command>umount.nfs</command></term>
473 <listitem>
474 <para>Used to unmount a network share using NFS</para>
475 <indexterm zone="nfs-utils umountnfs">
476 <primary sortas="b-umountnfs">umount.nfs</primary>
477 </indexterm>
478 </listitem>
479 </varlistentry>
480
481 <varlistentry id="umountnfs4">
482 <term><command>umount.nfs4</command></term>
483 <listitem>
484 <para>Used to unmount a network share using NFSv4</para>
485 <indexterm zone="nfs-utils umountnfs4">
486 <primary sortas="b-umountnfs4">umount.nfs4</primary>
487 </indexterm>
488 </listitem>
489 </varlistentry>
490
491 </variablelist>
492
493 </sect2>
494
495</sect1>
Note: See TracBrowser for help on using the repository browser.