public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* getcwd() returning -ENOENT???
@ 2004-02-07 21:38 -rb (Robert T. Brown)
  2004-02-07 22:34 ` Marcus Alanen
  0 siblings, 1 reply; 4+ messages in thread
From: -rb (Robert T. Brown) @ 2004-02-07 21:38 UTC (permalink / raw)
  To: linux-kernel

Greetings.
I have 2 clients and a server.  On one client, every 24-72 hours
I get into a situation where the shells cd'ed into
my [automounted] home directory report:

gretchen@falcon{11}pwd
pwd: cannot get current directory: No such file or directory

On the other client, it happens approximately once every 3 weeks.

(These are the same symptoms as described in 12/2000, here):
http://www.ussg.iu.edu/hypermail/linux/kernel/0012.0/0821.html
There did not appear to be any resolution, and my searches turned
up no similar problems since then.


Like the original poster, a "vdir /proc/self/." indicates:
lrwxrwxrwx    1 gretchen gretchen        0 Feb  7 15:25 cwd -> /net/home/gretchen\ (deleted)

While a "vdir" returns the full contents of /net/home/gretchen.

Also, "mount" shows the filesystem mounted via NFS:
gretchen@falcon{17}/bin/mount
/dev/hda2 on / type ext3 (rw)
     (snip)
automount(pid4490) on /net type autofs (rw,fd=5,pgrp=4490,minproto=2,maxproto=3)
ds:/u4/public/home on /net/home type nfs (rw,soft,intr,addr=192.168.3.5)

Note that /net/home is the mount point.  Originally, I suspected a problem
with the mount itself, or even the NFS server.  But, then I discovered,
interestingly enough, another shell which is cd'ed into /net/home/rbrown
actually *works* still!

The original poster indicated he rebooted to "fix" it.  Sure that
works, but I have also noticed that merely typing "cd" works too.

gretchen@falcon{23}pwd
pwd: cannot get current directory: No such file or directory
Exit 1
gretchen@falcon{24}echo $cwd
/home/gretchen
gretchen@falcon{25}cd $cwd
gretchen@falcon{26}pwd
/net/home/gretchen


(The shell is tcsh, not bash; I'm sure that's not relevant).
The client machines are running 2.4.20-8 (yea, this is the Redhat 9.0 kernel).
The server machine is running 2.4.20 (which I built).

Once every day or two, the client machine's syslog shows messages like:
Feb  4 23:16:52 falcon ntpd[4550]: synchronisation lost
Feb  5 11:04:28 falcon kernel: nfs: server ds not responding, timed out
("ds" is the nfs server and the ntp server).

The server machine's syslog shows no errors (just normal informative
messages for each NFS mount and umount request).

I've had the server and clients for years without problems.  Recent changes
include: upgraded clients to redhat 9.0, upgraded server kernel to 2.4.20,
and implemented software raid-1 on the server side's /u4 directory (the
partition which the client mounts as /net/home).

I see from the Changelog's that there are some NFS-related fixes between
2.4.20 and 2.4.24.  Not being a kernel hacker, I can't tell if any of the
fixes would address this problem.  Should I upgrade the client, the server,
or do I have to do both?

I would appreciate a CC: to my email address on any reply.
Thank you for your time.

		-rb

^ permalink raw reply	[flat|nested] 4+ messages in thread
* getcwd() returning -ENOENT???
@ 2000-12-07 15:03 Russell King
  2000-12-07 15:31 ` Alexander Viro
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King @ 2000-12-07 15:03 UTC (permalink / raw)
  To: linux-kernel

Hi,

Can someone explain why I'm seeing the following on test12-pre7:

bash# /bin/pwd
/bin/pwd: cannot get current directory: No such file or directory
bash# vdir /proc/self/.
...
lrwxrwxrwx    1 root     root           0 Dec  7 14:52 cwd -> /net/raistlin/raistlin-v2.4/linux-ebsa285 (deleted)
...
lrwxrwxrwx    1 root     root           0 Dec  7 14:52 root -> /
...
bash# vdir
... <complete listing of directory> ...
bash# cat /proc/mounts
/dev/root / ext2 rw,noatime 0 0
/proc /proc proc rw 0 0
/dev/hda3 /var ext2 rw,nodiratime 0 0
/dev/hda5 /usr ext2 rw,noatime 0 0
/dev/hda6 /home ext2 rw 0 0
none /dev/pts devpts rw 0 0
none /dev/shm shm rw 0 0
automount(pid482) /net/flint autofs rw 0 0
automount(pid499) /net/raistlin autofs rw 0 0
raistlin:/usr/src/v2.4 /net/raistlin/raistlin-v2.4 nfs rw,v2,rsize=4096,wsize=4096,hard,udp,lock,addr=raistlin 0 0

Rebooting the machine and trying again caused this weirdness to disappear.

First time around, the network wasn't initially available when autofs
started.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |         Russell King        rmk@arm.linux.org.uk      --- ---
  | | | | http://www.arm.linux.org.uk/personal/aboutme.html   /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-07 22:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-07 21:38 getcwd() returning -ENOENT??? -rb (Robert T. Brown)
2004-02-07 22:34 ` Marcus Alanen
  -- strict thread matches above, loose matches on Subject: below --
2000-12-07 15:03 Russell King
2000-12-07 15:31 ` Alexander Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox