Online Book Reader

Home Category

Managing NFS and NIS, 2nd Edition - Mike Eisler [64]

By Root 353 0
with security modes in vfstab or the mount command, because Version 3 has a way to negotiate the security mode. We will go into more detail in Chapter 12.

hard/soft

By default, NFS filesystems are hard mounted, and operations on them are retried until they are acknowledged by the server. If the soft option is specified, an NFS RPC call returns a timeout error if it fails the number of times specified by the retrans option.

vers=version

The NFS protocol supports two versions: 2 and 3. By default, the mount command will attempt to use Version 3 if the server also supports Version 3; otherwise, the mount will use Version 2. Once the protocol version is negotiated, the version is bound to the filesystem until it is unmounted and remounted. If you are mounting multiple filesystems from the same server, you can use different versions of NFS. The binding of the NFS protocol versions is per mount point and not per NFS client/server pair. Note the NFS protocol version is independent of the transport protocol used. See the discussion of the proto option later in this section.

proto=protocol

The NFS protocol supports arbitrary transport protocols, both connection-oriented and connectionless. TCP is the commonly used connection-oriented protocol for NFS, and UDP is the commonly used connectionless protocol. The protocol specified in the proto option is the netid field (the first field) in the /etc/netconfig file. While the /etc/netconfig file supports several different netids, practically speaking, the only ones NFS supports today are tcp and udp. By default, the mount command will select TCP over UDP if the server supports TCP. Otherwise UDP will be used.

* * *

Tip

It is a popular misconception that NFS Version 3 and NFS over TCP are synonymous. As noted previously, the NFS protocol version is independent of the transport protocol used. You can have NFS Version 2 clients and servers that support TCP and UDP (or just TCP, or just UDP). Similarly, you can have NFS Version 3 clients that support TCP and UDP (or just TCP, or just UDP). This misconception arose because Solaris 2.5 introduced both NFS Version 3 and NFS over TCP at the same time, and so NFS mounts that previously used NFS Version 2 over UDP now use NFS Version 3 over TCP.

* * *

retrans/timeo

The retrans option specifies the number of times to repeat an RPC request before returning a timeout error on a soft-mounted filesystem. The retrans option is ignored if the filesystem is using TCP. This is because it is assumed that the system's TCP protocol driver will do a better of job than the user of the mount command of judging the necessary TCP level retransmissions. Thus when using TCP, the RPC is sent just once before returning an error on a soft mounted filesystem. The timeo parameter varies the RPC timeout period and is given in tenths of a second. For example, in /etc/vfstab, you could have:

onaga:/export/home/mre - /users/mre nfs - yes rw,proto=udp,retrans=6,timeo=11

retry=n

This option specifies the number of times to retry the mount attempt. The default is 10000. (The default is only 1 when using the automounter. See Chapter 9.) See Section 6.3.4 later in this chapter.

rsize=n/wsize=n

This option controls the maximum transfer size of read (rsize) and write (wsize) operations. For NFS Version 2, the maximum transfer size is 8192 bytes, which is the default. For NFS Version 3, the client and server negotiate the maximum. Solaris systems will by default negotiate a maximum transfer size of 32768 bytes.

intr/nointr

Normally, an NFS operation will continue until an RPC error occurs (and if mounted hard, most RPC errors will not prevent the operation from continuing) or until it has completed successfully. If a server is down and a client is waiting for an RPC call to complete, the process making the RPC call hangs until the server responds (unless mounted soft). With the intr option, the user can use Unix signals (see the manpage for kill(1)) to interrupt NFS RPC calls and force the RPC layer to return an error. The intr option is the

Return Main Page Previous Page Next Page

®Online Book Reader