Network File Systems allow the users files to “migrate” from workstation to workstation with them.
Network File Systems simplify life for the user, but generally make system administration more complicated (due to the setup costs).
In Lab 6 we will setup the Sun Network File System (NFS) services on the lab machines.
NFS has two components: The server side software, and the client side software. Each component is actually a suite of programs which implement the sockets required to provide network based filesystems.
The mount command has several extensions for use with NFS. Mount has to understand timeouts, soft mounts, background mounts, and the automounter.
rw/ro - Read/write and read only. NFS file systems that are mounted read/write can block activity on the client when the server providing the file system becomes unavailable. See intr and bg below.
hard/soft - The hard option mounts an NFS file system in such a way as to ensure that data is written to the remote file system. If the file server becomes unavailable, a file system mounted with the hard option will stop all remote file operations until the file server becomes available again. All file systems mounted with the rw option should also use the hard option to ensure the integrity of data written to the file system. The soft option does not provide assurance of data writes to the remote file system, but does not stop remote file operations in the case of a file server becoming unavailable. This option is useful for file systems that are mounted read-only.
suid/nosuid - The nosuid option negates the effect of programs on the remote file system for which respective setuid bits are set. Setuid programs run from NFS file systems mounted with the nosuid option are executed with the normal permissions of the user executing the program, not those conferred by the setuid bit. This option is used to increase the security of the client by preventing setuid programs on remote file systems from being used on the client system.
bg/fg - This option pair controls how to handle a failed mount of an NFS file system. Mounts with the bg option are retried in the background, freeing the shell which issued the mount command. Use this option when mounting file systems in /etc/vfstab or /etc/fstab to prevent a workstation from stopping during the boot sequence because a file server is down.
intr/nointr - The nointr option prevents program interrupts when programs cause an NFS operation to occur. This can result in programs being uninterruptible when an NFS file server becomes unavailable. The default is to allow interrupts so that programs can be aborted in the event of server failures.
retry=n - Number of times to retry a failed mount. The default of 10,000 is usually sufficient.
timeo=n - Time-out value for retrying NFS operations. Increase this value to permit very slow systems, such as near-line file stores, more time to complete basic operations.
retrans=n - Number of retransmissions of a given NFS operation. The setting depends on the network and type of server being used. Some networks where packet loss is high benefit from an increase in the number of retransmissions.
rsize=n - Read buffer size. Some servers and clients (e.g., those with slower or less reliable network connections) perform better when the buffer used for NFS operations is a different size than the default.
wsize=n - Write buffer size. Similar to rsize in usage.
proto=? - Controls the network protocol used to transport NFS data. NFS uses IP datagrams by default. By setting proto=tcp, NFS will use tcp, thereby improving performance when moving data over wide area networks and the Internet.
secure - On Solaris 7 and early versionsof NFS this option enables NIS+ public key cryptography to be used for NFS authentication and encrypted communications. This option has been deprecated in favor of the “sec=?” option below.
sec=? - New in Solaris 8. This option replaces the “secure” option of previous versions. It controls the security mode used for NFS. Options are “sys” for UID & GID based control, “dh” (Diffie-Hellman) for NIS+ based public key cryptography, “kerb4” for MIT Kerberos authentication and “none” which provides no authentication and maps all accesses to “nobody” as described below.
quota/noquota - Setting this option enables disk quota checking via the rquota service. The rquotad daemon must be running on the server for this to function. Noquota is the default.
remount - This option is often used when mounting a file system manually. It converts a mount point from read-only to read-write status.
vers=n - NFS protocol version number (2 or 3). By default, the mount command will attempt to use the highest version number protocol available from the server. This option allows the protocol version to be fixed for use with servers that support only the older version 2 protocol.