Subject: Re: NFS tips
To: Paul Hoffman <phoffman@proper.com>
From: Joel Wilsson <joelw@unix.se>
List: netbsd-help
Date: 01/08/2003 02:54:43
On Wednesday, January 8, 2003, at 02:41 am, Paul Hoffman wrote:
> Is there an HOWTO on setting up an NFS server? I'm looking for hints
> on how to make an almost-dedicated server more reliable and faster.
> Kernel mods are OK if they really help.
There's a section in the NetBSD handbook about NFS:
http://www.mclink.it/personal/MG2508/nbsdeng/chap-net2.html#NFS
But in short, it's something like this...
Add the following lines to your rc.conf:
inetd=yes
portmap=yes
nfs_server=yes
mountd=yes
rpcbind=yes
Uncomment those lines in inetd.conf:
rstatd/1-3 dgram rpc/udp wait:100 nobody:kmem
/usr/libexec/rpc.rstatd rpc.rstatd
rusersd/2-3 dgram rpc/udp wait:100 nobody
/usr/libexec/rpc.rusersd rpc.rusersd
Add the filesystems you wish to export to /etc/exports;
my exports looks like this:
/home -noresvport,noresvmnt -mapall=joelw:joelw:wheel 192.168.1.79
#/export/client -noresvport,noresvmnt -ro -network 192.168.0/24
(/export/client is for diskless booting, so it's commented out)
You can probably get away with something simpler. See the
exports(5) man page for some other examples.
You can start all services using the rc.d system, but I
recommend you to just reboot. That way you make sure that
everything will work correctly after you upgrade your
kernel or whatever.
Good luck,
joelw