View previous topic :: View next topic |
Author |
Message |
kwiqsilver Guru
Joined: 19 Mar 2003 Posts: 360
|
Posted: Mon Apr 07, 2003 6:57 am Post subject: nfs server freezes |
|
|
I have my /home directory nfs exported from one box to another (both run gentoo 1.4 installed the last week of March). When ripping CDs to the nfs mounted /home dir on the client, the nfs connection will just stop (my guess is it's the huge traffic). I can ssh, ping, and ftp between the boxes, but anything like "ls /home", or trying to log in as a normal user on the client freezes, waiting for a response from the server, I presume.
Neither box will shut down properly because of the NFS error.
I've looked through the client's /var/log directory and found nfs timeout error entries, but on the server, I can't find any log entry that helps.
Does anybody have an idea of what's going on here, or some advice to point me in the right direction?
Thanks. |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Mon Aug 18, 2003 6:56 pm Post subject: |
|
|
Resurrecting this thread with high hopes that either you have gotten it fixed by now and can tell me what's wrong, or somebody else jumps on the occasion and makes this dreadful thing go away.
My problem is very similar to yours, I'm serving /usr/portage/distfiles from my main desktop as a central repository. The adjacent lesser desktop never had problems, it sees the directory as if it was on its own filesystem, but my notebook chokes on a simple emerge operation. See for yourself:
'mount /usr/portage/distfiles' works quickly and without error message. My line in /etc/fstab:
Code: | daimyo.zok.jp:/usr/portage/distfiles /usr/portage/distfiles nfs noauto,rsize=8192,wsize=8192,timeo=14,intr 0 0
|
Output of 'df':
Code: | daimyo.zok.jp:/usr/portage/distfiles
17429852 11931296 5498556 69% /usr/portage/distfiles
|
Output of 'mount' (IP address scrambled on purpose ): Code: | daimyo.zok.jp:/usr/portage/distfiles on /usr/portage/distfiles type nfs (rw,rsize=8192,wsize=8192,timeo=14,intr,addr=xxx.yyy.zzz.205,addr=xxx.yyy.zzz.205)
|
That's about the only anomaly I can see, two identical IP addresses at the end of that line. What happens next is that I can do 'ls /usr/portage/distfiles' and see the content of the NFS-mounted directory just fine, but when I do an emerge, this is as far as I get before it freezes: Code: | emerge mm-sources
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-kernel/mm-sources-2.6.0_beta3-r2 to /
| And then it's dead. As in nothing moves. Can't even kill it with ctrl-c. If I kill the terminal session (one hell of a trick in itself), I still can't umount.
Any ideas? I've got identical NFS on both machines: Code: | * net-fs/nfs-utils
Latest version available: 1.0.5-r1
Latest version installed: 1.0.5-r1
Size of downloaded files: 259 kB
Homepage: http://nfs.sourceforge.net/
Description: NFS client and server daemons
|
|
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
Posted: Mon Aug 18, 2003 8:12 pm Post subject: nolock ? |
|
|
I once had to use the nolock option when mounting nfs volumes.
Without it, the only way out was to kill rpciod from another console. Ctrl-C would not work.
Simply add nolock in the list of options in your fstab or add it on your cmd line mount -o rw,nolock....
From the depths of my memory I think you need portmap to be started before you mount anything, but the scripts do handle that properly, don't they ?
I am not using it anymore and I also share my distfiles across several machines and also have a home-built cluster of C3 with root-over-nfs and have no problem with nfs.
Hth. |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Mon Aug 18, 2003 9:42 pm Post subject: |
|
|
Thanks! Much luckier with nolock. Haven't tried it on a heavier package yet, but emerge does MD5 checksums and unpacks files from a remote NFS-mounted /usr/portage/distfiles now. I suspect this has something to do with my WLAN card in the notebook, since I don't need nolock on the other desktop.
Speaking about scripts, all I have in /etc/runlevels/default is nfs. Any idea what nfsmount and netmount could be needed for? |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
Posted: Mon Aug 18, 2003 10:54 pm Post subject: |
|
|
plate wrote: | Thanks! Much luckier with nolock. Haven't tried it on a heavier package yet, but emerge does MD5 checksums and unpacks files from a remote NFS-mounted /usr/portage/distfiles now. I suspect this has something to do with my WLAN card in the notebook, since I don't need nolock on the other desktop.
Speaking about scripts, all I have in /etc/runlevels/default is nfs. Any idea what nfsmount and netmount could be needed for? |
Glad I could help.
/etc/init.d/nfs is to start the nfs server
/etc/init.d/nfsmount will only mount nfs volumes referenced in fstab and load portmap (need portmap in dependencies) automatically
/etc/init.d/netmount will mount all network fs (coda,nfs,ncpfs,smbfs) referenced in fstab but not nfs if portmap has not been started beforehand. Actually it does load portmap if you have nfs mount points that should be automounted (i.e. not with option noauto)
Your problem might be that you are mounting your nfs distfiles from the command line and portmap had not been started. |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Tue Aug 19, 2003 8:18 am Post subject: |
|
|
Thanks for wrapping this up for me. When it comes to NFS I have this mental block, possibly due to my first job assignment more than a decade ago when our Unix sysadmin struggled with an obscure PC-NFS (and lost, mostly).
undeuxtroisout wrote: | Your problem might be that you are mounting your nfs distfiles from the command line and portmap had not been started. |
I find that rather unlikely because I stopped and started all services manually before testing it again, and still had the exact same error. Never mind, nolock did the trick. |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Wed Aug 20, 2003 1:20 pm Post subject: |
|
|
Or so I thought. Apparently it's rather picky about what works and what doesn't. Emerging the world today worked just fine for the first three packages from the NFS-mounted /usr/portage/distfiles directory (bash, elfutils, prelink), but stalled on the fourth: Code: | >>> emerge (4 of 5) sys-kernel/mm-sources-2.6.0_beta3-r3 to / | is the last line that gets displayed before the xterm hangs.
Any idea why it's the kernel sources it chokes on? Size? The biggest tarball is 33 MB... Permissions? They're all identical 644. Coincidence? No error has been logged on either machine, by the way, just a successful rpc.mountd message stating that there's been an authenticated mount request, half an hour earlier (before I started the emerge). I'm really scratching my head over this one. |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
Posted: Wed Aug 20, 2003 2:16 pm Post subject: NFS woes |
|
|
It would be nice to know if it is your client or your server which causes problems. Is your other box able to see your /usr/portage/distfiles through NFS after this one hangs ?
Have you checked with another kernel ? net card kernel options ?
Have tried to export some directory from your other box to connect to it ?
Your problem could be linked to your WLAN card.
Maybe you could try the following options when mounting:
rsize=1024,soft,timeo=75,retrans=1
to reduce to block size which migh be a good idea on error-prone net and to have timeouts faster if they occur
If all fails with NFS, could you try smbfs ?
I could not help with samba, I am not using it as I live in a 100% windown-free environment. |
|
Back to top |
|
|
plate Bodhisattva
Joined: 25 Jul 2002 Posts: 1663 Location: Berlin
|
Posted: Wed Aug 20, 2003 4:14 pm Post subject: |
|
|
Hey, you're my new hero. Next time I'm in Groningen prepare for a drink or two.
Must be the WLAN connection, I suppose. Tuning NFS down to the settings you suggested did it - took forever and had me worried for a bit, but worked. What do you think, is that because of "soft" instead of "intr", the reduced rsize/wsize or the timeout?
In any case, thanks a lot. In the long run that doesn't save me from putting Samba on this machine, too, though: Even our FreeBSD fileservers run Samba, so why shouldn't I... |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
Posted: Thu Aug 21, 2003 7:46 pm Post subject: |
|
|
Glad I could help.
A smaller rsize means less chance of corrupted packets and those that need to be resent are smaller and timeouts being detected faster means less lost time.
http://www.sallyobriens.nl/groningenindex.htm is the place
Looks like you are based in a great location yourself. |
|
Back to top |
|
|
TheCoop Veteran
Joined: 15 Jun 2002 Posts: 1814 Location: Where you least expect it
|
Posted: Fri Jun 11, 2004 10:05 pm Post subject: |
|
|
thanks, this solved the problem of my entire wireless connection locking up when i tried to use nfs, specifically /usr/portage/distfiles and /media (music files) mounted over nfs. Thanks! _________________ 95% of all computer errors occur between chair and keyboard (TM)
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler
Change the world - move a rock |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|