Setting up NFS server and client on FreeBSD and Linux [How To]

, , Leave a comment

NFS server (FreeBSD):


 portmap_enable = "YES"
 nfs_server_enable = "YES"
 nfs_reserved_port_only = "YES"

/etc/exports (FreeBSD)

 /usr/local/nfs-ro-mapall = nobody-network 192.168.1-mask
 /cdrom-alldirs, quiet, ro-network

/etc/exports (For Linux)
(start – service start portmap and nfs):

 /usr/local/nfs (ro) (rw)

NFS client:

/etc /rc.conf:

 portmap_enable = "YES", nfs_client_enable = "YES"

/etc/fstab: (mounting) /usr/local/nfs/ home/nfs nfs ro 0 0

or manually:

 /sbin/mount_nfs -r 32768 -w 32768 -i noatime /usr/local/nfs/ home/nfs

To optimize performance, is recommended for mounting with Linux to specify options:

 rsize = 32768, wsize = 32768, intr, noatime

The number of clients and servers running on FreeBSD regulated through the parameter “-n” in the variables rc.conf: nfs_client_flags and nfs_server_flags

In some Linux distributions, the number of servers specified in the file /etc/sysconfig/nfs, variable NFSDCOUNT, whose value is passed as an argument when you start rpc.nfsd.



Leave a Reply