Redhat:NFS Server

From Define Wiki
Revision as of 15:22, 22 August 2013 by Michael (talk | contribs) (→‎Commands and Files)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

NFS

NFS is used to share files and printers on a directory between Linux or Unix systems.

NFS v4 is the default on RHEL6, but RHEL will also support NFS v2 and v3. The differences are cover the communication and file sizes.


Installation

There is a group provides through yum to install of the needed packages:

yum groupinstall "NFS file server"

If you are using NFS v2 or v3, then s few extra packages will be required:

  • porttrserve
  • quota
  • rpcbind

Start the services

/etc/init.d/rpcbind start
/etc/init.d/nfs start

The NFS service scripts are:

  • /etc./init.d/nfs
  • /etc/init.d/nfslock
  • /etc/init.d/portreserve
  • /etc/init.d/rpcbind
  • /etc/init.d/rpcgssd
  • /etc/init.d/rpcidmapd
  • /etc/init.d/rpcsvcgssd


Commands and Files

There are four mount commands related to nfs:

mount.nfs
mount.nfs4
unmount.nfs
unmount.nfs4


There are a large number of commands provided by the installed NFS packages. The most used ones are covered here:

exportfs

manage shared directories in the exports file

nfsiostat

io stats for mount points

nfsstat

client / server stats for mount points

showmount

list all nfs directories