[CentOS] NFS mount problems
Jay Leafey
jay.leafey at mindless.com
Sat Apr 26 14:50:17 UTC 2008
Part of the problem, as you've found, is trying to get the NFS server to
use "static" ports in portmapper instead of the more-or-less random
ports used by default. Luckily, it's fairly easy to convince the
different NFS components to do so. First, look for the file
/etc/sysconfig/nfs, which controls most of the NFS daemons. Edit it to
contain the following:
> # Force rpc.statd to run on port 4000
> STATD_PORT=4000
> # Force lock daemon to run on port 4001
> LOCKD_TCPPORT=4001
> LOCKD_UDPPORT=4001
> # Force mountd to run on port 4002
> MOUNTD_PORT=4002
> # Force rquotad to run on port 4003
> RQUOTAD_PORT=4003
After restarting all the daemons, or just rebooting the server, the
rpcinfo command should show all the services using the static ports.
You will then need to open these ports up in iptables to whaterver
degree you need. I usually add something like the following lines in
the appropriate part of the iptables file:
> -A RH-Firewall-1-INPUT -p tcp -m tcp -m state --state NEW -m multiport -s 192.168.1.0/24 --dports 111,2049,4000,4001,4002,4003 -j ACCEPT
> -A RH-Firewall-1-INPUT -p udp -m udp -m state --state NEW -m multiport -s 192.168.1.0/24 --dports 111,2049,4000,4001,4002,4003 -j ACCEPT
This opens up all the ports needed to my local LAN.
It works for me, but your mileage may vary.
--
Jay Leafey - Memphis, TN
jay.leafey at mindless.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5177 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20080426/2a59fda6/attachment.bin>
More information about the CentOS
mailing list