Mounting NFS on a Windows Client
-o nolock
option on
the NFS server to prevent the Linux NLM from registering with the portmapper. The native Linux
NLM conflicts with the MapR NFS server.Complete the following steps to mount NFS on a Windows client:
- Mount the Cluster.
- Complete the following steps for Windows 7 Ultimate or Windows 7
Enterprise:
- Open Start > Control Panel > Programs.
- Select Turn Windows features on or off.
- Select Services for NFS.
- Click OK.
- Mount the cluster and map it to a drive using the Map Network Drive tool or from the
command line.
mount -o nolock usa-node01:/mapr z:
- Complete the following steps for all other versions of Windows:
- Download and install Microsoft Windows Services for Unix (SFU). You only need to install the NFS Client and the User Name Mapping.
- Configure the user authentication in SFU to match the authentication used by the cluster (LDAP or operating system users). You can map local Windows users to cluster Linux users, if desired.
- Once SFU is installed and configured, mount the cluster and map it to a drive using the
Map Network Drive tool or from the command line.
mount -o nolock usa-node01:/mapr z:
- Complete the following steps for Windows 7 Ultimate or Windows 7
Enterprise:
- Map a network drive with the Map Network Drive tool.
- Open Start > My Computer.
- Select Tools > Map Network Drive.
- In the Map Network Drive window, choose an unused drive letter from the Drive drop-down list.
- Specify the Folder by browsing for the MapR cluster, or by typing the hostname and directory into the text field.
- Browse for the MapR cluster or type the name of the folder to map. This name must follow UNC. Alternatively, click the Browse… button to find the correct folder by browsing available network shares.
- Select Reconnect at login to reconnect automatically to the MapR cluster whenever you log into the computer.
- Click Finish.
- Configure the UID and GID for NFS access.
- For a system that is part of the Active Directory Domain, you must instruct the NFS client
to access an AD server to get uidNumber and gidNumber.
- Ensure the AD Users schema has auxiliary class posixAccount.
- Populate AD uidNumber and gidNumber fields with matching uid and gid from Linux.
- Configure the NFS client to look up uid and gid in the AD DS store.
- Refer to details here: http://technet.microsoft.com/en-us/library/hh509016(v=ws.10).aspx.
- For a standalone Windows 7 or Vista machine (not using Active Directory), Windows always
uses its configured Anonymous UID and GID for NFS access, which by default are -2. However,
you can configure Windows to use specific values, which results in being able to access NFS
using those values.
The UID and GID values are set in the Windows Registry and are global on the Windows NFS client box. This solution might not work well if your Windows box has multiple users who each need access to NFS with their own permissions, but there is no obvious way to avoid this limitation.
The values are stored in the registry path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClientForNFS\CurrentVersion\Default. The two DWORD values are AnonymousUid and AnonymousGid. If they do not exist, you must create them.
Refer to details here: http://blogs.msdn.com/b/sfu/archive/2009/03/27/can-i-set-up-user-name-mapping-in-windows-vista.aspx.
- For a system that is part of the Active Directory Domain, you must instruct the NFS client
to access an AD server to get uidNumber and gidNumber.
- (Optional) Deactivate the
nlockmgr
service. If thenlockmgr
service is active on a Windows machine, attempts to mount a MapR NFS share fail with the following message:C:\Users\administrator.Client1>mount -o nolock -u:mapr -p:mapr ClusterNode1:/mapr / g: Network Error - 53 Type 'NET HELPMSG 53' for more information.
- Run the
rpcinfo
command to confirm that thenlockmgr
service is active.C:\Users\administrator.Client1>rpcinfo -p ClusterNode1 program version protocol port -------------------------------------------------- 100000 4 tcp 111 portmapper 100024 1 udp 60588 status 100007 2 udp 817 ypbind 100021 1 udp 47016 nlockmgr 100021 3 udp 47016 nlockmgr 100021 4 udp 47016 nlockmgr 100021 1 tcp 34254 nlockmgr 100021 3 tcp 34254 nlockmgr 100021 4 tcp 34254 nlockmgr
- Check the output for the presence of
nlockmgr
. To deregisternlockmgr
services on the node, use the-d
switch inrpcinfo
on the MapR node.[root@ClusterNode1 ~]# rpcinfo -d 100021 1 [root@ClusterNode1 ~]# rpcinfo -d 100021 2 [root@ClusterNode1 ~]# rpcinfo -d 100021 3 [root@ClusterNode1 ~]# rpcinfo -d 100021 4
- Re-check
rpcinfo
output to verify that nonlockmgr
services are registered. The NFS mount completes successfully at this point.C:\Users\administrator.Client1>mount -o nolock -u:mapr -p:mapr ClusterNode1:/mapr/ Z: Z: is now successfully connected to ClusterNode1:/mapr/ The command completed successfully.
- Run the