Nfs

From SaruWiki
Jump to navigation Jump to search

There are two implimentations of NFS one runs in kernel space (nfs-kernel-server) the other in user space (nfs-user-server). The kernel space implimentation is faster and more stable but if something goes wrong it could bring your box down. In reality the kernel space NFS implimentation very rarely fails

Make sure you have the kernel modules selected in you're kernel

file systems -> Network File Systems -> NFS server support

On the server:

apt-get install nfs-kernel-server nfs-common portmap

On the client:

#pt-get install nfs-common portmap


Export Directories

#vi /etc/exports 

/data 192.168.0.0/24(rw,sync) /home 192.168.0.0/24(rw,sync)



Mount

To mount the directories on the client nd make it persistent edit /etc/fstab

# vi /etc/fstab

192.168.0.1:/data /data nfs rw,sync,hard,intr 0 0 192.168.0.1:/home /home nfs rw,sync,hard,intr 0 0