User Tools

Site Tools


nfs_server_and_client_configuration

This is an old revision of the document!


NFS server and client configuration

NFS server

Install following packages:

yum install nfs-utils rpcbind

Make sure services start at boot:

chkconfig nfs on
chkconfig nfslock on 
chkconfig rpcbind on

Start services:

service nfs start
service nfslock start
service rpcbind start

Create proper /etc/exports

Example:

/kickstart *(ro)

Export NFS shares

exportfs -a

Check NFS procs.

rpcinfo -p

NFS client

Install following packages:

yum install nfs-utils rpcbind

Make sure services start at boot:

chkconfig nfslock on 
chkconfig rpcbind on

Start services:

service nfslock start
service rpcbind start

Check share:

Add mount to /etc/fstab

mount -a

Manual mount:

mount <nfsserver>:/<sharename> /<localmountpoint>

NFS server behind a firewall

Edit /etc/sysconfig/nfs

Specify:

MOUNTD_PORT=<fixedport0>
STATD_PORT=<fixedport1>
LOCKD_TCPPORT=<fixedport2>
LOCKD_UDPPORT=<fixedport3>

Restart NFS service:

service nfs restart

Verify the fixed ports are in use:

rpcinfo -p 

Open up FW for following ports:

  Allow TCP and UDP port 2049 for NFS.
  Allow TCP and UDP port 111 (rpcbind/sunrpc).
  Allow the TCP and UDP port specified in <fixedport0>
  Allow the TCP and UDP port specified in <fixedport1>
  Allow the TCP port specified in <fixedport2>
  Allow the UDP port specified in <fixedport3>

References:

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch29_:_Remote_Disk_Access_with_NFS

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/s2-nfs-nfs-firewall-config.html

nfs_server_and_client_configuration.1317046732.txt.gz · Last modified: 2011/09/26 14:18 by root