source: networking/netprogs/nfs-utils-systemd.xml@ 0da88ea3

7.6-blfs 7.6-systemd kde5-14269 kde5-14686 systemd-13485
Last change on this file since 0da88ea3 was 0da88ea3, checked in by Krejzi <krejzi@…>, 10 years ago

More systemd integration merged from Christopher's branch.

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

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