Here's my "formula" for getting NFS on Linux working with Windows 7 Client for NFS. It opens up some holes (like firewalls) initially, but gets you up and running and then you can lock things back down from there.
Without a formula like this, you will probably spend countless hours scouring the Internet, trying to piece this puzzle together, with obscure errors by Bill Gates and company like Error 5 and Error 53 (not real helpful guys!)
Hope you find it useful.
Enjoy!
Rick
P.S. I decided to post this after burning about 6 hours figuring all this out... (very frustrating - maybe I can also find this post next time I need it :-)
NFS configuration from Windows 7 "Client for NFS" to Linux/UNIX NFS Server
On CentOS (or other Linux variant):
-----------------
- Add to /etc/exports:
/devpool 192.168.0.0/16(rw,sync)
- Export the new NFS share
exportfs -a
Disable CentOS/Linux Firewall (or program in all ports required for portmap and other services to support NFSv4 across firewall!)
- Restart NFS service (just for good measure)
service nfs restart
On Windows 7:
(You must be running Ultimate or Pro, a version of Windows 7 which supports Client for NFS)
Install "Client for NFS" feature (Control Panel / Programs and Features / Services for NFS / Client for NFS)
Disable Windows Firewall or other local firewall (open all required ports later)
Use "Regedit" and add anonymous UID and GID to 500,500 (or whatever user ID you want to have access on CentOS)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousGid (new DWORD 32)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default\AnonymousUid (new DWORD 32)
- Reboot
(or restart NFS Client from CMD line)
nfsadmin client stop
nfsadmin client start
- Make sure you can see the Linux NFS exports from Windows 7
showmount -e 192.168.146.131 (use your NFS Server's IP address)
- If showmount hangs, it's probably a firewall or network routing issue
mount -o anon 192.168.146.131:/devpool V:
If you get Error 53, the you must change the Network Priority order so that Client for NFS network provider is ABOVE the regular Windows Network provider (so NFS gets tried first; otherwise, you'll get prompted when trying to make connections and get Error 53, which will waste a LOT of your time as it did mine):
Is there a way to change network provider order in Windows 7? - Microsoft Answers
(then reboot and try again with new network provider order)
mount -o anon 192.168.146.131:/devpool V:
Celebrate!