Mounting NFS Share on Windows 7: Step-by-Step Guide for Developers Using FreeNAS


4 views

Before mounting an NFS share from FreeNAS to Windows 7, ensure you have:

  • FreeNAS server properly configured with NFS exports
  • Windows 7 Professional/Enterprise/Ultimate edition (Home editions don't support NFS)
  • Administrative privileges on the Windows machine
  • Network connectivity between the systems

First, enable the required Windows features:

1. Open Control Panel > Programs > Turn Windows features on or off
2. Expand "Services for NFS"
3. Check both:
   - "Client for NFS"
   - "Administrative Tools"
4. Click OK and restart if prompted

There are two primary methods to mount NFS shares in Windows 7:

Method 1: Using mount command

Open Command Prompt as Administrator and run:

mount -o anon \\freenas-server\exported\path Z:

Where:
- freenas-server is your FreeNAS hostname/IP
- exported/path is the NFS export path
- Z: is the drive letter to assign

Method 2: Persistent mount via registry

For permanent mounts that survive reboots:

1. Open regedit and navigate to:
   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default
2. Create new String Value named "AnonymousUid" and set to 0
3. Create new String Value named "AnonymousGid" and set to 0
4. Create a batch file with:
   @echo off
   mount -o anon \\freenas-server\exported\path Z:
5. Add the batch to Startup folder

Error: "Network path not found"
- Verify FreeNAS NFS service is running
- Check firewall settings on both ends
- Test basic connectivity with ping

Error: "Access denied"
- Verify export permissions in FreeNAS
- Ensure Windows user has appropriate permissions
- Try adding -o mtype=hard to mount command

For better performance, consider these mount options:

mount -o anon,rsize=32768,wsize=32768,timeo=15,retry=1 \\freenas-server\share Z:

This configures:
- 32KB read/write buffers
- 15ms timeout
- Single retry attempt

If native NFS proves problematic, consider:

  • WinNFSd - Lightweight NFS server for Windows
  • NFS-AKE - Commercial NFS client with enhanced features
  • Dokan + NFS - FUSE-like implementation for Windows

Before proceeding, ensure you have:

  • Windows 7 Professional/Enterprise/Ultimate edition
  • FreeNAS server properly configured with NFS share
  • Network connectivity between Windows client and FreeNAS
  • Administrative privileges on Windows machine

First, activate the necessary Windows features:


1. Open Control Panel -> Programs -> Turn Windows features on or off
2. Expand "Services for NFS"
3. Check both:
   - Client for NFS
   - Administrative Tools
4. Click OK and restart when prompted

The most reliable method uses the mount command:


mount -o anon \\freenas-server\sharename X:

Where X: is your desired drive letter. For specific options:


mount -o mtype=hard,nolock,anon \\192.168.1.100\mnt/tank/data Z:

To make the mount survive reboots:


REG ADD "HKLM\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default" /v AnonymousUid /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default" /v AnonymousGid /t REG_DWORD /d 0 /f

mount -o anon,mtype=hard \\freenas\share X: /persistent:yes

Error 53: Verify network connectivity and that NFS service is running on FreeNAS.

Access Denied: Check FreeNAS export permissions:


# Sample FreeNAS /etc/exports entry
/mnt/tank/data -alldirs -maproot=root 192.168.1.0/24

For better performance consider:

  • WinNFSd
  • NekoDrive
  • Dokan Library + NFS plugin

Add these registry tweaks (backup first):


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default]
"UseLockingReadOnly"=dword:00000000
"ReadAheadGranularity"=dword:00000004
"ReadAheadThreshold"=dword:00000002