[d47e7ea9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[d47e7ea9] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[1f4c3f9f] | 7 | <!ENTITY nfs-utils-download-http "&sourceforge-dl;/nfs/nfs-utils-&nfs-utils-version;.tar.xz">
|
---|
[8070b391] | 8 | <!ENTITY nfs-utils-download-ftp " ">
|
---|
[1f4c3f9f] | 9 | <!ENTITY nfs-utils-md5sum "fda23f37a703d15e5697dd9a8084b9c9">
|
---|
| 10 | <!ENTITY nfs-utils-size "623 KB">
|
---|
| 11 | <!ENTITY nfs-utils-buildsize "18 MB">
|
---|
[42e4ab5a] | 12 | <!ENTITY nfs-utils-time "0.2 SBU">
|
---|
[d47e7ea9] | 13 | ]>
|
---|
| 14 |
|
---|
[f8af105] | 15 | <sect1 id="nfs-utils" xreflabel="nfs-utils-&nfs-utils-version;">
|
---|
[b86cfc2] | 16 | <?dbhtml filename="nfs-utils.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[f8af105] | 23 | <title>NFS-Utils-&nfs-utils-version;</title>
|
---|
[b86cfc2] | 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
|
---|
[e20c8110] | 33 | userspace server and client tools necessary to use the kernel's NFS
|
---|
[b86cfc2] | 34 | abilities. NFS is a protocol that allows sharing file systems over the
|
---|
| 35 | network.</para>
|
---|
| 36 |
|
---|
[4bf60a36] | 37 | &lfs81_checked;
|
---|
[d40e1a4] | 38 |
|
---|
[08fa4835] | 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
[b86cfc2] | 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>
|
---|
[ed6a289c] | 64 | <para role="required">
|
---|
[b163480] | 65 | <xref linkend="libtirpc"/>
|
---|
[ed6a289c] | 66 | </para>
|
---|
[06eb274] | 67 |
|
---|
[b163480] | 68 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[ed6a289c] | 69 | <para role="optional">
|
---|
[a15d5e1] | 70 | <xref linkend="lvm2"/> (libdevmapper for NFSv4 support),
|
---|
[7b478500] | 71 | <phrase revision="systemd"><xref linkend="libnfsidmap"/></phrase>
|
---|
[a15d5e1] | 72 | <phrase revision="sysv"><ulink
|
---|
| 73 | url="http://www.citi.umich.edu/projects/nfsv4/linux/">libnfsidmap</ulink></phrase>
|
---|
[7b478500] | 74 | (for NFSv4 support),
|
---|
[a15d5e1] | 75 | <xref linkend="libnsl"/> (for NIS client support),
|
---|
| 76 | <xref linkend="sqlite"/>,
|
---|
[ed6a289c] | 77 | <xref linkend="mitkrb"/> or
|
---|
| 78 | <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">libgssapi</ulink>, and
|
---|
[6336840d] | 79 | <ulink url="http://www.citi.umich.edu/projects/nfsv4/linux/">librpcsecgss</ulink> (for GSS and RPC security support) and
|
---|
[cb1e2842] | 80 |
|
---|
[56605b9] | 81 | <xref linkend="libcap-pam"/>
|
---|
[ed6a289c] | 82 | </para>
|
---|
[0f10bc0] | 83 |
|
---|
[b163480] | 84 | <bridgehead renderas="sect4">Required (runtime)</bridgehead>
|
---|
| 85 | <para role="required">
|
---|
[45029cb] | 86 | <xref role="runtime" linkend="rpcbind"/>
|
---|
[ed6a289c] | 87 | </para>
|
---|
[b86cfc2] | 88 |
|
---|
[a15d5e1] | 89 | <!-- NSS configuration isn't directly related to NFS, but left here in case
|
---|
| 90 | <bridgehead renderas="sect4">Optional (runtime for NIS clients)</bridgehead>
|
---|
| 91 | <para role="optional">
|
---|
| 92 | <ulink url="https://github.com/thkukuk/libnss_compat">libnss_compat</ulink>,
|
---|
| 93 | <ulink url="https://github.com/thkukuk/libnss_nis">libnss_nis</ulink>, and
|
---|
| 94 | <ulink url="https://github.com/thkukuk/libnss_nisplus">libnss_nisplus</ulink>
|
---|
| 95 | </para>
|
---|
| 96 | -->
|
---|
| 97 |
|
---|
[3cb0c57] | 98 | <para condition="html" role="usernotes">User Notes:
|
---|
| 99 | <ulink url="&blfs-wiki;/nfs-utils"/></para>
|
---|
| 100 |
|
---|
[b86cfc2] | 101 | </sect2>
|
---|
| 102 |
|
---|
| 103 | <sect2 role="kernel" id='nfs-utils-kernel'>
|
---|
| 104 | <title>Kernel Configuration</title>
|
---|
| 105 |
|
---|
| 106 | <para>Enable the following options in the kernel configuration
|
---|
[d2df2ce] | 107 | (choose client and/or server support as appropriate) and recompile the
|
---|
| 108 | kernel if necessary:</para>
|
---|
[d47e7ea9] | 109 |
|
---|
[b163480] | 110 | <screen><literal>File systems --->
|
---|
[196d393] | 111 | [*] Network File Systems ---> [CONFIG_NETWORK_FILESYSTEMS]
|
---|
| 112 | <*/M> NFS client support [CONFIG_NFS_FS]
|
---|
| 113 | <*/M> NFS server support [CONFIG_NFSD]</literal></screen>
|
---|
[d47e7ea9] | 114 |
|
---|
[b86cfc2] | 115 | <para>Select the appropriate sub-options that appear when the above options
|
---|
| 116 | are selected.</para>
|
---|
| 117 |
|
---|
[d2df2ce] | 118 | <note>
|
---|
| 119 | <para>
|
---|
| 120 | In BLFS we assume that nfs v3 will be used. If the
|
---|
| 121 | <emphasis>server</emphasis> offers nfs v4 (for linux, CONFIG_NFSD_V4)
|
---|
| 122 | then auto-negotiation for v3 will fail and you will need to add
|
---|
| 123 | <literal>nfsver=3</literal> to the mount options. This also applies
|
---|
| 124 | if that option is enabled in the <emphasis>client's</emphasis> kernel,
|
---|
| 125 | for example in a distro trying to mount from a BLFS v3 server.
|
---|
| 126 | </para>
|
---|
[1f4c3f9f] | 127 | <para>
|
---|
| 128 | Even if neither end of the connection supports nfs v4, adding
|
---|
| 129 | <literal>nfsver=3</literal> is still beneficial because it prevents an
|
---|
| 130 | error message "NFS: bad mount option value specified: minorversion=1"
|
---|
| 131 | being logged on every mount.
|
---|
| 132 | </para>
|
---|
[d2df2ce] | 133 | </note>
|
---|
| 134 |
|
---|
[b86cfc2] | 135 | <indexterm zone="nfs-utils nfs-utils-kernel">
|
---|
| 136 | <primary sortas="d-nfs-utils">NFS Utilities</primary>
|
---|
| 137 | </indexterm>
|
---|
[d47e7ea9] | 138 |
|
---|
[b86cfc2] | 139 | </sect2>
|
---|
[d47e7ea9] | 140 |
|
---|
[e20c8110] | 141 | <sect2 role="installation" id='nfs-utils-install'
|
---|
| 142 | xreflabel='NFS Utilities Installation'>
|
---|
[b86cfc2] | 143 | <title>Installation of NFS Utilities</title>
|
---|
[d47e7ea9] | 144 |
|
---|
[b0b87ad6] | 145 | <para>Before you compile the program, ensure that the <systemitem
|
---|
| 146 | class="username">nobody</systemitem> user and <systemitem
|
---|
| 147 | class="groupname">nogroup</systemitem> group have been created as done in
|
---|
| 148 | the current LFS book. You can add them by running the following commands
|
---|
| 149 | as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[a16cb066] | 150 |
|
---|
[eaf6a1cd] | 151 | <screen role="root"><userinput>groupadd -g 99 nogroup &&
|
---|
[0dfb754] | 152 | useradd -c "Unprivileged Nobody" -d /dev/null -g nogroup \
|
---|
| 153 | -s /bin/false -u 99 nobody</userinput></screen>
|
---|
[d47e7ea9] | 154 |
|
---|
[b86cfc2] | 155 | <note>
|
---|
| 156 | <para>The classic uid and gid values are 65534 which is also -2 when
|
---|
[17b7723] | 157 | interpreted as a signed 16-bit number. These values impact other files
|
---|
| 158 | on some filesystems that do not have support for sparse files. The
|
---|
[b86cfc2] | 159 | <systemitem class="username">nobody</systemitem> and <systemitem
|
---|
[17b7723] | 160 | class="groupname">nogroup</systemitem> values are relatively arbitrary.
|
---|
[e20c8110] | 161 | The impact on a server is nil if the <filename>exports</filename> file
|
---|
| 162 | is configured correctly. If it is misconfigured, an
|
---|
| 163 | <command>ls -l</command> or <command>ps</command> listing will show a
|
---|
| 164 | uid or gid number of 65534 instead of a name. The client uses <systemitem
|
---|
[b86cfc2] | 165 | class="username">nobody</systemitem> only as the user running
|
---|
| 166 | <command>rpc.statd</command>.</para>
|
---|
| 167 | </note>
|
---|
| 168 |
|
---|
| 169 | <para>Install <application>NFS Utilities</application> by running
|
---|
| 170 | the following commands:</para>
|
---|
[d47e7ea9] | 171 |
|
---|
[7abed3b] | 172 | <!--
|
---|
| 173 | <screen><userinput>sed -i '/fcntl.h/a#include <stdint.h>' support/nsm/rpc.c &&-->
|
---|
| 174 | <screen><userinput>./configure --prefix=/usr \
|
---|
[37441de] | 175 | --sysconfdir=/etc \
|
---|
[ad6f90ab] | 176 | --sbindir=/sbin \
|
---|
[37441de] | 177 | --without-tcp-wrappers \
|
---|
| 178 | --disable-nfsv4 \
|
---|
| 179 | --disable-gss &&
|
---|
[a16cb066] | 180 | make</userinput></screen>
|
---|
| 181 |
|
---|
[1f4c3f9f] | 182 | <!-- Test breakage: see
|
---|
| 183 | http://lists.linuxfromscratch.org/pipermail/blfs-book/2017-December/071861.html -->
|
---|
| 184 | <para>This package does not come with a working test suite."</para>
|
---|
| 185 |
|
---|
[e20c8110] | 186 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
[d47e7ea9] | 187 |
|
---|
[b163480] | 188 | <!-- dev note: make statduser=$(whoami) DESTDIR=<DESTDIR> install -->
|
---|
| 189 |
|
---|
[1f4c3f9f] | 190 | <screen role='root'><userinput>make install &&
|
---|
| 191 | mv -v /sbin/start-statd /usr/sbin &&
|
---|
| 192 | chmod u+w,go+r /sbin/mount.nfs &&
|
---|
[a1b111f8] | 193 | chown nobody.nogroup /var/lib/nfs</userinput></screen>
|
---|
[e20c8110] | 194 |
|
---|
[1f4c3f9f] | 195 | <!-- commented, in case the tests get fixed
|
---|
[ce386957] | 196 | <para>The tests for this package require that the package be installed and
|
---|
| 197 | configured as specified below. In addition, the the daemon from <xref
|
---|
| 198 | linkend="rpcbind"/> needs to be running and the tests need to be run as the
|
---|
| 199 | <systemitem class="username">root</systemitem> user.</para>
|
---|
[f3429309] | 200 |
|
---|
[1f4c3f9f] | 201 | <para>To test the results, issue, as root: <command>make check</command>.</para>-->
|
---|
[ce386957] | 202 |
|
---|
[b86cfc2] | 203 | </sect2>
|
---|
[d47e7ea9] | 204 |
|
---|
[b86cfc2] | 205 | <sect2 role="commands">
|
---|
| 206 | <title>Command Explanations</title>
|
---|
[7abed3b] | 207 | <!--
|
---|
[4bf60a36] | 208 | <para><command>sed ... support/nsm/rpc.c</command>: This sed it required
|
---|
| 209 | to fix a build issue with glibc-2.26 and later.</para>
|
---|
[7abed3b] | 210 | -->
|
---|
[b163480] | 211 | <para><parameter>--without-tcp-wrappers</parameter>: This option is
|
---|
| 212 | needed because TCP Wrappers is not in BLFS.</para>
|
---|
| 213 |
|
---|
[d2df2ce] | 214 | <para><parameter>--disable-nfsv4</parameter>: This allows the package to be
|
---|
| 215 | built when libnfsidmap has not been installed.</para>
|
---|
[a16cb066] | 216 |
|
---|
[b86cfc2] | 217 | <para><parameter>--disable-gss</parameter>: Disables support for
|
---|
| 218 | RPCSEC GSS (RPC Security).</para>
|
---|
[a16cb066] | 219 |
|
---|
[a1b111f8] | 220 | <para><command>chown nobody.nogroup /var/lib/nfs</command>: The
|
---|
| 221 | rpc.statd program uses the ownership of this directory to set
|
---|
| 222 | it's UID and GID. This command sets those to unprivileged entries.
|
---|
| 223 | </para>
|
---|
| 224 |
|
---|
[b86cfc2] | 225 | </sect2>
|
---|
[a16cb066] | 226 |
|
---|
[b86cfc2] | 227 | <sect2 role="configuration">
|
---|
| 228 | <title>Configuring NFS Utilities</title>
|
---|
[d47e7ea9] | 229 |
|
---|
[b86cfc2] | 230 | <sect3 id='nfs-utils-server-config'>
|
---|
[3a929dc] | 231 | <title>Server Configuration</title>
|
---|
[d47e7ea9] | 232 |
|
---|
[b86cfc2] | 233 | <para><filename>/etc/exports</filename> contains the exported directories
|
---|
[e20c8110] | 234 | on NFS servers. Refer to the <filename>exports.5</filename> manual page
|
---|
| 235 | for the syntax of this file. Also refer to the "NFS HowTo" available at
|
---|
| 236 | <ulink url="http://nfs.sourceforge.net/nfs-howto/"/> for information on
|
---|
| 237 | how to configure the servers and clients in a secure manner. For example,
|
---|
| 238 | for sharing the <filename class="directory">/home</filename> directory
|
---|
| 239 | over the local network, the following line may be added:</para>
|
---|
[d47e7ea9] | 240 |
|
---|
[01155b9] | 241 | <screen role="root"><userinput>/home <replaceable>192.168.0.0/24</replaceable>(rw,subtree_check,anonuid=99,anongid=99)</userinput></screen>
|
---|
| 242 |
|
---|
| 243 | <note><para>Be sure to replace the directory, network address. and prefix above
|
---|
| 244 | to match your network. The only space in the line above should be between
|
---|
| 245 | the directory and the network address.</para></note>
|
---|
[d47e7ea9] | 246 |
|
---|
[b86cfc2] | 247 | <indexterm zone="nfs-utils nfs-utils-server-config">
|
---|
| 248 | <primary sortas="e-etc-exportfs">/etc/exportfs</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 |
|
---|
[e20c8110] | 251 | <sect4 id="nfs-utils-server-init">
|
---|
[7b478500] | 252 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 253 | <phrase revision="systemd">Systemd Units</phrase></title>
|
---|
| 254 |
|
---|
| 255 | <para>Install the
|
---|
| 256 | <phrase revision="sysv"><filename>/etc/rc.d/init.d/nfs-server</filename>
|
---|
| 257 | init script</phrase>
|
---|
| 258 | <phrase revision="systemd">NFSv4 server units</phrase>
|
---|
| 259 | included in the <xref linkend="bootscripts" revision="sysv"/>
|
---|
[3c7bd00] | 260 | <xref linkend="systemd-units" revision="systemd"/> package
|
---|
[ed6a289c] | 261 | to start the server at boot.</para>
|
---|
[d47e7ea9] | 262 |
|
---|
[7b478500] | 263 | <screen role="root" revision="systemd"><userinput>make install-nfsv4-server</userinput></screen>
|
---|
| 264 |
|
---|
| 265 | <para revision="systemd">
|
---|
| 266 | If you have disabled NFSv4 support, run the following command as the
|
---|
| 267 | <systemitem class="username">root</systemitem> user to omit the NFSv4
|
---|
| 268 | specific systemd units:
|
---|
| 269 | </para>
|
---|
| 270 |
|
---|
| 271 | <!-- both -->
|
---|
[eaf6a1cd] | 272 | <screen role="root"><userinput>make install-nfs-server</userinput></screen>
|
---|
[d47e7ea9] | 273 |
|
---|
[7b478500] | 274 | <indexterm zone="nfs-utils nfs-utils-server-init" revision="sysv">
|
---|
[b86cfc2] | 275 | <primary sortas="f-nfs-server">nfs-server</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 |
|
---|
[7b478500] | 278 | <para revision="sysv">Now create the
|
---|
| 279 | <filename>/etc/sysconfig/nfs-server</filename> configuration file:
|
---|
| 280 | </para>
|
---|
[f5e4bdec] | 281 |
|
---|
[7b478500] | 282 | <screen role="root" revision="sysv"><userinput>cat > /etc/sysconfig/nfs-server << "EOF"
|
---|
[eaf6a1cd] | 283 | <literal>PORT="2049"
|
---|
[f5e4bdec] | 284 | PROCESSES="8"
|
---|
[eaf6a1cd] | 285 | KILLDELAY="10"</literal>
|
---|
| 286 | EOF</userinput></screen>
|
---|
[f5e4bdec] | 287 |
|
---|
[7b478500] | 288 | <note revision="sysv">
|
---|
| 289 | <para>The above parameters may be optionally placed in
|
---|
| 290 | <filename>/etc/sysconfig/rc.site</filename>.
|
---|
| 291 | </para>
|
---|
| 292 | </note>
|
---|
[ed6a289c] | 293 |
|
---|
[7b478500] | 294 | <indexterm zone="nfs-utils nfs-utils-server-init" revision="sysv">
|
---|
[b86cfc2] | 295 | <primary
|
---|
| 296 | sortas="e-etc-sysconfig-nfs-server">/etc/sysconfig/nfs-server</primary>
|
---|
| 297 | </indexterm>
|
---|
| 298 |
|
---|
[7b478500] | 299 | <para revision="systemd">
|
---|
| 300 | You can edit the <filename>/etc/default/nfs-utils</filename>
|
---|
| 301 | file to change the startup options for NFS daemons. Defaults
|
---|
| 302 | should be fine for most use cases.
|
---|
| 303 | </para>
|
---|
| 304 |
|
---|
| 305 | <indexterm zone="nfs-utils nfs-utils-server-init" revision="systemd">
|
---|
| 306 | <primary sortas="e-etc-default-nfs-utils">/etc/default/nfs-utils</primary>
|
---|
| 307 | </indexterm>
|
---|
| 308 |
|
---|
| 309 |
|
---|
| 310 |
|
---|
[b86cfc2] | 311 | </sect4>
|
---|
[d47e7ea9] | 312 |
|
---|
[b86cfc2] | 313 | </sect3>
|
---|
[d47e7ea9] | 314 |
|
---|
[b86cfc2] | 315 | <sect3 id='nfs-utils-client-config'>
|
---|
[3a929dc] | 316 | <title>Client Configuration</title>
|
---|
[eaf6a1cd] | 317 |
|
---|
[b86cfc2] | 318 | <para><filename>/etc/fstab</filename> contains the directories that
|
---|
| 319 | are to be mounted on the client. Alternately the partitions can be
|
---|
| 320 | mounted by using the <command>mount</command> command with the proper
|
---|
| 321 | options. To mount the <filename class="directory">/home</filename>
|
---|
| 322 | and <filename class="directory">/usr</filename> partitions, add the
|
---|
| 323 | following to the <filename>/etc/fstab</filename>:</para>
|
---|
[a16cb066] | 324 |
|
---|
[0d1cbe66] | 325 | <screen role="root"><userinput><replaceable><server-name></replaceable>:/home /home nfs rw,_netdev 0 0
|
---|
| 326 | <replaceable><server-name></replaceable>:/usr /usr nfs ro,_netdev 0 0</userinput></screen>
|
---|
| 327 |
|
---|
| 328 | <para>The options which can be used are specified in <command>man 5 nfs</command>.
|
---|
| 329 | If both the client and server are running recent versions of linux, most of the
|
---|
[1f4c3f9f] | 330 | options will be negotiated (but see the Note above on nfsver=3). You can specify
|
---|
| 331 | either <literal>rw</literal> or
|
---|
[0d1cbe66] | 332 | <literal>ro</literal>, <literal>_netdev</literal> if the filesystem is to be
|
---|
| 333 | automatically mounted at boot, or <literal>noauto</literal> (and perhaps
|
---|
| 334 | <literal>user</literal>) for other filesystems.</para>
|
---|
| 335 |
|
---|
| 336 | <para>If the fileserver is not running a recent version of linux, you may need to
|
---|
| 337 | specifiy other options.</para>
|
---|
| 338 |
|
---|
| 339 | <para>If you are using systemd, you may need to enable autofs v4 in your kernel,
|
---|
| 340 | and add the option <literal>comment=systemd.automount</literal>. Some machines
|
---|
| 341 | need this, because systemd tries to mount the external fs's before the network
|
---|
| 342 | is up, others do not need it. An alternative is for <systemitem
|
---|
| 343 | class="username">root</systemitem> to run <command>mount -a</command>.</para>
|
---|
[a16cb066] | 344 |
|
---|
[b86cfc2] | 345 | <indexterm zone="nfs-utils nfs-utils-client-config">
|
---|
| 346 | <primary sortas="e-etc-fstab">/etc/fstab</primary>
|
---|
| 347 | </indexterm>
|
---|
[d47e7ea9] | 348 |
|
---|
[b86cfc2] | 349 | <sect4 id="nfs-utils-client-init">
|
---|
[7b478500] | 350 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
| 351 | <phrase revision="systemd">Systemd Units</phrase></title>
|
---|
| 352 |
|
---|
| 353 | <note>
|
---|
| 354 | <para>
|
---|
| 355 | The following <phrase revision="sysv">boot script is</phrase>
|
---|
| 356 | <phrase revision="systemd">systemd units are</phrase> not required
|
---|
| 357 | if the nfs-server <phrase revision="sysv">script is</phrase>
|
---|
| 358 | <phrase revision="systemd">units are</phrase> installed.
|
---|
| 359 | </para>
|
---|
| 360 | </note>
|
---|
| 361 |
|
---|
| 362 | <para>Install the
|
---|
| 363 | <phrase revision="sysv">
|
---|
| 364 | <filename>/etc/rc.d/init.d/nfs-client</filename> init script</phrase>
|
---|
| 365 | <phrase revision="systemd">units</phrase> included in the
|
---|
| 366 | <xref linkend="bootscripts" revision="sysv"/>
|
---|
[3c7bd00] | 367 | <xref linkend="systemd-units" revision="systemd"/> package to start
|
---|
[ed6a289c] | 368 | the client services at boot.</para>
|
---|
[a16cb066] | 369 |
|
---|
[b86cfc2] | 370 | <screen role="root"><userinput>make install-nfs-client</userinput></screen>
|
---|
[a16cb066] | 371 |
|
---|
[b86cfc2] | 372 | <indexterm zone="nfs-utils nfs-utils-client-config">
|
---|
| 373 | <primary sortas="f-nfs-client">nfs-client</primary>
|
---|
| 374 | </indexterm>
|
---|
| 375 |
|
---|
[e468571] | 376 | <para revision="sysv">To automatically mount <systemitem
|
---|
[ed6a289c] | 377 | class="filesystem">nfs</systemitem> filesystems, clients will also need
|
---|
| 378 | to install the <filename>netfs</filename> bootscript as described in
|
---|
| 379 | <xref linkend="postlfs-config-netfs"/>.</para>
|
---|
[b86cfc2] | 380 |
|
---|
[7b478500] | 381 | <indexterm zone="nfs-utils nfs-utils-client-config" revision="sysv">
|
---|
[b86cfc2] | 382 | <primary sortas="f-netfs">netfs</primary>
|
---|
| 383 | </indexterm>
|
---|
| 384 |
|
---|
| 385 | </sect4>
|
---|
| 386 |
|
---|
| 387 | </sect3>
|
---|
| 388 |
|
---|
| 389 | </sect2>
|
---|
| 390 |
|
---|
| 391 | <sect2 role="content">
|
---|
| 392 | <title>Contents</title>
|
---|
| 393 | <segmentedlist>
|
---|
| 394 | <segtitle>Installed Programs</segtitle>
|
---|
| 395 | <segtitle>Installed Libraries</segtitle>
|
---|
| 396 | <segtitle>Installed Directories</segtitle>
|
---|
| 397 |
|
---|
| 398 | <seglistitem>
|
---|
[06eb274] | 399 | <seg>exportfs, mountstats, mount.nfs, mount.nfs4 (link to mount.nfs),
|
---|
[b163480] | 400 | nfsiostat, nfsstat, osd_login, rpc.mountd, rpc.nfsd, rpc.statd, rpcdebug,
|
---|
[d40e1a4] | 401 | showmount, sm-notify, start-statd, umount.nfs (link to mount.nfs),
|
---|
| 402 | and umount.nfs4 (link to mount.nfs)</seg>
|
---|
[b86cfc2] | 403 | <seg>None</seg>
|
---|
| 404 | <seg>/var/lib/nfs</seg>
|
---|
| 405 | </seglistitem>
|
---|
| 406 | </segmentedlist>
|
---|
| 407 |
|
---|
| 408 | <variablelist>
|
---|
| 409 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 410 | <?dbfo list-presentation="list"?>
|
---|
| 411 | <?dbhtml list-presentation="table"?>
|
---|
| 412 |
|
---|
| 413 | <varlistentry id="exportfs">
|
---|
| 414 | <term><command>exportfs</command></term>
|
---|
| 415 | <listitem>
|
---|
| 416 | <para>maintains a list of NFS exported file systems.</para>
|
---|
| 417 | <indexterm zone="nfs-utils exportfs">
|
---|
| 418 | <primary sortas="b-exportfs">exportfs</primary>
|
---|
| 419 | </indexterm>
|
---|
| 420 | </listitem>
|
---|
| 421 | </varlistentry>
|
---|
| 422 |
|
---|
[d40e1a4] | 423 | <varlistentry id="mountstats">
|
---|
| 424 | <term><command>mountstats</command></term>
|
---|
| 425 | <listitem>
|
---|
| 426 | <para>displays NFS client per-mount statistics.</para>
|
---|
| 427 | <indexterm zone="nfs-utils mountstats">
|
---|
| 428 | <primary sortas="b-mountstats">mountstats</primary>
|
---|
| 429 | </indexterm>
|
---|
| 430 | </listitem>
|
---|
| 431 | </varlistentry>
|
---|
| 432 |
|
---|
[6d772cc] | 433 | <varlistentry id="mount.nfs">
|
---|
[0f10bc0] | 434 | <term><command>mount.nfs</command></term>
|
---|
| 435 | <listitem>
|
---|
[2f12da13] | 436 | <para>is used to mount a network share using NFS</para>
|
---|
[6d772cc] | 437 | <indexterm zone="nfs-utils mount.nfs">
|
---|
| 438 | <primary sortas="b-mount.nfs">mount.nfs</primary>
|
---|
[0f10bc0] | 439 | </indexterm>
|
---|
| 440 | </listitem>
|
---|
| 441 | </varlistentry>
|
---|
| 442 |
|
---|
[6d772cc] | 443 | <varlistentry id="mount.nfs4">
|
---|
[0f10bc0] | 444 | <term><command>mount.nfs4</command></term>
|
---|
| 445 | <listitem>
|
---|
[2f12da13] | 446 | <para>is used to mount a network share using NFSv4</para>
|
---|
[6d772cc] | 447 | <indexterm zone="nfs-utils mount.nfs4">
|
---|
| 448 | <primary sortas="b-mount.nfs4">mount.nfs4</primary>
|
---|
[0f10bc0] | 449 | </indexterm>
|
---|
| 450 | </listitem>
|
---|
| 451 | </varlistentry>
|
---|
| 452 |
|
---|
[d40e1a4] | 453 | <varlistentry id="nfsiostat-nfs-utils">
|
---|
| 454 | <term><command>nfsiostat</command></term>
|
---|
| 455 | <listitem>
|
---|
[2f12da13] | 456 | <para>reports input/output statistics for network filesystems.</para>
|
---|
[d40e1a4] | 457 | <indexterm zone="nfs-utils nfsiostat-nfs-utils">
|
---|
| 458 | <primary sortas="b-nfsiostat-nfs-utils">nfsiostat</primary>
|
---|
| 459 | </indexterm>
|
---|
| 460 | </listitem>
|
---|
| 461 | </varlistentry>
|
---|
| 462 |
|
---|
[b86cfc2] | 463 | <varlistentry id="nfsstat">
|
---|
| 464 | <term><command>nfsstat</command></term>
|
---|
| 465 | <listitem>
|
---|
[d40e1a4] | 466 | <para>displays statistics kept about NFS client and server activity.</para>
|
---|
[b86cfc2] | 467 | <indexterm zone="nfs-utils nfsstat">
|
---|
| 468 | <primary sortas="b-nfsstat">nfsstat</primary>
|
---|
| 469 | </indexterm>
|
---|
| 470 | </listitem>
|
---|
| 471 | </varlistentry>
|
---|
| 472 |
|
---|
[72d90b67] | 473 | <varlistentry id="osd_login">
|
---|
[8b9ad6e] | 474 | <term><command>osd_login</command></term>
|
---|
[72d90b67] | 475 | <listitem>
|
---|
[5ee1266] | 476 | <para>is a script that is a part of the autologin feature
|
---|
[72d90b67] | 477 | mandated by the pnfs-objects standard.</para>
|
---|
| 478 | <indexterm zone="nfs-utils osd_login">
|
---|
| 479 | <primary sortas="b-osd_login">osd_login</primary>
|
---|
| 480 | </indexterm>
|
---|
| 481 | </listitem>
|
---|
| 482 | </varlistentry>
|
---|
| 483 |
|
---|
| 484 |
|
---|
[6d772cc] | 485 | <varlistentry id="rpc.mountd">
|
---|
[b86cfc2] | 486 | <term><command>rpc.mountd</command></term>
|
---|
| 487 | <listitem>
|
---|
| 488 | <para>implements the NFS mount protocol on an NFS server.</para>
|
---|
[6d772cc] | 489 | <indexterm zone="nfs-utils rpc.mountd">
|
---|
| 490 | <primary sortas="b-rpc.mountd">rpc.mountd</primary>
|
---|
[b86cfc2] | 491 | </indexterm>
|
---|
| 492 | </listitem>
|
---|
| 493 | </varlistentry>
|
---|
| 494 |
|
---|
[6d772cc] | 495 | <varlistentry id="rpc.nfsd">
|
---|
[b86cfc2] | 496 | <term><command>rpc.nfsd</command></term>
|
---|
| 497 | <listitem>
|
---|
| 498 | <para>implements the user level part of the NFS
|
---|
| 499 | service on the server.</para>
|
---|
[6d772cc] | 500 | <indexterm zone="nfs-utils rpc.nfsd">
|
---|
| 501 | <primary sortas="b-rpc.nfsd">rpc.nfsd</primary>
|
---|
[b86cfc2] | 502 | </indexterm>
|
---|
| 503 | </listitem>
|
---|
| 504 | </varlistentry>
|
---|
| 505 |
|
---|
[6d772cc] | 506 | <varlistentry id="rpc.statd">
|
---|
[b86cfc2] | 507 | <term><command>rpc.statd</command></term>
|
---|
| 508 | <listitem>
|
---|
[0f10bc0] | 509 | <para>is used by the NFS file locking service. Run on both sides,
|
---|
| 510 | client as well as server, when you want file locking enabled.</para>
|
---|
[6d772cc] | 511 | <indexterm zone="nfs-utils rpc.statd">
|
---|
| 512 | <primary sortas="b-rpc.statd">rpc.statd</primary>
|
---|
[b86cfc2] | 513 | </indexterm>
|
---|
| 514 | </listitem>
|
---|
| 515 | </varlistentry>
|
---|
| 516 |
|
---|
[d3761424] | 517 | <varlistentry id="rpcdebug">
|
---|
| 518 | <term><command>rpcdebug</command></term>
|
---|
| 519 | <listitem>
|
---|
[81066706] | 520 | <para>sets or clears the kernel's NFS client and server debug
|
---|
| 521 | flags.</para>
|
---|
[d3761424] | 522 | <indexterm zone="nfs-utils rpcdebug">
|
---|
| 523 | <primary sortas="b-rpcdebug">rpcdebug</primary>
|
---|
| 524 | </indexterm>
|
---|
| 525 | </listitem>
|
---|
| 526 | </varlistentry>
|
---|
| 527 |
|
---|
[b86cfc2] | 528 | <varlistentry id="showmount">
|
---|
| 529 | <term><command>showmount</command></term>
|
---|
| 530 | <listitem>
|
---|
| 531 | <para>displays mount information for an NFS server.</para>
|
---|
| 532 | <indexterm zone="nfs-utils showmount">
|
---|
| 533 | <primary sortas="b-showmount">showmount</primary>
|
---|
| 534 | </indexterm>
|
---|
| 535 | </listitem>
|
---|
| 536 | </varlistentry>
|
---|
| 537 |
|
---|
[d3761424] | 538 | <varlistentry id="sm-notify">
|
---|
| 539 | <term><command>sm-notify</command></term>
|
---|
| 540 | <listitem>
|
---|
| 541 | <para>is used to send Network Status Monitor reboot messages.</para>
|
---|
| 542 | <indexterm zone="nfs-utils sm-notify">
|
---|
| 543 | <primary sortas="b-sm-notify">sm-notify</primary>
|
---|
| 544 | </indexterm>
|
---|
| 545 | </listitem>
|
---|
| 546 | </varlistentry>
|
---|
| 547 |
|
---|
| 548 | <varlistentry id="start-statd">
|
---|
| 549 | <term><command>start-statd</command></term>
|
---|
| 550 | <listitem>
|
---|
| 551 | <para>is a script called by nfsmount when mounting a filesystem with
|
---|
[81066706] | 552 | locking enabled, if statd does not appear to be running. It can be
|
---|
| 553 | customised with whatever flags are appropriate for the site.</para>
|
---|
[d3761424] | 554 | <indexterm zone="nfs-utils start-statd">
|
---|
| 555 | <primary sortas="b-start-statd">start-statd</primary>
|
---|
| 556 | </indexterm>
|
---|
| 557 | </listitem>
|
---|
| 558 | </varlistentry>
|
---|
| 559 |
|
---|
[6d772cc] | 560 | <varlistentry id="umount.nfs">
|
---|
[0f10bc0] | 561 | <term><command>umount.nfs</command></term>
|
---|
| 562 | <listitem>
|
---|
[2f12da13] | 563 | <para>is used to unmount a network share using NFS</para>
|
---|
[6d772cc] | 564 | <indexterm zone="nfs-utils umount.nfs">
|
---|
| 565 | <primary sortas="b-umount.nfs">umount.nfs</primary>
|
---|
[0f10bc0] | 566 | </indexterm>
|
---|
| 567 | </listitem>
|
---|
| 568 | </varlistentry>
|
---|
| 569 |
|
---|
[6d772cc] | 570 | <varlistentry id="umount.nfs4">
|
---|
[0f10bc0] | 571 | <term><command>umount.nfs4</command></term>
|
---|
| 572 | <listitem>
|
---|
[2f12da13] | 573 | <para>is used to unmount a network share using NFSv4</para>
|
---|
[6d772cc] | 574 | <indexterm zone="nfs-utils umount.nfs4">
|
---|
| 575 | <primary sortas="b-umount.nfs4">umount.nfs4</primary>
|
---|
[0f10bc0] | 576 | </indexterm>
|
---|
| 577 | </listitem>
|
---|
| 578 | </varlistentry>
|
---|
| 579 |
|
---|
[b86cfc2] | 580 | </variablelist>
|
---|
| 581 |
|
---|
| 582 | </sect2>
|
---|
[d47e7ea9] | 583 |
|
---|
[176b211] | 584 | </sect1>
|
---|