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

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



NFS server (FreeBSD):

/etc/rc.conf:

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

/etc/exports (FreeBSD)

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

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

 /usr/local/nfs 192.168.1.0/255.255.255.0 (ro) 192.168.2.1 (rw)

NFS client:

/etc /rc.conf:

 portmap_enable = "YES", nfs_client_enable = "YES"

/etc/fstab: (mounting)

 192.168.1.1: /usr/local/nfs/ home/nfs nfs ro 0 0

or manually:

 /sbin/mount_nfs -r 32768 -w 32768 -i noatime 192.168.1.1: /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.

Source: OpenNET.ru

[Related posts]

Creating IP-IP tunnel between FreeBSD and Linux
Suppose we have 2 cars PC1 (FreeBSD, ip-address IP1, interface INT1) and PC2 (Linux, IP2, INT2). Lets build IP-IP tunnel (on the side of FreeBSD...
File Server With Samba and FTP in FreeBSD
This manual describes how to create file server, where users from can access their files with samba client and FTP server, (from windows too). In...
IPv6 Configuration on FreeBSD
So, it’s time to make the IPv4-IPv6 gateway, to walk in “another Internet”, to whom he will soon. GO and register at http://go6.net/4105/register.asp The kernel...
Internet gateway on FreeBSD
Building a gateway to the global network on FreeBSD – this is one of the most frequent cases using this system. The main pluses of...
IPv6 Configuration on Ubuntu Linux [HowTo]
We have Ubuntu 8.10 Intrepid Ibex Server Edition, coming out to the network via PPP and working with the intranet IP through NAT. Task: to...

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>