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