SDB:Network file system
The term "network file system" is also often used as a generic term.
Install NFS kernel server
Sucessful NFS installations often include
nfs-kernel-server package from openSUSE repositories. Simply install from YaST, or from command line type (as root):
Anyway this package will be automatically installed if you decide to use the NFS Server Configuration YaST2 module (or you would like to have it at hand). In this case you can simply install yast2-nfs-server package from YaST, or from command line type (as root):
Configure /etc/exports file
/etc/exports file is quite easy. Each line contains an export point and a whitespace-separated list of clients allowed to mount the file system at that point. Each listed client may be immediately followed by a parenthesized, comma-separated list of export options for that client. No whitespace is permitted between a client and its option list.
This shares the directory read-only to ALL hosts, including those on the Internet! You may also include a
* immediately before
This shares the directory read-and-write to all hosts in the 192.168.1.0 network, which subnet mask 255.255.255.0. Using
async option usually improves performance, but at the cost that an unclean server restart (i.e. a crash) can cause data to
be lost or corrupted.
man exports for a greater list of options.
Versions and variations
Version 2 of the protocol originally operated entirely over UDP and was meant to keep the protocol stateless, with locking (for example) implemented outside of the core protocol.
Version 3 introduced support for using TCP as transport. While it is true several vendors had already extended NFS Version 2 to support TCP as transport, Sun Microsystems introduced TCP as a transport for NFS at the same time it introduced Version 3. Using TCP as transport made using NFS over a WAN more feasible.
Version 4, influenced by AFS, and CIFS includes performance improvements, mandates strong security, and introduces a stateful protocol. Version 4 was the first version developed with the Internet Engineering Task Force (IETF) after Sun Microsystems handed over the development of the NFS protocols.
Various side-band protocols have been added to NFS, including:
- The byte-range advisory Network Lock Manager (NLM) protocol which was added to support System V UNIX file locking APIs.
- The remote quota reporting (RQUOTAD) protocol to allow NFS users to view their data storage quotas on NFS servers.
WebNFS is an extension to Version 2 and Version 3 which allows NFS to be more easily integrated into Web browsers and to enable operation through firewalls.
NFS is strongly associated with UNIX systems, though it can be used on any platform such as Macintosh, Windows and Novell NetWare operating systems. The Server Message Block (SMB also known as CIFS) and NetWare Core Protocol (NCP), similar protocols, are equivalent implementations of a network file system under other operating systems. Cross-platform compatibility makes NFS an ideal network file system implementation.
Automatically mounting NFS at boot-up
There is some widespread difficulty about automatically mounting NFS share at boot up. You MUST enable
nfs daemon like this:
If you see off, then you must:
/etc/fstab must include (at least):
remotehost:/path/to/export /local/mountpoint nfs auto 0 0
You can also include the following options:
See man nfs for more
Also, be sure that your firewall is configured correctly, including all UDP and TCP ports. Be sure that your external router/firewall is forwarding ports correctly (if running NFS over Internet (WAN)).
- The Linux Documentation Project has several howto articles on NFS in different formats.
- Linux NFS Overview, FAQ and HOWTO Documents
- The NFS Version 4 overview site
- IETF ONC RPC working group electronic mail archive which documents OSF's refusal to give ISOC change control over DCE RPC.
- Distributed Object Computation Testbed (DOCT) Technical Report discusses the Network Computing Forum.
- RFC 3530 - NFS Version 4 Protocol Specification
- RFC 2054 - WebNFS Specification
- RFC 2339 - Sun/ISOC NFS Change Control Agreement
- RFC 2203 - RPCSEC_GSS Specification
- RFC 1813 - NFS Version 3 Protocol Specification
- RFC 1790 - Sun/ISOC ONC RPC Change Control Agreement
- RFC 1094 - NFS Version 2 Protocol Specification