Christian Zartl, BSc

Private blog and WWW page

Christian Zartl, BSc

Christian Zartl, BSc - Private blog and WWW page

How to map NFS network drive in Windows Server 2003

Network Problem Description

You have Windows Explorer open on your Windows Server 2003 R2, do a right click on “My Computer” and choose “Map Network Drive…”.

Map network drive inside Windows Explorer on Windows Server 2003

Windows Explorer on Windows Server 2003

Afterwards you choose a drive letter and the NFS share you would like to mount.

Map Network Drive Screen in Windows Explorer on Windows Server

Map Network Drive Screen in Windows Explorer

But finally when clicking “Finish” you receive following error: “The drive could not be mapped because no network was found”.

Network Error Message inside Windows Explorer on Windows Server 2003

Network Error Message inside Windows Explorer on Windows Server

Still you are able to ping your NFS server:

C:\Documents and Settings\ATCZ01admin>ping atbup002

Pinging atbup002.akron-group.local [192.168.8.29] with 32 bytes of data:

Reply from 192.168.8.29: bytes=32 time=1ms TTL=64
Reply from 192.168.8.29: bytes=32 time=1ms TTL=64
Reply from 192.168.8.29: bytes=32 time=1ms TTL=64
Reply from 192.168.8.29: bytes=32 time=1ms TTL=64

Ping statistics for 192.168.8.29:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Check if NFS Client is installed

This indicates that there is actually no network problem but that you have simply no NFS support on your Windows server yet. So choose “Start --> Control Panel --> Add or Remove Programs”.

In the left menu bar click on “Add/Remove Windows Components”:

Add Windows Components via Add or Remove Programs Screen

Add NFS support via Add Windows Components Screen

Select “Other Network File and Print Services” and click on “Details…”:

Add Windows Components Screen on Windows Server 2003

Add Windows Components Screen

Now check if “Microsoft Services for NFS” is selected. Otherwise do so and press “Details…” again:

Add Microsoft Services for NFS Windows Components

Add Microsoft Services for NFS on Windows Server 2003

Now select all the components you need. You should be good with the same I have chosen here, except you plan to also share files via NFS from your Windows server (as you will additionally need the server components for this).

Select needed NFS components from Windows Services for NFS

Select needed NFS components on Windows Server 2003

Afterwards click “OK --> OK --> Next”. If you have just chosen the components yet, the installation will start automatically. You will need the Windows Server System CD 2 for this!

Inject Windows Server System CD 2 when asked for needed Files

Inject Windows Server System CD 2 when asked

 

Browse for the following path: CMPNENTS\R2

Component Files on Windows Server System CD 2

Component Files on Windows Server System CD

This should allow the installation to proceed:

Installation Screen for Windows Services for NFS

Installation Screen for Windows Services for NFS on Windows Server 2003

UseReservedPorts Registry Hack

If you are able to map a NFS network drive now, be happy you lucky one! If the same error from above persists, go on trying to debug via cmd. Use the following command:

C:\Documents and Settings\ATCZ01admin>mount atbup002:/mnt/BackupVol *

If you receive this:

Network Error - 53

Type 'NET HELPMSG 53' for more information.

Go on with:

C:\Documents and Settings\ATCZ01admin>NET HELPMSG 53

The network path was not found.

Now check if you have the UseReservedPorts key set in your registry. Click “Start --> Run …” and type “regedit”:

Open Windows Registry via regedit

Open Windows Registry

Press [Enter] or click on "OK". In the Registry Editor navigate to “HKEY_LOCAL_MACHINE --> SOFTWARE --> Microsoft --> Client for NFS --> Current Version”:

Windows Client for NFS in Registry Editor

Windows Client for NFS

If the key is not there, just create it. Do a right click on “Default” and choose “New --> DWORD Value”:

Create UseReservedPorts DWORD Value Key

Create UseReservedPorts DWORD Key

Name it “UseReservedPorts”:

UseReservedPorts DWORD Value Registry Key on Windows Server

UseReservedPorts DWORD Value Registry Key

Now double click it and set “Value data” to 1:

Set DWORD Value Data

Set DWORD Value

Hopefully you should be able now to map the drive via Windows Explorer or mount it with the above command. If it is still not working, you can check if there is a problem on the NFS host server:

C:\Documents and Settings\ATCZ01admin>showmount -e 192.168.8.29
Exports list on 192.168.8.29:
/mnt/BackupVol/sugar               192.168.8.0
/mnt/BackupVol/atsan000            192.168.8.0
/mnt/BackupVol/atrsp001            192.168.8.0
/mnt/BackupVol                     192.168.8.0

You can also try to restart the NFS service on your Windows server. Do not use the services.msc for this, it will show that it worked but actually it doesn’t! So type:

C:\Documents and Settings\ATCZ01admin>nfsadmin client stop
The service was stopped successfully.

C:\Documents and Settings\ATCZ01admin>nfsadmin client start

The service was started successfully.

Copying error

So finally I’m able to map my NFS network drive and access it. Creating folders, opening and deleting files works everything fine. But what I actually wanted to do is to copy a file from my Windows server onto my backup NAS.

But when trying to do so, I received the following error: “The process cannot access the file because another process has locked a portion of the file.”

Copying Error Message

Copying Error Message

Let me tell you it was so hard to find a solution for this it almost drove me nuts. It shouldn’t be a big deal if you really know how NFS works, but for me it was more luck than skills until I actually stumbled across the fix.

First I had to disconnect my drive again by doing a right click and choosing “Disconnect”:

Disconnect already mapped network drive

Disconnect mapped network drive

Afterwards I had to mount it again with the option nolock enabled:

C:\Documents and Settings\ATCZ01>mount atbup002:/mnt/BackupVol Z: -o nolock
Z: is now successfully connected to atbup002:/mnt/BackupVol

The command completed successfully.
Kategorie: Howtos

Deine E-Mail-Adresse wird nicht veröffentlicht. Pflichtfelder sind markiert *

*