Windows 7 NFS Client, does not release from sunrpc
Hello, I have a network with approximately 300 client machines (200 Win7, 100 Snow Leopard). Both OS's mount a user's home directory from a CentOS NFS server. Snow Leopard is using NFS automounting. Prior to this past August the Windows machines were XP and used samba to mount the user's home directory. Over the summer we moved to Win7 Enterprise and also switched from samba to using the new NFS client feature in Win7. A login script is used to mount the user's home directory and redirecting "My Documents" to a folder in the home directory. The Unix Attributes in AD is used to map to the appropriate Linux UID/GID for file permissions. Initially this appeared to work great, but after time the CentOS NFS server stops responding to NFS requests (rpc stops responding). Using netstat I can see the Win7 boxes are leaving open connections. Even if the user logs out and/or reboots the machine. Here is a sample output from running "netstat -ap | grep Win7box1": (machine names are changed) tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:53819 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:56379 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:892 Win7box1 .pcs.cnu.edu:53818 ESTABLISHED 26922/rpc.mountd tcp 0 0 turing.pcs.cnu.edu:892 Win7box1 .pcs.cnu.edu:56378 ESTABLISHED 26922/rpc.mountd tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:53817 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:56377 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:56359 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:892 Win7box1 .pcs.cnu.edu:56356 ESTABLISHED 26922/rpc.mountd tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:53798 ESTABLISHED 26880/portmap tcp 0 0 turing.pcs.cnu.edu:892 Win7box1 .pcs.cnu.edu:49445 ESTABLISHED 26922/rpc.mountd tcp 0 0 turing.pcs.cnu.edu:892 Win7box1 .pcs.cnu.edu:53797 ESTABLISHED 26922/rpc.mountd tcp 0 0 turing.pcs.cnu.edu:sunrpc Win7box1 .pcs.cnu.edu:56357 ESTABLISHED 26880/portmap I'm only showing some of the connections for this machine... sometimes there are over 500 for one machine. All Win7 boxes also generate several connections per session and the connections are not released even when the user logs out or reboots the machine (both with and without unmounting first). I've tried mounting using "net use", "mount", and directly via the GUI in the file explorer. All connections have the same behavior and especially the sunrpc connections do not release even after the user logs out and/or reboots the machine. Since I have about 1000 different users this quickly becomes a problem and eventually the NFS server bogs down and I have to restart portmap, nfs, and nfslockd. To remedy this I have a cron job which restarts these services (portmap, nfs, nfslockd) at 4am every morning. So far this is helping to keep the problem at bay but clearly not a good solution. I have searched high and low online and can't even find any mention of this issue. I did discover why sunrpc (sun's remote procedure call) is used (this had me baffled since no machines being used are Solaris). Turns out Windows uses sunrpc to do the id mapping from AD to the unix UID/GID. But why does it not release it? Also along these lines, (and might be related) I do have /home/& automounting enabled and used on Linux client machines and our Snow Leopard machines. Works great on these machines and the logfiles show how only the user directory is mounted: Sep 22 17:08:14 turing mountd[26922]: authenticated mount request from linux1.pcs.cnu.edu:918 for /home/userA (/home) Sep 22 17:08:16 turing mountd[26922]: authenticated mount request from linux2.pcs.cnu.edu:836 for /home/userB (/home) Sep 22 17:08:19 turing mountd[26922]: authenticated mount request from linux2.pcs.cnu.edu:843 for /home/userC (/home) Sep 22 17:08:31 turing mountd[26922]: authenticated mount request from linux1.pcs.cnu.edu:918 for /home/userD (/home) Sep 22 17:08:56 turing mountd[26922]: authenticated mount request from linux2.pcs.cnu.edu:862 for /home/userE (/home) Sep 22 17:09:41 turing mountd[26922]: authenticated mount request from linux2.pcs.cnu.edu:870 for /home/userF (/home) Here is what is logged when a Win7 machine mounts a user's home directory (Note : only the user's home directory is mounted on the Win7 client, not the entire /home directory. It appears in the log files the entire /home directory is mounted): Sep 22 15:23:52 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:990 for /home (/home) Sep 22 15:25:38 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:936 for /home (/home) Sep 22 15:38:35 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:951 for /home (/home) Sep 22 15:52:28 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:959 for /home (/home) Sep 22 15:59:50 turing mountd[26922]: authenticated mount request from Win7box2 .pcs.cnu.edu:940 for /home (/home) Sep 22 16:03:21 turing mountd[26922]: authenticated mount request from Win7box3 .pcs.cnu.edu:902 for /home (/home) Sep 22 16:04:26 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:969 for /home (/home) Sep 22 16:16:47 turing mountd[26922]: authenticated mount request from Win7box1 .pcs.cnu.edu:972 for /home (/home) I bolded the machine names (changed to protect the innocent) so you can see Win7box1 continues to call the mount command. It appears the mount command is executed for every file/directory the user accesses. Why is this? Unix/Linux/MacOS only make one connection per session, not per file/folder access. I've also tried both hard and soft mounting, same behavior. Also, last weekend I updated all patches on the CentOS NFS server, still no changes. Here is the output of "uname -a" run on the NFS server (turing). This machine is not accessible outside our network. Linux turing.pcs.cnu.edu 2.6.18-194.11.3.el5 #1 SMP Mon Aug 30 16:19:16 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux Please help! This is really becoming a problem. I don't want to re-implement samba. Thank you for any help, Linda Hardie
September 22nd, 2010 5:36pm

Hi Linda, You may refer to the following KB article: You cannot mount shares from an NFS file server on a client computer that is running Windows 7 or Windows Server 2008 R2 when you use NFS version 2 on the file server Regards, Sabrina This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
September 24th, 2010 5:18am

Linda, I'm encountering the same problem and am debugging this as well. We had 4 Windows boxes consuming almost 700 open file descriptors in the portmapper. Was Sabrina's post helpful? It looks to me like it doesn't address this bug. I may have found a solution by using libkeepalive.so with the portmap process (LD_PRELOAD'ed). Last night's testing was encouraging. You can contact me at gmail.com under the username rrauenza. My fallback plan is to use something like mausezahn to inject an RST into the portmap process to force the relevant (or rather irrelevant) sockets to close. I also filed a bug with Redhat to document the issue: https://bugzilla.redhat.com/show_bug.cgi?id=666932
January 4th, 2011 12:16pm

Unfortunely, I am having the exact same problem and the KB article quoted isn't topical. I've got an incident open with Microsoft but unless we can fix this issue right away, we're going to have to go to a third party NFS client or just stop using Windows altogether.
Free Windows Admin Tool Kit Click here and download it now
January 6th, 2011 2:35pm

Thank you for all the help. I checked and I'm using NFS version 3.2.22. rrauenza, I'm trying your solutions and hope one is good enough at least until CentOS 6 is released. I setup a test PC, connected to NFS, accessed several files on the NFS mount. This created several connections to portmap and sunrpc. Then I used iptables (on the NFS server) to block connections to the PC and they never released. I re-did the scenario and turned off the PC. Still the connections were not released. I'm not familiar with libkeepalive so I'll check that next. thank you again and I'll report back if I find a solution,
January 13th, 2011 4:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics