LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-11-2008, 10:53 PM   #1
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

Rep: Reputation: 15
Yet Another NFS Stale File Handle Question


Hi

I recently stated getting the dreaded "Stale NFS file handle" error. What's interesting, though, is that the errors are coming from files that should never have been touched by NFS, i.e. files on my root partition that are not exported. In particular, the are coming from various files under /var/lib. For example:

blanks started # pwd
/var/lib/init.d/started
blanks started # ls -lah
ls: cannot access hald: Stale NFS file handle
ls: cannot access syslog-ng: Stale NFS file handle
ls: cannot access net.eth0: Stale NFS file handle
ls: cannot access portmap: Stale NFS file handle
ls: cannot access dbus: Stale NFS file handle
total 8.0K
drwxr-xr-x 2 root root 4.0K Sep 11 22:19 .
drwxr-xr-x 17 root root 4.0K Sep 11 22:45 ..
lrwxrwxrwx 1 root root 21 Sep 11 22:19 alsasound -> /etc/init.d/alsasound
lrwxrwxrwx 1 root root 20 Sep 11 22:19 bootmisc -> /etc/init.d/bootmisc
lrwxrwxrwx 1 root root 19 Sep 11 22:19 checkfs -> /etc/init.d/checkfs
lrwxrwxrwx 1 root root 21 Sep 11 22:19 checkroot -> /etc/init.d/checkroot
lrwxrwxrwx 1 root root 17 Sep 11 22:19 clock -> /etc/init.d/clock
lrwxrwxrwx 1 root root 23 Sep 11 22:19 consolefont -> /etc/init.d/consolefont
l????????? ? ? ? ? ? dbus
l????????? ? ? ? ? ? hald
lrwxrwxrwx 1 root root 20 Sep 11 22:19 hostname -> /etc/init.d/hostname
lrwxrwxrwx 1 root root 19 Sep 11 22:19 keymaps -> /etc/init.d/keymaps
lrwxrwxrwx 1 root root 17 Sep 11 22:19 local -> /etc/init.d/local
--- snip ---

Due to the nature of the files that generate the error, I'm unable to start important daemons such as hald, portmap, nfsd, mt-daapd, ... ( mt-daapd being the most important )

Here is my /etc/exports:

blanks started # cat /etc/exports
# /etc/exports: NFS file systems being exported. See exports(5).
/share 192.168.11.0/255.255.255.0(ro,no_subtree_check,insecure)

The share partition is a separate physical drive.

Anyone know what causes/how to fix this? I've browsed through the 40-odd posts on this site reporting similar issues, but they've been unhelpful. Google doesn't know a solution either.

I'm running Gentoo with a 2.6.25 kernel. I've got NFS file system support, NFSv3 support, NFS server support, and NFS over TCP support compiled into the kernel (i.e. not modules). I've got nfs-utils 1.1.0-r1 installed. Everything used to work...
 
Old 09-13-2008, 04:52 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Are you running LVM? This error occurs with LVM as well.
 
Old 09-13-2008, 05:06 PM   #3
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

Original Poster
Rep: Reputation: 15
Nope, just 2 regular sata drives. The first drive has 3 partitions - boot, root, and swap. The second is just one big partition. Both use ext3. No hardware or software raid.

/etc/fstab:

/dev/sda1 /boot ext2 noauto,noatime 1 2
/dev/sda3 / ext3 noatime 0 1
/dev/sda2 none swap sw 0 0
/dev/sdb1 /share ext3 noatime 0 2
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/ipod /mnt/ipod vfat async,nodev,nosuid,user,rw,noauto 0 0
 
Old 09-13-2008, 06:15 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Sorry, I don't have an answer then. Have you rebooted, and does the issue continue with the same files after reboot?
 
Old 09-14-2008, 12:00 PM   #5
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

Original Poster
Rep: Reputation: 15
Yes, the problem persists across reboots.

It seems that I can get some of my services back up by first doing a restart on portmap, then starting nfs and mt-daapd. I cannot get hal or dbus back up. Even if I do get those network services back up, I still have the stale nfs handles.
 
Old 09-14-2008, 03:09 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Ok, the first thing I would ensure is that all the file systems are clean. Perform a forced, thorough fsck on all the file systems and examine the situation after that.

If the file systems are clean, then the situation may be a little more troubling. I have never been terribly impressed with Linux's NFS stability, reliability, or performance across releases, and in configuring, and managing some large NFS installations encountered numerous problems, kernel bugs, etc. I found it necessary to often build custom kernels with the latest NFS patches, often just to keep a system from hanging. When compared against Solaris-based NFS systems, Linux's NFS implementation paled. This was several years ago, against 2.4 kernels, and the situation may have since changed.

Let us know what you find.
 
Old 09-21-2008, 10:14 PM   #7
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

Original Poster
Rep: Reputation: 15
Thanks for the suggestion. fsck appears to have fixed the problem. As the problems were on my root fs, here's what I did:

1) touch /forcefsck
2) try (and fail) to avoid making obvious poor-taste joke about previous line
2) reboot
3) at grub menu, choose kernel
4) fsck starts cranking away, so go into other room
5) come back, and computer is back at grub menu (rebooted somehow...)
6) choose kernel again
7) fsck starts cranking away and says it repairs fs errors
8) everything seems back to normal now

Some of the previous steps may not have been necessary in fixing the problem.

If the problem reappears, I'll probably try re-evaluating which nfs-related kernel options I chose, get a newer kernel, or switch to something like (ugh) cifs. In any case, the problem seems to have gone away, but I'll post again if it re-appears. Thanks for the help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stale NFS File Handle problem mpnorth Linux - Newbie 10 08-12-2008 11:57 AM
stale nfs file handle on rh3u6. laihu01 Red Hat 1 05-09-2007 02:57 PM
stale NFS file handle error hardian_97 Linux - Networking 0 10-02-2005 11:09 PM
NFS stale file handle master Linux - Software 7 06-14-2005 10:49 AM
Stale NFS file handle toneys Linux - Networking 1 10-24-2004 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration