Linux Networking, Part 7: Implementing NFS
Sharing Data Between Machines
If you have Windows PCs on your home network and have no pressing reason to use NFS (Network File System) support to share files, then read no farther. NFS is actually more robust than Samba, but it is also more complicated depending upon what features are used.
From a basic point of view, NFS and Samba are very similar. Both have a client and server application. Both allow a server to share files with clients. Both have clients and servers on almost every platform. The big difference is the Windows PCs have Samba-compatible clients and servers as part of their default network support and Windows requires third party software to support NFS. Conversely, UNIX systems usually come with and use NFS by default with Samba being used to provide file sharing with Windows PCs.
Perhaps the biggest difference between NFS and Samba is that NFS uses an explicit resource browser capability. This means that an NFS client can poll a particular server using the showmount program, as in showmount -e fileserver, to see what directories have been exported. Samba clients do this as well using NetBIOS but they can also determine what servers are available as well. The showmount program must be given the domain name or IP address of the server.
This article covers the basics of NFS configuration. There are a number of NFS HOWTOs and books on NFS that are good sources of information in addition to the online manual pages for the applications mentioned in this article. These should be used if security is an issue.
NFS works as well as Samba in providing file-sharing support in a closed network that is not connected to the Internet or one that has a good firewall in place. The Linux implementation of NFS tends to be relatively secure by default but it is possible to configure NFS servers, so there are open security holes.
The Linux 2.2 kernel has NFS support built-in. The NFS client and server applications tap this support. The NFS server has multitasking support that provides better performance, although this feature is targeted at larger networks.
NFS can be set up by editing the configuration files associated with the NFS support or running applications to mount or dismount an NFS directory. Most of the Linux setup applications, such as linuxconf found in Red Hat Linux, can also be used to configure the NFS server and client. It is possible to use both configuration approaches, but it is best to use one or the other unless you are familiar with how the setup application modifies the configuration files.
Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.
- 1Linux Top 3: GNOME 3.12 and New Betas for Ubuntu 14.04 and OpenMandriva Lx 2014.0
- 2Linux Top 3: Linus Lashes out, Linux 3.14 Gets PIE and Ubuntu One is Done.
- 3Linux Top 3: Ubuntu 14.04, Debian Gives Squeeze More Life and Red Hat Goes Atomic
- 4Linux Top 3: CoreOS, Oracle Enterprise Linux 7 and Ubuntu 14.10
- 5Linux Top 3: Debian Gives Up on Upstart, Ubuntu and Linux Kernel Updates