Using NFS
What is NFS?
NFS is a distributed file system that provides transparent access to files residing on remote disks. Developed at Sun Microsystems in the early 1980Õs. The NFS protocol has been revised a number of times over this time span. It is available on all Unix systems, including Berkeley 4.4 and Linux, VMS, Mac, IBM, and Novell. Other alternatives to NFS include:
Problems with NFS.
Why is NFS used then?
more info
Red Hat distributions (Mandriva, Fedora) look for nfs service, Debian like look for nfs-kernel-server.
Starting services:# /etc/init.d/portmap start
# /etc/init.d/nfs-common start
# /etc/init.d/nfs-kernel-server startor ( service portmap start; service nfs start, using Fedora)
NFS setup: Edit /etc/exports file.
Examples:
/home/files 192.168.0.*(ro)
/home/work 192.168.0.*(rw)
/files 192.168.0.3(rw)
/home/fred 192.168.0.*(rw,async)
If you use “noacess” parameter, you’ll be sharing only the files in the folder and blocking subfolders access.
After /etc/exports updates, restart the service:
# /etc/init.d/nfs-kernel-server restart
Start or stop the service:
# /etc/init.d/nfs-kernel-server stop
# /etc/init.d/nfs-kernel-server start
(The service in Fedora calls nfs)
How to mount:
As root (or using sudo)
# mkdir /mnt/files
# mount -t nfs 192.168.0.1:/files /mnt/files
umount:
umount /mnt/files
Discussion Area - Leave a Comment