Print

Setup a NFSv4 Server
This document describes briefly how to setup an NFSv4 server and/or client.

Preparation:
Install nfs-utils
Make sure util-linux is updated
Add "load-module nfs" to /etc/sysconfig/modules

Server:
  1. Add firewall rules:
# Allow NFS
add in-iface lo tcp dport 111 accept
add in-iface lo udp dport 111 accept
add in-iface eth1 tcp dport 111 accept
add in-iface eth1 udp dport 111 accept
add in-iface eth1 tcp dport 2049 accept
add in-iface eth1 udp dport 2049 accept


  1. Edit /etc/exports and setup the shares as per man exports
/var/vmail	192.168.2.0/24(rw,no_subtree_check,no_root_squash,fsid=0)


  1. Start services
service rpcbind start
chkconfig rpcbind on
service rpcidmapd start
chkconfig rpcidmapd on
service nfslock start
chkconfig nfslock on
service nfs start
chkconfig nfs on


Client:
  1. Start services
service rpcbind start
chkconfig rpcbind on
service rpcidmapd start
chkconfig rpcidmapd on
service nfslock start
chkconfig nfslock on


Mount using...
mount -t nfs4 -o proto=tcp server:/ mnt_point




Copyright © 2000-2009, AllWorldIT
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis.