FreeBSD - Network File System (NFS)

2002-05-07
NFS Client

# vi /etc/rc.conf
Add the following line...
nfs_client_enable="YES"

# cp /etc/fstab /etc/fstab.bak
# vi /etc/fstab
Add the following lines:
nfsserver:/share /share nfs rw 0 0

Before the shares can be mounted you’ll need to create nodes…

# mkdir /share

Reboot to make sure it automatically mounts.

Be sure to create a startup script for lockd…

# vi /usr/local/etc/rc.d/lockd

#!/bin/sh
#
# startup script for lockd by Benjamin Bryan
# may 7, 2003

case "$1" in
start)
/usr/sbin/rpc.lockd
;;

stop)
killall `basename rpc.lockd`
;;

*)
echo ""
echo "Usage: `basename $0` { start | stop }"
echo ""
;;
esac

NFS Server

# vi /etc/rc.conf
Add the following lines...
portmap_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"

# vi /etc/exports
/share -network 10.0.217.0 -mask 255.255.255.0
/share -network 10.0.218.0 -mask 255.255.255.0