Digital UNIX | ||
---|---|---|
Prev | Chapter 4. File System | Next |
The Network File System (NFS) is a facility for sharing files in a heterogeneous environment of processors, operating systems, and networks, by mounting a remote file system or directory on a local system and then reading or writing the files as though they were local.
Digital UNIX Version 4.0 supports NFS Version 3, in addition to NFS Version 2. NFS Version 2 code is based on ONC Version 4.2, which Digital licensed from Sun Microsystems. The NFS Version 3 code supersedes ONC Version 4.2, although at the time that NFS Version 3 was ported to Digital UNIX, Sun Microsystems had not yet released a newer, public version of ONC with NFS Version 3 support.
NFS Version 3 supports all the features of NFS Version 2 as well as the following:
64-bit remote access Allows users to access files larger than 2 GBs over NFS
Improved performance
Support for reliable asynchronous writes which improves write performance over NFS Version 2 by a factor of seven, thereby reducing client response latency and server I/O loading
Support for a READDIRPLUS procedure that returns file handles and attributes with directory names to eliminate LOOKUP calls when scanning a directory
Support for servers to return metadata on all operations to reduce the number of subsequent GETATTR procedure calls
Support for weak cache consistency data to allow a client to manage its caches more effectively
Improved security
Provides an ACCESS procedure that fixes the problems in NFS Version 2 with superuser permission mapping, and allows access checks at file-open time, so that the server can better support Access Control Lists (ACLs)
File names and pathnames specified as strings of variable length, with the maximum length negotiated between the client and server using the PATHCONF procedure
Guaranteed exclusive creation of files
Since Digital UNIX supports both NFS Version 3 and Version 2, the NFS client and server bind at mount time using the highest NFS version number they both support. For example, a Digital UNIX Version 4.0 client will use NFS Version 3 when it is served by a Digital UNIX Version 4.0 NFS server; however, when it is served by an NFS server running an earlier version of Digital UNIX, the Digital UNIX Version 4.0 NFS client will use NFS Version 2.
For more detailed information on NFS Version 3, see the paper NFS Version 3: Design and Implementation (USENIX, 1994).
In addition to the NFS Version 3.0 functionality, Digital UNIX supports the following Digital enhancements to NFS:
NFS over TCP
NFS has been traditionally run over the UDP protocol. Digital Unix V4.0 now supports NFS over the TCP protocol. See mount(8) for additional details.
Write-gathering
On an NFS server, multiple write requests to the same file are combined to reduce the number of actual writes as much as possible. The data portions of successive writes are cached and a single metadata update is done that applies to all the writes. Replies are not sent to the client until all data and associated metadata are written to disk to ensure that write-gathering does not violate the NFS crash recovery design.
As a result, write-gathering increases write throughput by up to 100 % and the CPU overhead associated with writes is substantially reduced, thereby further increasing server capacity.
NFS-locking
Using the fcntl system call to control access to file regions, NFS-locking allows you to place locks on file records over NFS, thereby protecting, among other things, segments of a shared, NFS-served database. The status daemon, rpc.statd, monitors the NFS-servers and maintains the NFS lock if the server goes down. When the NFS server comes back up, a reclaiming process allows the lock to be reattached.
Automounting
The automount daemon automatically and transparently mounts and unmounts NFS file systems on an as-needed basis. It provides an alternative to using the /etc/fstab file for NFS mounting file systems on client machines.
The automount daemon can be started from the /etc/rc.config file or from the command line. Once started, it sleeps until a user attempts to access a directory that is associated with an automount map or any directory or file in the directory structure. The daemon awakes and consults the appropriate map and mounts the NFS file system. After a specified period of inactivity on a file system, 5 minutes by default, the automount daemon unmounts that file system.
The maps indicate where to find the file system to be mounted and the mount options to use. An individual automount map is either local or served by NIS. A system, however, can use both local and NIS automount maps.
Automounting NFS-mounted file systems provides the following advantages over static mounts:
If NIS maps are used and file systems are moved to other servers, users do not need to do anything to access the moved files. Every time the file systems need to be mounted, the daemon will mount them from the correct locations.
In the case of read-only files, if more than one NFS-server is serving a given file system, automount will connect you to the fastest server that responds. If at least one of the servers is available, the mount will not hang.
By unmounting NFS-mounted file systems that have not been accessed for more than a certain interval (5 minutes by default), the automount daemon conserves system resources, particularly memory.
PC-NFS
PC-NFS, a product for PC clients available from Sun Microsystems, allows personal computers running DOS to access NFS servers as well as providing a variety of other functionality.
Digital supports the PC-NFS server daemon, pcnfsd, which allows PC clients with PC-NFS configured to do the following:
Mount NFS file systems
The PC-NFS pcnfsd daemon, in compliance with Versions 1.0 and 2.0 of the pcnfsd protocol, assigns UIDs and GIDs to PC clients so that they can talk to NFS.
The pcnfsd daemon performs UNIX login-like password and username verification on the server for the PC client. If the authentication succeeds, the pcnfsd daemon then grants the PC client the same permissions accorded to that username. The PC client can mount NFS file systems by talking to the mountd daemon as long as the NFS file systems are exported to the PC client in the /etc/exports file on the server. Since there is no mechanism in DOS to perform file permission checking, the PC client calls the authentication server to perform checking of the user's credentials against the file's attributes. This happens when the PC client makes NFS requests to the server for file-access that requires permission checking, such as opening of a file.
Access network printers
The pcnfsd daemon authenticates the PC client and then spools and prints the file on behalf of the client.
Prev | Home | Next |
UNIX File System | Up | CD-ROM File System |