Set up NFS Service on Fedora 12


Networked file system (NFS) is commonly utilized for VM image migration and backup discussed in "Useful Commands for Backing up Virtual Machine Image", the following steps summarize how to set up an NFS server and client on Fedora 12.

1. Set up an NFS server:
a) allow servers inside subnet 10.x.y.z/n to mount a shared directory with read/write permission
# vi /etc/exports
add one line "'shared_directory' 10.x.y.z/n(rw)"
b) start the NFS server
# /sbin/chkconfig nfs on
# service rpcbind start
# service nfs start
check if NFS service is started by "chkconfig --list"

2. Set up NFS clients:
a) install essential packages
# yum nfs-utils
b) start the rpcbind service
# service rpcbind restart
# chkconfig rpcbind on

3. Mount the NFS directory:
# mount 'nfs_server_addr':'shared_directory' 'mount_dir'